Part Number Hot Search : 
YUNPR 2N700 1533SY SLD9630 200BG 1533SY 5248B R5F2136
Product Description
Full Text Search
 

To Download MPC8540 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  MPC8540 powerquicc iii? integrated host processor reference manual MPC8540rm rev. 1 07/2004
how to reach us: usa/europe/locations not listed: freescale semiconductor literature distribution center p.o. box 5405, denver, colorado 80217 1-480-768-2130 (800) 521-6274 japan: freescale semiconductor japan ltd. technical information center 3-20-1, minami-azabu, minato-ku tokyo 106-8573, japan 81-3-3440-3569 asia/pacific: freescale semiconductor hong kong ltd. 2 dai king street tai po industrial estate tai po, n.t. hong kong 852-26668334 home page: www.freescale.com freescale? and the freescale logo are trademarks of freescale semiconductor, inc. the described product is a powerpc microprocessor. the powerpc name is a trademark of ibm corp. and used under license. all other product or service names are the property of their respective owners. ? freescale semiconductor, inc. 2004. MPC8540rm rev. 1 07/2004 information in this document is provided solely to enable system and software implementers to use freescale semiconductor products. there are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document. freescale semiconductor reserves the right to make changes without further notice to any products herein. freescale semiconductor makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does freescale semiconductor assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. ?typical? parameters which may be provided in freescale semiconductor data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. all operating parameters, including ?typicals? must be validated for each customer application by customer?s technical experts. freescale semiconductor does not convey any license under its patent rights nor the rights of others. freescale semiconductor products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the freescale semiconductor product could create a situation where personal injury or death may occur. should buyer purchase or use freescale semiconductor products for any such unintended or unauthorized application, buyer shall indemnify and hold freescale semiconductor and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that freescale semiconductor was negligent regarding the design or manufacture of the part. learn more: for more information about freescale semiconductor products, please visit www.freescale.com
i iii 8 9 10 11 12 13 14 15 16 17 1 2 3 4 iv 18 19 20 21 ii 5 6 7 a glo reg ind part i?overview overview memory map signal descriptions reset, clocking, and initialization part ii?e500 core complex and l2 cache e500 core complex overview e500 register summary l2 look-aside cache/sram part iii?memory and i/o interfaces e500 coherency module ddr memory controller programmable interrupt controller i 2 c interface duart local bus controller three-speed ethernet controllers dma controller pci/pci-x bus interface rapidio interface part iv?global functions and debug global utilities performance monitor debug features and watchpoint facility 10/100 fast ethernet controller appendix a?revision history glossary of terms and abbreviations register index (memory-mapped registers) general index
i iii 8 9 10 11 12 13 14 15 16 17 1 2 3 4 iv 18 19 20 21 ii 5 6 7 a glo reg ind part i?overview overview memory map signal descriptions reset, clocking, and initialization part ii?e500 core complex and l2 cache e500 core complex overview e500 register summary l2 look-aside cache/sram part iii?memory and i/o interfaces e500 coherency module ddr memory controller programmable interrupt controller i 2 c interface duart local bus controller three-speed ethernet controllers dma controller pci/pci-x bus interface rapidio interface part iv?global functions and debug global utilities performance monitor debug features and watchpoint facility 10/100 fast ethernet controller appendix a?revision history glossary of terms and abbreviations register index (memory-mapped registers) general index
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor v contents paragraph number title page number co nt en ts about this book audience ..................................................................................................................... lx xxiii organization................................................................................................................ lxx xiii suggested reading...................................................................................................... lxxxvi general information............................................................................................ lxxxvi related documentation ...................................................................................... lxxxvi conventions ............................................................................................................... lxxxv ii signal conventions ................................................................................................... lxxxviii acronyms and abbreviations ................................................................................... lxxxviii part i overview chapter 1 overview 1.1 introduction................................................................................................................ ...... 1-1 1.2 MPC8540 overview ........................................................................................................ 1-1 1.2.1 key features .............................................................................................................. .. 1-2 1.3 MPC8540 architecture overview ................................................................................... 1-8 1.3.1 e500 core overview .................................................................................................... 1-8 1.3.2 on-chip memory unit............................................................................................... 1-12 1.3.2.1 on-chip memory as memory-mapped sram..................................................... 1-13 1.3.2.2 on-chip memory as l2 cache.............................................................................. 1-13 1.3.3 e500 coherency module (ecm)................................................................................ 1-14 1.3.4 ddr sdram controller .......................................................................................... 1-14 1.3.5 programmable interrupt controller (pic).................................................................. 1-15 1.3.6 i 2 c controller ............................................................................................................ 1-15 1.3.7 boot sequencer .......................................................................................................... 1- 16 1.3.8 dual universal asynchronous receiver/transmitter (duart) ............................... 1-16 1.3.9 10/100 fast ethernet controller................................................................................. 1-16 1.3.10 local bus controller (lbc) ...................................................................................... 1-17 1.3.11 three-speed ethernet controllers (10/100/1gb)....................................................... 1-17 1.3.12 integrated dma ......................................................................................................... 1- 18 1.3.13 pci controller........................................................................................................... .1-18 1.3.14 rapidio controller .................................................................................................... 1-1 8
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 vi freescale semiconductor contents paragraph number title page number 1.3.14.1 rapidio message unit .......................................................................................... 1-19 1.3.15 power management ................................................................................................... 1-19 1.3.16 clocking................................................................................................................. .... 1-20 1.3.17 address map .............................................................................................................. 1-20 1.3.18 ocean switch fabric ................................................................................................ 1-20 1.3.19 processing across the on-chip fabric...................................................................... 1-20 1.3.20 data processing with the e500 coherency module ................................................... 1-21 1.4 MPC8540 application examples .................................................................................. 1-21 1.4.1 MPC8540 applications.............................................................................................. 1-21 chapter 2 memory map 2.1 local memory map overview and example .................................................................. 2-1 2.2 address translation and mapping ................................................................................... 2-3 2.2.1 sram windows.......................................................................................................... 2-4 2.2.2 window into configuration space............................................................................... 2-4 2.2.3 local access windows................................................................................................ 2-4 2.2.3.1 local access register memory map ...................................................................... 2-5 2.2.3.2 local access window n base address registers (lawbar0?lawbar7)................................................................................... 2-6 2.2.3.3 local access window n attributes registers (lawar0?lawar7)......................................................................................... 2-6 2.2.3.4 precedence of local access windows .................................................................... 2-7 2.2.3.5 configuring local access windows ....................................................................... 2-7 2.2.3.6 distinguishing local access windows from other mapping functions ................ 2-8 2.2.3.7 illegal interaction between local access windows and ddr sdram chip selects .......................................................................................... 2-8 2.2.4 outbound address translation and mapping windows.............................................. 2-8 2.2.5 inbound address translation and mapping windows ................................................ 2-9 2.2.5.1 rapidio inbound atmu......................................................................................... 2-9 2.2.5.2 pci/pci-x inbound atmu..................................................................................... 2-9 2.2.5.3 illegal interaction between inbound atmus and local access windows .............................................................................................................. 2-9 2.3 configuration, control, and status register map.......................................................... 2-10 2.3.1 accessing ccsr memory from external masters .................................................... 2-11 2.3.2 organization of ccsr memory ................................................................................ 2-11 2.3.3 general utilities registers ......................................................................................... 2-13 2.3.4 interrupt controller and ccsr .................................................................................. 2-14 2.3.5 rapidio and ccsr.................................................................................................... 2-15
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor vii contents paragraph number title page number 2.3.6 device-specific utilities............................................................................................ 2-15 2.4 complete ccsr map .................................................................................................... 2-16 chapter 3 signal descriptions 3.1 signals overview ............................................................................................................ .3-1 3.2 configuration signals sampled at reset ....................................................................... 3-15 3.3 output signal states during reset ................................................................................ 3-16 chapter 4 reset, clocking, and initialization 4.1 overview.................................................................................................................... ...... 4-1 4.2 external signal descriptions ........................................................................................... 4-1 4.2.1 system control signals................................................................................................ 4-2 4.2.2 clock signals ............................................................................................................. .. 4-3 4.3 memory map/register definition ................................................................................... 4-3 4.3.1 local configuration control........................................................................................ 4-3 4.3.1.1 accessing configuration, control, and status registers......................................... 4-4 4.3.1.1.1 updating ccsrbar ........................................................................................... 4-4 4.3.1.1.2 configuration, control, and status base address register (ccsrbar) .................................................................................................... 4-5 4.3.1.2 accessing alternate configuration space ............................................................... 4-5 4.3.1.2.1 alternate configuration base address register (altcbar)............................ 4-6 4.3.1.2.2 alternate configuration attribute register (altcar)...................................... 4-6 4.3.1.3 boot page translation.............................................................................................. 4-7 4.3.1.3.1 boot page translation register (bptr).............................................................. 4-8 4.3.2 boot sequencer ............................................................................................................ 4-8 4.4 functional description..................................................................................................... 4 -8 4.4.1 reset operations .......................................................................................................... 4-8 4.4.1.1 soft reset.............................................................................................................. ... 4-9 4.4.1.2 hard reset .............................................................................................................. .4-9 4.4.2 power-on reset sequence........................................................................................... 4-9 4.4.3 power-on reset configuration.................................................................................. 4-11 4.4.3.1 system pll ratio.................................................................................................. 4-12 4.4.3.2 e500 core pll ratio ............................................................................................. 4-13 4.4.3.3 boot rom location .............................................................................................. 4-14 4.4.3.4 host/agent configuration ..................................................................................... 4-14 4.4.3.5 cpu boot configuration ....................................................................................... 4-15
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 viii freescale semiconductor contents paragraph number title page number 4.4.3.6 boot sequencer configuration .............................................................................. 4-16 4.4.3.7 tsec width........................................................................................................... 4-1 6 4.4.3.8 tsec1 protocol ..................................................................................................... 4-17 4.4.3.9 tsec2 protocol ..................................................................................................... 4-17 4.4.3.10 rapidio transmit clock source...................... ...................................................... 4-18 4.4.3.11 rapidio device id ................................................................................................ 4-18 4.4.3.12 pci width configuration....................................................................................... 4-19 4.4.3.13 pci i/o impedance ................................................................................................ 4-19 4.4.3.14 pci arbiter configuration ..................................................................................... 4-19 4.4.3.15 pci debug configuration ...................................................................................... 4-20 4.4.3.16 pci-x configuration ............................................................................................. 4-20 4.4.3.17 memory debug configuration .............................................................................. 4-20 4.4.3.18 ddr debug configuration.................................................................................... 4-21 4.4.3.19 pci/pci-x output hold configuration ................................................................. 4-21 4.4.3.20 local bus output hold configuration .................................................................. 4-22 4.4.3.21 general-purpose por configuration .................................................................... 4-23 4.4.4 clocking.................................................................................................................. ... 4-23 4.4.4.1 system clock/pci clock ....................................................................................... 4-23 4.4.4.2 rapidio clocks ..................................................................................................... 4-24 4.4.4.3 ethernet clocks...................................................................................................... 4-2 5 4.4.4.4 real time clock .................................................................................................... 4-25 part ii e500 core complex and l2 cache chapter 5 core complex overview 5.1 overview.................................................................................................................... ...... 5-1 5.1.1 upward compatibility ................................................................................................. 5-3 5.1.2 core complex summary ............................................................................................. 5-3 5.2 e500 processor and system version numbers................................................................. 5-4 5.3 features .................................................................................................................... ........ 5-5 5.4 instruction set ............................................................................................................. ... 5-12 5.5 instruction flow ............................................................................................................ .5-14 5.5.1 initial instruction fetch.............................................................................................. 5-1 4 5.5.2 branch detection and prediction ............................................................................... 5-14 5.5.3 e500 execution pipeline ............................................................................................ 5-15 5.6 programming model ...................................................................................................... 5-18 5.7 on-chip cache implementation .................................................................................... 5-20
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor ix contents paragraph number title page number 5.8 interrupts and exception handling ................................................................................ 5-20 5.8.1 exception handling ................................................................................................... 5-20 5.8.2 interrupt classes ........................................................................................................ 5 -21 5.8.3 interrupt types ........................................................................................................... 5-21 5.8.4 upper bound on interrupt latencies ......................................................................... 5-22 5.8.5 interrupt registers...................................................................................................... 5 -22 5.9 memory management.................................................................................................... 5-24 5.9.1 address translation ................................................................................................... 5-26 5.9.2 mmu assist registers (mas1?mas4 and mas6) ................................................. 5-27 5.9.3 process id registers (pid0?pid2)............................................................................ 5-27 5.9.4 tlb coherency.......................................................................................................... 5-2 7 5.10 memory coherency ....................................................................................................... 5-28 5.10.1 atomic update memory references ......................................................................... 5-28 5.10.2 memory access ordering.......................................................................................... 5-28 5.10.3 cache control instructions ........................................................................................ 5-28 5.10.4 programmable page characteristics .......................................................................... 5-29 5.11 core complex bus (ccb) ............................................................................................. 5-29 5.12 performance monitoring................................................................................................ 5-29 5.12.1 global control register ............................................................................................. 5-30 5.12.2 performance monitor counter registers ................................................................... 5-30 5.12.3 local control registers ............................................................................................. 5-30 5.13 legacy support of powerpc architecture..................................................................... 5-31 5.13.1 instruction set compatibility..................................................................................... 5-31 5.13.1.1 user instruction set ............................................................................................... 5-31 5.13.1.2 supervisor instruction set...................................................................................... 5-31 5.13.2 memory subsystem ................................................................................................... 5-32 5.13.3 exception handling ................................................................................................... 5-32 5.13.4 memory management................................................................................................ 5-32 5.13.5 reset.................................................................................................................... ....... 5-32 5.13.6 little-endian mode.................................................................................................... 5-3 3 5.14 powerquicc iii implementation details ..................................................................... 5-33 chapter 6 core register summary 6.1 overview.................................................................................................................... ...... 6-1 6.1.1 register set .............................................................................................................. .... 6-1 6.2 register model for 32-bit implementations .................................................................... 6-3 6.2.1 special-purpose registers (sprs) ............................................................................... 6-4 6.3 registers for computational operations.......................................................................... 6-8
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 x freescale semiconductor contents paragraph number title page number 6.3.1 general-purpose registers (gprs).............................................................................. 6-8 6.3.2 integer exception register (xer)............................................................................... 6-8 6.4 registers for branch operations...................................................................................... 6-9 6.4.1 condition register (cr) .............................................................................................. 6-9 6.4.2 link register (lr)..................................................................................................... 6-1 1 6.4.3 count register (ctr)................................................................................................ 6-11 6.5 processor control registers ........................................................................................... 6-11 6.5.1 machine state register (msr) .................................................................................. 6-12 6.5.2 processor id register (pir) ...................................................................................... 6-14 6.5.3 processor version register (pvr)............................................................................. 6-14 6.5.4 system version register (svr)................................................................................. 6-14 6.6 timer registers ............................................................................................................. .6-15 6.6.1 timer control register (tcr)................................................................................... 6-15 6.6.2 timer status register (tsr)...................................................................................... 6-16 6.6.3 time base registers .................................................................................................. 6-17 6.6.4 decrementer register ................................................................................................ 6-17 6.6.5 decrementer auto-reload register (decar).......................................................... 6-17 6.7 interrupt registers......................................................................................................... .6-18 6.7.1 interrupt registers defined by book e...................................................................... 6-18 6.7.1.1 save/restore register 0 (srr0)............................................................................ 6-18 6.7.1.2 save/restore register 1 (srr1)............................................................................ 6-18 6.7.1.3 critical save/restore register 0 (csrr0) ............................................................ 6-18 6.7.1.4 critical save/restore register 1 (csrr1) ............................................................ 6-19 6.7.1.5 data exception address register (dear)............................................................ 6-19 6.7.1.6 interrupt vector prefix register (ivpr) ................................................................ 6-19 6.7.1.7 interrupt vector offset registers (ivor n )............................................................ 6-19 6.7.1.8 exception syndrome register (esr) .................................................................... 6-20 6.7.2 eis-defined interrupt registers ................................................................................ 6-21 6.7.2.1 machine check save/restore register 0 (mcsrr0) ........................................... 6-21 6.7.2.2 machine check save/restore register 1 (mcsrr1) ........................................... 6-22 6.7.2.3 machine check address register (mcar) .......................................................... 6-22 6.7.2.4 machine check syndrome register (mcsr)........................................................ 6-23 6.8 software-use sprs (sprg0?sprg7 and usprg0) ................................................... 6-24 6.9 branch target buffer (btb) registers .......................................................................... 6-25 6.9.1 branch buffer entry address register (bbear) ..................................................... 6-25 6.9.2 branch buffer target address register (bbtar) .................................................... 6-25 6.9.3 branch unit control and status register (bucsr).................................................. 6-26 6.10 hardware implementation-dependent registers ........................................................... 6-27 6.10.1 hardware implementation-dependent register 0 (hid0)......................................... 6-27 6.10.2 hardware implementation-dependent register 1 (hid1)......................................... 6-28
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xi contents paragraph number title page number 6.11 l1 cache configuration registers................................................................................. 6-30 6.11.1 l1 cache control and status register 0 (l1csr0) .................................................. 6-30 6.11.2 l1 cache control and status register 1 (l1csr1) .................................................. 6-31 6.11.3 l1 cache configuration register 0 (l1cfg0) ......................................................... 6-32 6.11.4 l1 cache configuration register 1 (l1cfg1) ......................................................... 6-33 6.12 mmu registers.............................................................................................................. 6-34 6.12.1 process id registers (pid0?pid2)............................................................................ 6-34 6.12.2 mmu control and status register 0 (mmucsr0) .................................................. 6-34 6.12.3 mmu configuration register (mmucfg) .............................................................. 6-35 6.12.4 tlb configuration registers (tlb n cfg)................................................................ 6-35 6.12.4.1 tlb0 configuration register 0 (tlb0cfg) ........................................................ 6-35 6.12.4.2 tlb1 configuration register 1 (tlb1cfg) ........................................................ 6-36 6.12.5 mmu assist registers............................................................................................... 6-37 6.12.5.1 mas register 0 (mas0) ....................................................................................... 6-37 6.12.5.2 mas register 1 (mas1) ....................................................................................... 6-38 6.12.5.3 mas register 2 (mas2) ....................................................................................... 6-39 6.12.5.4 mas register 3 (mas3) ....................................................................................... 6-40 6.12.5.5 mas register 4 (mas4) ....................................................................................... 6-40 6.12.5.6 mas register 6 (mas6) ....................................................................................... 6-41 6.13 debug registers ............................................................................................................ .6-42 6.13.1 debug control registers (dbcr0?dbcr2) ............................................................ 6-42 6.13.1.1 debug control register 0 (dbcr0)...................................................................... 6-42 6.13.1.2 debug control register 1 (dbcr1)...................................................................... 6-43 6.13.1.3 debug control register 2 (dbcr2)...................................................................... 6-45 6.13.2 debug status register (dbsr).................................................................................. 6-46 6.13.3 instruction address compare registers (iac1?iac2) ............................................. 6-47 6.13.4 data address compare registers (dac1?dac2).................................................... 6-48 6.14 signal processing and embedded floating-point status and control register (spefscr) .................................................................................... 6-48 6.14.1 accumulator (acc)................................................................................................... 6-50 6.15 performance monitor registers (pmrs) ....................................................................... 6-51 6.15.1 global control register 0 (pmgc0, upmgc0)....................................................... 6-52 6.15.2 local control a registers (pmlca0?pmlca3, upmlca0?upmlca3) ...................................................... 6-52 6.15.3 local control b registers (pmlcb0?pmlcb3, upmlcb0?upmlcb3) ..................................................... 6-53 6.15.4 performance monitor counter registers (pmc0?pmc3, upmc0?upmc3) ....................................................................... 6-54
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xii freescale semiconductor contents paragraph number title page number chapter 7 l2 look-aside cache/sram 7.1 l2 cache overview ......................................................................................................... 7- 1 7.1.1 l2 cache and sram features .................................................................................... 7-2 7.2 cache organization.......................................................................................................... 7-3 7.3 memory map/register definition ................................................................................... 7-6 7.3.1 l2/sram register descriptions ................................................................................. 7-7 7.3.1.1 l2 control register (l2ctl).................................................................................. 7-7 7.3.1.2 l2 cache external write address registers 0?3 (l2cewar n ) .......................... 7-10 7.3.1.3 l2 cache external write control registers 0?3 (l2cewcr n ) ........................... 7-10 7.3.1.4 l2 memory-mapped sram base address registers 0?1 (l2srbar n ) ..................................................................................................... 7-11 7.3.1.5 l2 error registers.................................................................................................. 7-12 7.3.1.5.1 error injection registers.................................................................................... 7-13 7.3.1.5.2 error control and capture registers ................................................................. 7-15 7.4 external writes to the l2 cache (cache stashing)........................................................ 7-21 7.5 l2 cache timing ........................................................................................................... 7- 21 7.6 l2 cache and sram coherency................................................................................... 7-22 7.6.1 l2 cache coherency rules........................................................................................ 7-22 7.6.2 memory-mapped sram coherency rules .............................................................. 7-24 7.7 l2 cache locking.......................................................................................................... 7- 24 7.7.1 locking the entire l2 cache ..................................................................................... 7-25 7.7.2 locking programmed memory ranges ..................................................................... 7-25 7.7.3 locking selected lines.............................................................................................. 7-25 7.7.4 clearing locks on selected lines ............................................................................. 7-26 7.7.5 flash clearing of instruction and data locks ........................................................... 7-27 7.7.6 locks with stale data ................................................................................................ 7-27 7.8 plru l2 replacement policy....................................................................................... 7-27 7.8.1 plru bit update considerations.............................................................................. 7-28 7.8.2 allocation of lines .................................................................................................... 7-2 9 7.9 l2 cache operation ....................................................................................................... 7-2 9 7.9.1 l2 cache states ......................................................................................................... 7- 29 7.9.2 flash invalidation of the l2 cache............................................................................ 7-30 7.9.3 l2 state transitions ................................................................................................... 7-3 0 7.10 initialization/application information ........................................................................... 7-34 7.10.1 initialization ........................................................................................................... .... 7-35 7.10.1.1 l2 cache initialization .......................................................................................... 7-35 7.10.1.2 memory-mapped sram initialization ................................................................. 7-35 7.10.2 managing errors ........................................................................................................ 7- 35
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xiii contents paragraph number title page number 7.10.2.1 ecc errors............................................................................................................. 7-35 7.10.2.2 tag parity errors.................................................................................................... 7- 36 part iii memory and i/o interfaces chapter 8 e500 coherency module 8.1 introduction................................................................................................................ ...... 8-1 8.1.1 overview.................................................................................................................. .... 8-1 8.1.2 features.................................................................................................................. ...... 8-2 8.2 memory map/register definition ................................................................................... 8-2 8.2.1 register descriptions ................................................................................................... 8- 3 8.2.1.1 ecm ccb address configuration register (eebacr) ........................................ 8-3 8.2.1.2 ecm ccb port configuration register (eebpcr) ............................................... 8-4 8.2.1.3 ecm error detect register (eedr) ....................................................................... 8-5 8.2.1.4 ecm error enable register (eeer) ....................................................................... 8-6 8.2.1.5 ecm error attributes capture register (eeatr) .................................................. 8-7 8.2.1.6 ecm error address capture register (eeadr) .................................................... 8-8 8.3 functional description..................................................................................................... 8 -9 8.3.1 i/o arbiter............................................................................................................... ..... 8-9 8.3.2 ccb arbiter............................................................................................................... .. 8-9 8.3.3 transaction queue ....................................................................................................... 8- 9 8.3.4 global data multiplexor............................................................................................ 8-10 8.3.5 ccb interface ............................................................................................................ 8 -10 8.4 initialization/application information ........................................................................... 8-10 chapter 9 ddr memory controller 9.1 introduction................................................................................................................ ...... 9-1 9.2 features .................................................................................................................... ........ 9-2 9.2.1 modes of operation ..................................................................................................... 9-3 9.3 external signal descriptions ........................................................................................... 9-3 9.3.1 signals overview ......................................................................................................... 9 -3 9.3.2 detailed signal descriptions ....................................................................................... 9-5 9.3.2.1 memory interface signals........................................................................................ 9-5 9.3.2.2 clock interface signals............................................................................................ 9-8 9.3.2.3 debug signals.......................................................................................................... 9 -8
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xiv freescale semiconductor contents paragraph number title page number 9.4 memory map/register definition ................................................................................... 9-9 9.4.1 register descriptions ................................................................................................... 9- 9 9.4.1.1 chip select memory bounds (cs n _bnds).......................................................... 9-10 9.4.1.2 chip select configuration (cs n _config).......................................................... 9-10 9.4.1.3 ddr sdram timing configuration 1 (timing_cfg_1)................................. 9-11 9.4.1.4 ddr sdram timing configuration 2 (timing_cfg_2)................................. 9-13 9.4.1.5 ddr sdram control configuration (ddr_sdram_cfg)............................. 9-14 9.4.1.6 ddr sdram mode configuration (ddr_sdram_mode)............................ 9-16 9.4.1.7 ddr sdram interval configuration (ddr_sdram_interval) ................. 9-16 9.4.1.8 memory data path error injection mask high (data_err_inject_hi) ............................................................................... 9-17 9.4.1.9 memory data path error injection mask low (data_err_inject_lo).............................................................................. 9-18 9.4.1.10 memory data path error injection mask ecc (ecc_err_inject)........................................................................................ 9-18 9.4.1.11 memory data path read capture high (capture_data_hi)......................... 9-19 9.4.1.12 memory data path read capture low (capture_data_lo) ........................ 9-20 9.4.1.13 memory data path read capture ecc (capture_ecc).................................. 9-20 9.4.1.14 memory error detect (err_detect)................................................................ 9-21 9.4.1.15 memory error disable (err_disable)............................................................. 9-21 9.4.1.16 memory error interrupt enable (err_int_en).................................................. 9-22 9.4.1.17 memory error attributes capture (capture_attributes).......................... 9-23 9.4.1.18 memory error address capture (capture_address) .................................. 9-24 9.4.1.19 single-bit ecc memory error management (err_sbe) ................................... 9-25 9.5 functional description................................................................................................... 9-2 5 9.5.1 ddr sdram interface operation............................................................................ 9-30 9.5.1.1 supported ddr sdram organizations............................................................... 9-31 9.5.2 ddr sdram address multiplexing........................................................................ 9-31 9.5.3 jedec standard ddr sdram interface commands ............................................. 9-32 9.5.4 sdram interface timing ......................................................................................... 9-34 9.5.4.1 clock distribution ................................................................................................. 9-38 9.5.5 ddr sdram mode-set command timing............................................................. 9-38 9.5.6 ddr sdram registered dimm mode ................................................................... 9-39 9.5.7 ddr sdram write timing adjustments ................................................................ 9-40 9.5.8 ddr sdram refresh .............................................................................................. 9-41 9.5.8.1 ddr sdram refresh timing.............................................................................. 9-42 9.5.8.2 ddr sdram refresh and power-saving modes ................................................ 9-43 9.5.8.2.1 self-refresh in sleep mode............................................................................... 9-44 9.5.9 ddr data beat ordering........................................................................................... 9-45 9.5.10 page mode and logical bank retention ................................................................... 9-45
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xv contents paragraph number title page number 9.5.11 error checking and correcting (ecc) ...................................................................... 9-46 9.5.12 error management ..................................................................................................... 9-48 9.6 initialization/application information ........................................................................... 9-49 9.6.1 ddr sdram initialization sequence ...................................................................... 9-50 chapter 10 programmable interrupt controller 10.1 introduction............................................................................................................... ..... 10-1 10.1.1 overview................................................................................................................. ... 10-2 10.1.2 features................................................................................................................. ..... 10-3 10.1.3 interrupts to the processor core................................................................................. 10-4 10.1.4 modes of operation ................................................................................................... 10-5 10.1.4.1 mixed mode (gcr[m] = 1) .................................................................................. 10-5 10.1.4.2 pass-through mode (gcr[m] = 0) ...................................................................... 10-6 10.1.5 interrupt sources........................................................................................................ 10-6 10.1.5.1 interrupt routing?mixed mode........................................................................... 10-7 10.1.5.2 internal interrupt sources ...................................................................................... 10-7 10.2 external signal descriptions ......................................................................................... 10-8 10.2.1 signal overview ........................................................................................................ 10 -8 10.2.2 detailed signal descriptions ..................................................................................... 10-8 10.3 memory map/register definition ................................................................................. 10-9 10.3.1 global registers....................................................................................................... 10 -16 10.3.1.1 feature reporting register (frr)....................................................................... 10-16 10.3.1.2 global configuration register (gcr)................................................................. 10-17 10.3.1.3 vendor identification register (vir) .................................................................. 10-17 10.3.1.4 processor initialization register (pir) ................................................................ 10-18 10.3.1.5 ipi vector/priority registers (ipivpr n ) ............................................................. 10-19 10.3.1.6 spurious vector register (svr).......................................................................... 10-19 10.3.2 global timer registers ............................................................................................ 10-20 10.3.2.1 timer frequency reporting register (tfrr)..................................................... 10-20 10.3.2.2 global timer current count registers (gtccr n ) ............................................. 10-21 10.3.2.3 global timer base count registers (gtbcr n ) ................................................. 10-21 10.3.2.4 global timer vector/priority registers (gtvpr n ) ............................................ 10-22 10.3.2.5 global timer destination registers (gtdr n ).................................................... 10-23 10.3.2.6 timer control register (tcr)............................................................................. 10-24 10.3.3 irq_out and critical interrupt summary registers ............................................. 10-26 10.3.3.1 irq_out summary register 0 (irqsr0) ......................................................... 10-26 10.3.3.2 irq_out summary register 1 (irqsr1) ......................................................... 10-27 10.3.3.3 critical interrupt summary register 0 (cisr0).................................................. 10-27
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xvi freescale semiconductor contents paragraph number title page number 10.3.3.4 critical interrupt summary register 1 (cisr1).................................................. 10-28 10.3.4 performance monitor mask registers (pmmrs).................................................... 10-28 10.3.4.1 performance monitor mask register (lower) (pm n mr0)................................. 10-29 10.3.4.2 performance monitor mask registers (upper) (pm n mr1)................................ 10-30 10.3.5 message registers.................................................................................................... 10-3 0 10.3.5.1 message registers (msgr0?msgr3) ............................................................... 10-30 10.3.5.2 message enable register (mer)......................................................................... 10-31 10.3.5.3 message status register (msr) .......................................................................... 10-31 10.3.6 interrupt source configuration registers ................................................................ 10-32 10.3.6.1 external interrupt vector/priority registers (eivpr0?eivpr11) ..................... 10-32 10.3.6.2 external interrupt destination registers (eidr0?eidr11) ............................... 10-33 10.3.6.3 internal interrupt vector/priority registers (iivpr0?iivpr31)......................... 10-34 10.3.6.4 internal interrupt destination registers (iidr0?iidr31) .................................. 10-35 10.3.6.5 messaging interrupt vector/priority registers (mivpr0?mivpr3) ................. 10-36 10.3.6.6 messaging interrupt destination registers (midr0?midr3) ........................... 10-37 10.3.7 per-cpu registers ................................................................................................... 10-38 10.3.7.1 interprocessor interrupt dispatch register (ipidr0?ipidr3) ........................... 10-39 10.3.7.2 processor current task priority register (ctpr)............................................... 10-40 10.3.7.3 who am i register (whoami) ......................................................................... 10-41 10.3.7.4 processor interrupt acknowledge register (iack)............................................ 10-41 10.3.7.5 processor end of interrupt register (eoi) .......................................................... 10-42 10.4 functional description................................................................................................. 10-4 3 10.4.1 flow of interrupt control......................................................................................... 10-43 10.4.1.1 interrupt source priority ...................................................................................... 10-45 10.4.1.2 processor current task priority........................................................................... 10-45 10.4.1.3 interrupt acknowledge ........................................................................................ 10-46 10.4.2 nesting of interrupts ................................................................................................ 10-4 6 10.4.3 processor initialization ............................................................................................ 10-46 10.4.4 spurious vector generation ..................................................................................... 10-46 10.4.5 messaging interrupts................................................................................................ 10-47 10.4.6 global timers .......................................................................................................... 10 -47 10.4.7 reset of the pic ....................................................................................................... 10 -47 10.5 initialization/application information ......................................................................... 10-48 10.5.1 programming guidelines ......................................................................................... 10-48 10.5.1.1 pic registers ....................................................................................................... 10- 48 10.5.1.2 changing interrupt source configuration ........................................................... 10-50 chapter 11 i 2 c interface
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xvii contents paragraph number title page number 11.1 introduction............................................................................................................... ..... 11-1 11.1.1 overview................................................................................................................. ... 11-2 11.1.2 features................................................................................................................. ..... 11-2 11.1.3 modes of operation ................................................................................................... 11-2 11.2 external signal descriptions ......................................................................................... 11-3 11.2.1 signal overview ........................................................................................................ 11 -3 11.2.2 detailed signal descriptions ..................................................................................... 11-3 11.3 memory map/register definition ................................................................................. 11-4 11.3.1 register descriptions ................................................................................................. 11- 4 11.3.1.1 i 2 c address register (i2cadr) ........................................................................... 11-5 11.3.1.2 i 2 c frequency divider register (i2cfdr)........................................................... 11-5 11.3.1.3 i 2 c control register (i2ccr) ............................................................................... 11-6 11.3.1.4 i 2 c status register (i2csr) .................................................................................. 11-7 11.3.1.5 i 2 c data register (i2cdr).................................................................................... 11-9 11.3.1.6 digital filter sampling rate register (i2cdfsrr) ........................................... 11-10 11.4 functional description................................................................................................. 11-1 0 11.4.1 transaction protocol ................................................................................................ 11-10 11.4.1.1 start condition .................................................................................................11-11 11.4.1.2 slave address transmission .................................................................................11-11 11.4.1.3 repeated start condition ................................................................................ 11-12 11.4.1.4 stop condition................................................................................................... 11-12 11.4.1.5 protocol implementation details ......................................................................... 11-13 11.4.1.5.1 transaction monitoring?implementation deta ils.......................................... 11-13 11.4.1.5.2 control transfer?implementation details ..................................................... 11-13 11.4.1.6 address compare?implementation details ....................................................... 11-14 11.4.2 arbitration procedure .............................................................................................. 11-14 11.4.2.1 arbitration control .............................................................................................. 11-15 11.4.3 handshaking ............................................................................................................ 11 -15 11.4.4 clock control........................................................................................................... 1 1-15 11.4.4.1 clock synchronization......................................................................................... 11-16 11.4.4.2 input synchronization and digital filter ............................................................. 11-16 11.4.4.2.1 input signal synchronization .......................................................................... 11-16 11.4.4.2.2 filtering of scl and sda lines ..................................................................... 11-16 11.4.4.3 clock stretching .................................................................................................. 11-17 11.4.5 boot sequencer mode.............................................................................................. 11-17 11.4.5.1 eeprom calling address .................................................................................. 11-17 11.4.5.2 eeprom data format ........................................................................................ 11-18 11.5 initialization/application information ......................................................................... 11-20 11.5.1 initialization sequence............................................................................................. 11-20 11.5.2 generation of start .............................................................................................. 11-21
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xviii freescale semiconductor contents paragraph number title page number 11.5.3 post-transfer software response ............................................................................ 11-21 11.5.4 generation of stop................................................................................................. 11-22 11.5.5 generation of repeated start .............................................................................. 11-22 11.5.6 generation of scl when sda low ....................................................................... 11-22 11.5.7 slave mode interrupt service routine..................................................................... 11-23 11.5.7.1 slave transmitter and received acknowledge ................................................... 11-23 11.5.7.2 loss of arbitration and forcing of slave mode .................................................. 11-23 11.5.8 interrupt service routine flowchart........................................................................ 11-23 chapter 12 duart 12.1 overview................................................................................................................... ..... 12-1 12.1.1 features................................................................................................................. ..... 12-2 12.1.2 modes of operation ................................................................................................... 12-3 12.2 external signal descriptions ......................................................................................... 12-3 12.2.1 signal overview ........................................................................................................ 12 -3 12.2.2 detailed signal descriptions ..................................................................................... 12-3 12.3 memory map/register definition ................................................................................. 12-4 12.3.1 register descriptions ................................................................................................. 12- 6 12.3.1.1 receiver buffer registers (urbr0, urbr1) ...................................................... 12-6 12.3.1.2 transmitter holding registers (uthr0, uthr1) ............................................... 12-6 12.3.1.3 divisor most and least significant byte registers (udmb and udlb).......................................................................................... 12-7 12.3.1.4 interrupt enable register (uier).......................................................................... 12-9 12.3.1.5 interrupt id registers (uiir0, uiir1) ................................................................ 12-10 12.3.1.6 fifo control registers (ufcr0, ufcr1) ......................................................... 12-11 12.3.1.7 line control registers (ulcr0, ulcr1).......................................................... 12-12 12.3.1.8 modem control registers (umcr0, umcr1)................................................ 12-14 12.3.1.9 line status registers (ulsr0, ulsr1) ............................................................. 12-15 12.3.1.10 modem status registers (umsr0, umsr1) ................................................... 12-16 12.3.1.11 scratch registers (uscr0, uscr1) ................................................................... 12-17 12.3.1.12 alternate function registers (uafr0, uafr1) ................................................ 12-17 12.3.1.13 dma status registers (udsr0, udsr1) .......................................................... 12-18 12.4 functional description................................................................................................. 12-2 0 12.4.1 serial interface ......................................................................................................... 12-20 12.4.1.1 start bit ........................................................................................................... 12- 21 12.4.1.2 data transfer ....................................................................................................... 12- 21 12.4.1.3 parity bit ............................................................................................................. . 12-22 12.4.1.4 stop bit.............................................................................................................. 1 2-22
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xix contents paragraph number title page number 12.4.2 baud-rate generator logic ..................................................................................... 12-22 12.4.3 local loop-back mode ........................................................................................... 12-22 12.4.4 errors ................................................................................................................... .... 12-23 12.4.4.1 framing error ...................................................................................................... 12-2 3 12.4.4.2 parity error .......................................................................................................... 1 2-23 12.4.4.3 overrun error....................................................................................................... 12- 23 12.4.5 fifo mode .............................................................................................................. 12 -24 12.4.5.1 fifo interrupts .................................................................................................... 12-2 4 12.4.5.2 dma mode select ............................................................................................... 12-24 12.4.5.3 interrupt control logic........................................................................................ 12-25 12.5 duart initialization/application information .......................................................... 12-25 chapter 13 local bus controller 13.1 introduction............................................................................................................... ..... 13-1 13.1.1 overview................................................................................................................. ... 13-2 13.1.2 features................................................................................................................. ..... 13-2 13.1.3 modes of operation ................................................................................................... 13-3 13.1.3.1 lbc bus clock and clock ratios ......................................................................... 13-4 13.1.3.2 source id debug mode ......................................................................................... 13-4 13.1.4 power-down mode.................................................................................................... 13-4 13.1.5 references............................................................................................................... ... 13-4 13.2 external signal descriptions ......................................................................................... 13-5 13.3 memory map/register definition ................................................................................. 13-9 13.3.1 register descriptions ............................................................................................... 13-10 13.3.1.1 base registers (br0?br7) ................................................................................. 13-11 13.3.1.2 option registers (or0?or7).............................................................................. 13-12 13.3.1.2.1 address mask .................................................................................................. 13-13 13.3.1.2.2 option registers (or n )?gpcm mode ......................................................... 13-14 13.3.1.2.3 option registers (or n )?upm mode ............................................................ 13-16 13.3.1.2.4 option registers (or n )?sdram mode ...................................................... 13-17 13.3.1.3 upm memory address register (mar)............................................................. 13-18 13.3.1.4 upm mode registers (m x mr) ........................................................................... 13-19 13.3.1.5 memory refresh timer prescaler register (mrtpr) ........................................ 13-21 13.3.1.6 upm data register (mdr) ................................................................................. 13-22 13.3.1.7 sdram machine mode register (lsdmr) ...................................................... 13-22 13.3.1.8 upm refresh timer (lurt)............................................................................... 13-24 13.3.1.9 sdram refresh timer (lsrt).......................................................................... 13-25 13.3.1.10 transfer error status register (ltesr).............................................................. 13-26
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xx freescale semiconductor contents paragraph number title page number 13.3.1.11 transfer error check disable register (ltedr)................................................ 13-27 13.3.1.12 transfer error interrupt enable register (lteir) .............................................. 13-28 13.3.1.13 transfer error attributes register (lteatr) ..................................................... 13-29 13.3.1.14 transfer error address register (ltear).......................................................... 13-30 13.3.1.15 local bus configuration register (lbcr) ......................................................... 13-31 13.3.1.16 clock ratio register (lcrr).............................................................................. 13-32 13.4 functional description................................................................................................. 13-3 3 13.4.1 basic architecture.................................................................................................... 13- 34 13.4.1.1 address and addr ess space checking ................................................................ 13-34 13.4.1.2 external address latch enable signal (lale) .................................................. 13-35 13.4.1.3 data transfer acknowledge (ta) ....................................................................... 13-36 13.4.1.4 data buffer control (lbctl)............................................................................. 13-37 13.4.1.5 atomic operation ................................................................................................ 13-37 13.4.1.6 parity generation and checking (ldp)............................................................... 13-38 13.4.1.7 bus monitor ......................................................................................................... 13- 38 13.4.2 general-purpose chip-select machine (gpcm)..................................................... 13-38 13.4.2.1 timing configuration .......................................................................................... 13-39 13.4.2.2 chip-select assertion timing ............................................................................. 13-44 13.4.2.2.1 programmable wait state configuration......................................................... 13-44 13.4.2.2.2 chip-select and write enable negation timing ............................................. 13-44 13.4.2.2.3 relaxed timing ............................................................................................... 13-45 13.4.2.2.4 output enable (loe ) timing.......................................................................... 13-48 13.4.2.2.5 extended hold time on read accesses .......................................................... 13-48 13.4.2.3 external access termination (lgta ) ................................................................. 13-49 13.4.2.4 boot chip-select operation................................................................................. 13-50 13.4.3 sdram machine .................................................................................................... 13-51 13.4.3.1 supported sdram configurations..................................................................... 13-51 13.4.3.2 sdram power-on initialization ........................................................................ 13-52 13.4.3.3 intel pc133 and jedec-standard sdram interface commands ..................... 13-52 13.4.3.4 page hit checking ............................................................................................... 13-53 13.4.3.5 page management................................................................................................ 13-54 13.4.3.6 sdram address multiplexing ........................................................................... 13-54 13.4.3.7 sdram device-specific parameters.................................................................. 13-55 13.4.3.7.1 precharge-to-activate interval......................................................................... 13-55 13.4.3.7.2 activate-to-read/write interval ...................................................................... 13-56 13.4.3.7.3 column address to first data out?cas latency......................................... 13-56 13.4.3.7.4 last data in to precharge?write recovery ................................................... 13-56 13.4.3.7.5 refresh recovery interval (rfrc) ................................................................. 13-57 13.4.3.7.6 external address and command buffers (bufcmd).................................... 13-57 13.4.3.8 sdram interface timing ................................................................................... 13-58
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xxi contents paragraph number title page number 13.4.3.9 sdram read/write transactions....................................................................... 13-60 13.4.3.10 sdram mode-set command timing............................................................ 13-60 13.4.3.11 sdram refresh.................................................................................................. 13-61 13.4.3.11.1 sdram refresh timing ................................................................................. 13-61 13.4.4 user-programmable machines (upms)................................................................... 13-62 13.4.4.1 upm requests ..................................................................................................... 13-63 13.4.4.1.1 memory access requests................................................................................ 13-64 13.4.4.1.2 upm refresh timer requests ......................................................................... 13-65 13.4.4.1.3 software requests?run command ............................................................. 13-65 13.4.4.1.4 exception requests.......................................................................................... 13-66 13.4.4.2 programming the upms ...................................................................................... 13-66 13.4.4.3 upm signal timing............................................................................................. 13-66 13.4.4.4 ram array .......................................................................................................... 13-6 7 13.4.4.4.1 ram words..................................................................................................... 13-68 13.4.4.4.2 chip-select signal timing (cst n ) ................................................................. 13-72 13.4.4.4.3 byte select signal timing (bst n ) .................................................................. 13-72 13.4.4.4.4 general-purpose signals (g n t n , go n )........................................................... 13-73 13.4.4.4.5 loop control (loop) ..................................................................................... 13-73 13.4.4.4.6 repeat execution of current ram word (redo)......................................... 13-74 13.4.4.4.7 address multiplexing (amx) ......................................................................... 13-74 13.4.4.4.8 data valid and data sample control (uta) ................................................... 13-75 13.4.4.4.9 lgpl[0:5] signal negation (last) ............................................................... 13-76 13.4.4.4.10 wait mechanism (waen) ............................................................................... 13-76 13.4.4.5 synchronous sampling of lupwait for early transfer acknowledge ............ 13-77 13.4.4.6 extended hold time on read accesses .............................................................. 13-77 13.4.4.7 memory system interface example using upm ................................................ 13-78 13.5 initialization/application information ......................................................................... 13-84 13.5.1 interfacing to peripherals......................................................................................... 13-84 13.5.1.1 multiplexed address/data bus and unmultiplexed address signals ................. 13-84 13.5.1.2 peripheral hierarchy on the local bus................................................................ 13-84 13.5.1.3 peripheral hierarchy on the local bus for very high bus speeds..................... 13-85 13.5.1.4 gpcm timings.................................................................................................... 13-86 13.5.2 bus turnaround ....................................................................................................... 13-8 7 13.5.2.1 address phase after previous read .................................................................... 13-87 13.5.2.2 read data phase after address phase ................................................................ 13-88 13.5.2.3 read-modify-write cycle for parity protected memory banks ......................... 13-88 13.5.2.4 upm cycles with additional address phases..................................................... 13-88 13.5.3 interface to different port-size devices.................................................................. 13-88 13.5.4 interfacing to sdram............................................................................................. 13-90 13.5.4.1 basic sdram capabilities of the local bus...................................................... 13-90
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xxii freescale semiconductor contents paragraph number title page number 13.5.4.2 maximum amount of sdram supported.......................................................... 13-91 13.5.4.3 sdram machine limitations............................................................................. 13-92 13.5.4.3.1 analysis of maximum row number due to bank select multiplexing ................................................................................................ 13-92 13.5.4.3.2 bank select signals ......................................................................................... 13-92 13.5.4.3.3 128-mbyte sdram ........................................................................................ 13-92 13.5.4.3.4 256-mbyte sdram ........................................................................................ 13-95 13.5.4.3.5 512-mbyte sdram ........................................................................................ 13-95 13.5.4.3.6 power-down mode.......................................................................................... 13-97 13.5.4.3.7 self-refresh ..................................................................................................... 13-9 7 13.5.4.3.8 sdram timing .............................................................................................. 13-99 13.5.4.4 parity support for sdram ............................................................................... 13-101 13.5.5 interfacing to zbt sram ..................................................................................... 13-101 13.5.6 interfacing to dsp host ports................................................................................ 13-103 13.5.6.1 interfacing to msc8101 hdi16 ........................................................................ 13-103 13.5.6.1.1 hdi16 peripherals ......................................................................................... 13-103 13.5.6.1.2 physical interconnections .............................................................................. 13-105 13.5.6.1.3 supporting burst transfers............................................................................ 13-106 13.5.6.1.4 host 60x bus: hdi16 peripheral interface hardware timings..................... 13-107 13.5.6.2 interfacing to msc8102 dsi............................................................................. 13-107 13.5.6.2.1 dsi in asynchronous sram-like mode ..................................................... 13-108 13.5.6.2.2 dsi in synchronous mode ............................................................................ 13-110 13.5.6.2.3 broadcast accesses........................................................................................ 13-118 13.5.6.3 interfacing to ehpi from texas instruments tms320cxxxx dsps ................. 13-118 13.5.6.3.1 expansion to multiple dsps.......................................................................... 13-121 chapter 14 three-speed ethernet controllers 14.1 introduction............................................................................................................... ..... 14-1 14.1.1 three-speed ethernet controller overview .............................................................. 14-7 14.2 features ................................................................................................................... ....... 14-7 14.3 modes of operation ....................................................................................................... 14 -8 14.4 external signal descriptions ......................................................................................... 14-9 14.4.1 detailed signal descriptions ................................................................................... 14-10 14.5 memory map/register definition ............................................................................... 14-13 14.5.1 top-level module memory map ............................................................................ 14-13 14.5.2 detailed memory map?control/status registers.................................................. 14-14 14.5.3 memory-mapped register descriptions.................................................................. 14-20 14.5.3.1 tsec general control and status registers ....................................................... 14-20
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xxiii contents paragraph number title page number 14.5.3.1.1 interrupt event register (ievent) ................................................................ 14-20 14.5.3.1.2 interrupt mask register (imask) .................................................................. 14-23 14.5.3.1.3 error disabled register (edis)....................................................................... 14-24 14.5.3.1.4 ethernet control register (ecntrl) ............................................................. 14-25 14.5.3.1.5 minimum frame length register (minflr)................................................. 14-26 14.5.3.1.6 pause time value register (ptv) ................................................................... 14-27 14.5.3.1.7 dma control register (dmactrl) ............................................................. 14-28 14.5.3.1.8 tbi physical address register (tbipa) ......................................................... 14-29 14.5.3.2 tsec fifo control and status registers ........................................................... 14-30 14.5.3.2.1 fifo pause control register (fifo_pause_ctrl) ................................... 14-30 14.5.3.2.2 fifo transmit threshold register (fifo_tx_thr) .................................... 14-31 14.5.3.2.3 fifo transmit starve register (fifo_tx_starve) ................................... 14-32 14.5.3.2.4 fifo transmit starve shutoff register (fifo_tx_starve_shutoff).............................................................. 14-32 14.5.3.3 tsec transmit control and status registers...................................................... 14-33 14.5.3.3.1 transmit control register (tctrl) ............................................................... 14-33 14.5.3.3.2 transmit status register (tstat) .................................................................. 14-34 14.5.3.3.3 txbd data length register (tbdlen)......................................................... 14-35 14.5.3.3.4 transmit interrupt coalescing configuration register (txic) ...................... 14-35 14.5.3.3.5 current transmit buffer descriptor pointer register (ctbptr) ................... 14-36 14.5.3.3.6 transmit buffer descriptor pointer register (tbptr) ................................... 14-37 14.5.3.3.7 transmit descriptor base address register (tbase) ................................... 14-37 14.5.3.3.8 out-of-sequence txbd register (ostbd).................................................... 14-38 14.5.3.3.9 out-of-sequence tx data buffer pointer register (ostbdp)....................... 14-40 14.5.3.4 tsec receive control and status registers ....................................................... 14-40 14.5.3.4.1 receive control register (rctrl) ................................................................ 14-41 14.5.3.4.2 receive status register (rstat).................................................................... 14-41 14.5.3.4.3 rxbd data length register (rbdlen) ........................................................ 14-42 14.5.3.4.4 receive interrupt coalescing configuration register (rxic)........................ 14-43 14.5.3.4.5 current receive buffer descriptor pointer register (crbptr) .................... 14-44 14.5.3.4.6 maximum receive buffer length register (mrblr) ................................... 14-44 14.5.3.4.7 receive buffer descriptor pointer register (rbptr) .................................... 14-45 14.5.3.4.8 receive descriptor base address register (rbase)..................................... 14-45 14.5.3.5 mac functionality.............................................................................................. 14-46 14.5.3.5.1 configuring the mac...................................................................................... 14-46 14.5.3.5.2 controlling csma/cd.................................................................................... 14-46 14.5.3.5.3 handling packet collisions ............................................................................. 14-47 14.5.3.5.4 controlling packet flow .................................................................................. 14-47 14.5.3.5.5 controlling phy links.................................................................................... 14-48 14.5.3.6 mac registers .................................................................................................... 14-49
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xxiv freescale semiconductor contents paragraph number title page number 14.5.3.6.1 mac configuration register 1 (maccfg1)................................................. 14-49 14.5.3.6.2 mac configuration register 2 (maccfg2)................................................. 14-51 14.5.3.6.3 inter-packet gap/inter-frame gap register (ipgifg) ................................... 14-52 14.5.3.6.4 half-duplex register (hafdup) ................................................................... 14-53 14.5.3.6.5 maximum frame length register (maxfrm) ............................................. 14-54 14.5.3.6.6 mii management configuration register (miimcfg) .................................. 14-54 14.5.3.6.7 mii management command register (miimcom)....................................... 14-55 14.5.3.6.8 mii management address register (miimadd)........................................... 14-56 14.5.3.6.9 mii management control register (miimcon)............................................ 14-57 14.5.3.6.10 mii management status register (miimstat) ............................................. 14-57 14.5.3.6.11 mii management indicator register (miimind)........................................... 14-58 14.5.3.6.12 interface status register (ifstat) ................................................................. 14-58 14.5.3.6.13 station address register part 1 (macstnaddr1) ..................................... 14-59 14.5.3.6.14 station address register part 2 (macstnaddr2) ..................................... 14-60 14.5.3.7 mib registers ...................................................................................................... 14-6 0 14.5.3.7.1 transmit and receive 64-byte frame counter register (tr64) .................... 14-61 14.5.3.7.2 transmit and receive 65- to 127-byte frame counter register (tr127) ....................................................................................................... 14-61 14.5.3.7.3 transmit and receive 128- to 255-byte frame counter register (tr255) ....................................................................................................... 14-62 14.5.3.7.4 transmit and receive 256- to 511-byte frame counter register (tr511)........................................................................................................ 14-62 14.5.3.7.5 transmit and receive 512- to 1023-byte frame counter register (tr1k) ........................................................................................................ 14-63 14.5.3.7.6 transmit and receive 1024- to 1518-byte frame counter register (trmax) .................................................................................................... 14-63 14.5.3.7.7 transmit and receive 1519- to 1522-byte vlan frame counter register (trmgv)...................................................................................... 14-64 14.5.3.7.8 receive byte counter register (rbyt) ......................................................... 14-64 14.5.3.7.9 receive packet counter register (rpkt)....................................................... 14-65 14.5.3.7.10 receive fcs error counter register (rfcs) ................................................. 14-65 14.5.3.7.11 receive multicast packet counter register (rmca) ..................................... 14-66 14.5.3.7.12 receive broadcast packet counter register (rbca) ..................................... 14-66 14.5.3.7.13 receive control frame packet counter register (rxcf) .............................. 14-67 14.5.3.7.14 receive pause frame packet counter register (rxpf) ................................. 14-67 14.5.3.7.15 receive unknown opcode packet counter register (rxuo) ....................... 14-68 14.5.3.7.16 receive alignment error counter register (raln) ...................................... 14-68 14.5.3.7.17 receive frame length error counter register (rflr) ................................. 14-69 14.5.3.7.18 receive code error counter register (rcde)............................................... 14-69 14.5.3.7.19 receive carrier sense error counter register (rcse) .................................. 14-70
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xxv contents paragraph number title page number 14.5.3.7.20 receive undersize packet counter register (rund) .................................... 14-70 14.5.3.7.21 receive oversize packet counter register (rovr) ...................................... 14-71 14.5.3.7.22 receive fragments counter register (rfrg) ................................................ 14-71 14.5.3.7.23 receive jabber counter register (rjbr) ....................................................... 14-72 14.5.3.7.24 receive dropped packet counter register (rdrp) ....................................... 14-72 14.5.3.7.25 transmit byte counter register (tbyt) ........................................................ 14-73 14.5.3.7.26 transmit packet counter register (tpkt) ..................................................... 14-73 14.5.3.7.27 transmit multicast packet counter register (tmca).................................... 14-74 14.5.3.7.28 transmit broadcast packet counter register (tbca).................................... 14-74 14.5.3.7.29 transmit pause control frame counter register (txpf) .............................. 14-75 14.5.3.7.30 transmit deferral packet counter register (tdfr)....................................... 14-75 14.5.3.7.31 transmit excessive deferral packet counter register (tedf) ...................... 14-76 14.5.3.7.32 transmit single collision packet counter register (tscl)........................... 14-76 14.5.3.7.33 transmit multiple collision packet counter register (tmcl)...................... 14-77 14.5.3.7.34 transmit late collision packet counter register (tlcl).............................. 14-77 14.5.3.7.35 transmit excessive collision packet counter register (txcl) .................... 14-78 14.5.3.7.36 transmit total collision counter register (tncl)........................................ 14-78 14.5.3.7.37 transmit drop frame counter register (tdrp) ............................................ 14-79 14.5.3.7.38 transmit jabber frame counter register (tjbr) ........................................... 14-79 14.5.3.7.39 transmit fcs error counter register (tfcs) ................................................ 14-80 14.5.3.7.40 transmit control frame counter register (txcf) ........................................ 14-80 14.5.3.7.41 transmit oversize frame counter register (tovr)...................................... 14-81 14.5.3.7.42 transmit undersize frame counter register (tund) ................................... 14-81 14.5.3.7.43 transmit fragment counter register (tfrg) ................................................ 14-82 14.5.3.7.44 carry register 1 (car1) ................................................................................. 14-82 14.5.3.7.45 carry register 2 (car2) ................................................................................. 14-84 14.5.3.7.46 carry mask register 1 (cam1) ...................................................................... 14-85 14.5.3.7.47 carry mask register 2 (cam2) ...................................................................... 14-86 14.5.3.8 hash function registers ...................................................................................... 14-87 14.5.3.8.1 individual address registers 0?7 (iaddr n ) ................................................. 14-88 14.5.3.8.2 group address registers 0?7 (gaddr n ) ...................................................... 14-88 14.5.3.9 attribute registers ............................................................................................... 14-89 14.5.3.9.1 attribute register (attr)............................................................................... 14-89 14.5.3.9.2 attribute extract length and extract index register (attreli) .................. 14-90 14.5.4 ten-bit interface (tbi) ............................................................................................ 14-91 14.5.4.1 tbi mii set register descriptions ...................................................................... 14-91 14.5.4.2 control register (cr).......................................................................................... 14-92 14.5.4.3 status register (sr) ........................................................................................... 14-93 14.5.4.4 an advertisement register (ana) .................................................................... 14-94 14.5.4.5 an link partner base page ability register (anlpbpa)................................. 14-96
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xxvi freescale semiconductor contents paragraph number title page number 14.5.4.6 an expansion register (anex)......................................................................... 14-98 14.5.4.7 an next page transmit register (annpt)........................................................ 14-98 14.5.4.8 an link partner ability next page register (anlpanp) ................................ 14-99 14.5.4.9 extended status register (exst) ..................................................................... 14-100 14.5.4.10 jitter diagnostics register (jd) ......................................................................... 14-101 14.5.4.11 tbi control register (tbicon)....................................................................... 14-102 14.6 functional description............................................................................................... 14-103 14.6.1 connecting to physical interfaces.......................................................................... 14-103 14.6.1.1 media-independent interface (mii) ................................................................... 14-104 14.6.1.2 gigabit media-independent interface (gmii) ................................................... 14-104 14.6.1.3 reduced gigabit media-independent interface (rgmii) ................................. 14-105 14.6.1.4 ten-bit interface (tbi)...................................................................................... 14-106 14.6.1.5 reduced ten-bit interface (rtbi) .................................................................... 14-107 14.6.2 gigabit ethernet channel operation.......................................................................14-111 14.6.2.1 initialization sequence........................................................................................14-111 14.6.2.1.1 hardware-controlled initialization.................................................................14-111 14.6.2.1.2 user initialization ...........................................................................................14-111 14.6.2.2 soft reset and reconfiguring procedure........................................................... 14-112 14.6.2.3 gigabit ethernet frame transmission ............................................................... 14-113 14.6.2.4 gigabit ethernet frame reception .................................................................... 14-115 14.6.2.5 rmon support.................................................................................................. 14-116 14.6.2.6 frame recognition............................................................................................. 14-116 14.6.2.6.1 destination address recognition .................................................................. 14-116 14.6.2.6.2 hash table algorithm.................................................................................... 14-118 14.6.2.6.3 crc computation examples ........................................................................ 14-118 14.6.2.7 flow control...................................................................................................... 14-11 9 14.6.2.8 interrupt handling ............................................................................................. 14-120 14.6.2.8.1 interrupt coalescing ...................................................................................... 14-121 14.6.2.8.2 interrupt coalescing by frame count threshold.......................................... 14-122 14.6.2.8.3 interrupt coalescing by timer threshold ..................................................... 14-122 14.6.2.9 inter-packet gap time ....................................................................................... 14-123 14.6.2.10 internal and external loop back ....................................................................... 14-123 14.6.2.11 error-handling procedure.................................................................................. 14-123 14.6.3 buffer descriptors.................................................................................................. 14-12 5 14.6.3.1 transmit data buffer descriptor (txbd).......................................................... 14-126 14.6.3.2 receive buffer descriptor (rxbd) ................................................................... 14-128 14.6.4 data extraction to the l2 cache............................................................................ 14-130 14.7 initialization/application information ....................................................................... 14-131 14.7.1 interface mode configuration ............................................................................... 14-131 14.7.1.1 mii interface mode............................................................................................ 14-131
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xxvii contents paragraph number title page number 14.7.1.2 gmii interface mode......................................................................................... 14-135 14.7.1.3 tbi interface mode ........................................................................................... 14-138 14.7.1.4 rgmii interface mode ...................................................................................... 14-143 14.7.1.5 rtbi interface mode ......................................................................................... 14-147 chapter 15 dma controller 15.1 introduction............................................................................................................... ..... 15-1 15.1.1 block diagram........................................................................................................... 1 5-1 15.1.2 overview................................................................................................................. ... 15-1 15.1.3 features................................................................................................................. ..... 15-2 15.1.4 modes of operation ................................................................................................... 15-2 15.2 external signal descriptions ......................................................................................... 15-5 15.2.1 signal overview ........................................................................................................ 15 -5 15.2.2 detailed signal descriptions ..................................................................................... 15-6 15.3 memory map/register definition ................................................................................. 15-6 15.3.1 module memory map................................................................................................ 15-7 15.3.2 dma register descriptions..................................................................................... 15-10 15.3.2.1 mode registers (mr n ) ........................................................................................ 15-10 15.3.2.2 status registers (sr n ) ......................................................................................... 15-13 15.3.2.3 current link descriptor address registers (clndar n )................................... 15-14 15.3.2.4 source attributes registers (satr n ).................................................................. 15-16 15.3.2.5 source address registers (sar n )....................................................................... 15-18 15.3.2.5.1 source address registers for rapidio maintenance reads (sar n )......................................................................................................... 15-19 15.3.2.6 destination attributes registers (datr n ).......................................................... 15-19 15.3.2.7 destination address registers (dar n )............................................................... 15-21 15.3.2.7.1 destination address registers for rapidio maintenance writes (dar n ) ........................................................................................................ 15-22 15.3.2.8 byte count registers (bcr n ) ............................................................................. 15-23 15.3.2.9 next link descriptor address registers (nlndar n )....................................... 15-23 15.3.2.10 current list descriptor address registers (clsdar n )..................................... 15-24 15.3.2.11 next list descriptor address registers (nlsdar n )......................................... 15-25 15.3.2.12 source stride registers (ssr n ) ........................................................................... 15-25 15.3.2.13 destination stride registers (dsr n ) ................................................................... 15-26 15.3.2.14 dma general status register (dgsr) ............................................................... 15-26 15.4 functional description................................................................................................. 15-2 8 15.4.1 dma channel operation......................................................................................... 15-28 15.4.1.1 basic dma mode transfer ................................................................................. 15-29
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xxviii freescale semiconductor contents paragraph number title page number 15.4.1.1.1 basic direct mode ........................................................................................... 15-29 15.4.1.1.2 basic direct single-write start mode ............................................................. 15-30 15.4.1.1.3 basic chaining mode ...................................................................................... 15-31 15.4.1.1.4 basic chaining single-write start mode ........................................................ 15-31 15.4.1.2 extended dma mode transfer ........................................................................... 15-32 15.4.1.2.1 extended direct mode..................................................................................... 15-32 15.4.1.2.2 extended direct single-write start mode....................................................... 15-32 15.4.1.2.3 extended chaining mode ................................................................................ 15-32 15.4.1.2.4 extended chaining single-write start mode .................................................. 15-33 15.4.1.3 external control mode transfer.......................................................................... 15-33 15.4.1.4 channel continue mode for cascading transfer chains .................................... 15-34 15.4.1.4.1 basic mode ...................................................................................................... 15-35 15.4.1.4.2 extended mode................................................................................................ 15-35 15.4.1.5 channel abort...................................................................................................... 15-3 5 15.4.1.6 bandwidth control............................................................................................... 15-36 15.4.1.7 channel state ....................................................................................................... 15- 36 15.4.1.8 illustration of stride size and stride distance..................................................... 15-36 15.4.2 dma transfer interfaces ......................................................................................... 15-37 15.4.3 dma errors ............................................................................................................. 15 -37 15.4.4 dma descriptors..................................................................................................... 15-37 15.4.5 limitations and restrictions .................................................................................... 15-40 15.5 dma system considerations ...................................................................................... 15-41 15.5.1 unusual dma scenarios ......................................................................................... 15-43 15.5.1.1 dma to e500 core .............................................................................................. 15-43 15.5.1.2 dma to ethernet ................................................................................................. 15-44 15.5.1.3 dma to configuration and control registers..................................................... 15-44 15.5.1.4 dma to i 2 c ......................................................................................................... 15-44 15.5.1.5 dma to duart ................................................................................................. 15-44 chapter 16 pci/pci-x bus interface 16.1 introduction............................................................................................................... ..... 16-1 16.1.1 overview................................................................................................................. ... 16-2 16.1.1.1 MPC8540 as a pci/x initiator............................................................................... 16-3 16.1.1.2 MPC8540 as a pci/x target ................................................................................. 16-4 16.1.2 features................................................................................................................. ..... 16-4 16.1.3 modes of operation ................................................................................................... 16-5 16.1.3.1 host/agent modes ................................................................................................. 16-5 16.1.3.1.1 host mode ......................................................................................................... 16- 6
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xxix contents paragraph number title page number 16.1.3.1.2 agent mode ....................................................................................................... 16-6 16.1.3.1.3 agent configuration lock mode ...................................................................... 16-6 16.1.3.2 pci/x bus width (64-/32-bit bus) ....................................................................... 16-6 16.1.3.3 pci/x arbiter (internal/external arbiter) ............................................................. 16-6 16.1.3.4 pci/x bus mode.................................................................................................... 16-6 16.1.3.5 pci/x signal output hold timing ........................................................................ 16-6 16.1.3.6 pci/x impedance................................................................................................... 16-7 16.2 external signal descriptions ......................................................................................... 16-7 16.3 memory map/register definitions .............................................................................. 16-15 16.3.1 pci/x memory mapped registers .......................................................................... 16-15 16.3.1.1 pci/x configuration access registers ............................................................... 16-18 16.3.1.1.1 pci/x configuration address register (cfg_addr) .................................. 16-18 16.3.1.1.2 pci/x configuration data register (cfg_data)......................................... 16-19 16.3.1.1.3 pci/x interrupt acknowledge register (int_ack)...................................... 16-20 16.3.1.2 pci/x atmu outbound registers...................................................................... 16-20 16.3.1.2.1 pci/x outbound translation address registers (potar n ) .......................... 16-21 16.3.1.2.2 pci/x outbound translation extended address registers (potear n ) ................................................................................................. 16-21 16.3.1.2.3 pci/x outbound window base address registers (powbar n ).................. 16-22 16.3.1.2.4 pci/x outbound window attributes registers (powar n )........................... 16-22 16.3.1.3 pci/x atmu inbound registers......................................................................... 16-24 16.3.1.3.1 pci/x inbound translation address registers (pitar n )............................... 16-25 16.3.1.3.2 pci/x inbound window base address registers (piwbar n ) ...................... 16-25 16.3.1.3.3 pci/x inbound window base extended address registers (piwbear n ) .............................................................................................. 16-26 16.3.1.3.4 pci/x inbound window attributes registers (piwar n ) ............................... 16-26 16.3.1.4 pci/x error management registers .................................................................... 16-28 16.3.1.4.1 pci/x error detect register (err_dr)......................................................... 16-29 16.3.1.4.2 pci/x error capture disable register (err_cap_dr)................................ 16-30 16.3.1.4.3 pci/x error enable register (err_en) ........................................................ 16-31 16.3.1.4.4 pci/x error attributes capture register (err_attrib) ............................. 16-32 16.3.1.4.5 pci/x error address capture register (err_addr)................................... 16-33 16.3.1.4.6 pci/x error extended address capture register (err_ext_addr).................................................................................... 16-34 16.3.1.4.7 pci/x error data low capture register (err_dl) ...................................... 16-34 16.3.1.4.8 pci/x error data high capture register (err_dh)..................................... 16-34 16.3.1.4.9 pci/x gasket timer register (gas_timr) .................................................. 16-35 16.3.1.4.10 pci-x split completion timer register (pcix_timr)................................. 16-36 16.3.2 pci/x configuration header ................................................................................... 16-36 16.3.2.1 pci vendor id register?offset 0x00 ................................................................ 16-37
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xxx freescale semiconductor contents paragraph number title page number 16.3.2.2 pci device id register?offset 0x02 ................................................................ 16-38 16.3.2.3 pci bus command register?offset 0x04 ......................................................... 16-38 16.3.2.4 pci bus status register?offset 0x06................................................................ 16-40 16.3.2.5 pci revision id register?offset 0x08 ............................................................. 16-41 16.3.2.6 pci bus programming interface register?offset 0x09 .................................... 16-41 16.3.2.7 pci subclass code register?offset 0x0a......................................................... 16-42 16.3.2.8 pci bus base class code register?offset 0x0b .............................................. 16-42 16.3.2.9 pci bus cache line size register?offset 0x0c............................................... 16-43 16.3.2.10 pci bus latency timer register?0x0d ............................................................ 16-43 16.3.2.11 pci base address registers ................................................................................ 16-43 16.3.2.12 pci subsystem vendor id register..................................................................... 16-46 16.3.2.13 pci subsystem id register ................................................................................. 16-46 16.3.2.14 pci bus capabilities pointer register ................................................................. 16-47 16.3.2.15 pci bus interrupt line register .......................................................................... 16-47 16.3.2.16 pci bus interrupt pin register ............................................................................ 16-48 16.3.2.17 pci bus minimum grant (min_gnt) register................................................. 16-48 16.3.2.18 pci bus maximum latency (max_lat) register............................................ 16-49 16.3.2.19 pci bus function register (pbfr) ..................................................................... 16-49 16.3.2.20 pci bus arbiter configuration register (pbacr)............................................. 16-50 16.3.2.21 pci-x next capabilities id register?0x60 ...................................................... 16-51 16.3.2.22 pci-x capability pointer register?0x61 .......................................................... 16-51 16.3.2.23 pci-x command register?0x62 ....................................................................... 16-52 16.3.2.24 pci-x status register?0x64.............................................................................. 16-52 16.4 functional description................................................................................................. 16-5 3 16.4.1 pci/x bus arbitration ............................................................................................. 16-53 16.4.1.1 pci/x bus arbiter operation .............................................................................. 16-54 16.4.1.2 pci/x bus parking .............................................................................................. 16-56 16.4.1.3 broken master lock-out (pci only) ................................................................... 16-56 16.4.1.4 power-saving modes and the pci arbiter .......................................................... 16-56 16.4.2 pci bus protocol ..................................................................................................... 16-5 6 16.4.2.1 basic transfer control......................................................................................... 16-57 16.4.2.2 pci bus commands............................................................................................. 16-57 16.4.2.3 addressing ........................................................................................................... 16 -59 16.4.2.3.1 memory space addressing.............................................................................. 16-59 16.4.2.3.2 i/o space addre ssing ...................................................................................... 16-60 16.4.2.3.3 configuration space addressing ..................................................................... 16-60 16.4.2.4 device selection .................................................................................................. 16-60 16.4.2.5 byte alignment.................................................................................................... 16-61 16.4.2.6 bus driving and turnaround ............................................................................... 16-61 16.4.2.7 pci bus transactions........................................................................................... 16-61
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xxxi contents paragraph number title page number 16.4.2.7.1 pci read transactions .................................................................................... 16-62 16.4.2.7.2 pci write transactions.................................................................................... 16-63 16.4.2.8 transaction termination ...................................................................................... 16-64 16.4.2.8.1 master-initiated termination ........................................................................... 16-65 16.4.2.8.2 target-initiated termination ............................................................................ 16-65 16.4.2.9 fast back-to-back transactions .......................................................................... 16-68 16.4.2.10 dual address cycles............................................................................................ 16-68 16.4.2.11 configuration cycles ........................................................................................... 16-70 16.4.2.11.1 pci configuration space header .................................................................... 16-71 16.4.2.11.2 accessing the pci configuration space in host mode................................... 16-72 16.4.2.11.3 pci configuration in agent and agent lock modes ...................................... 16-74 16.4.2.11.4 pci type 0 configuration translation............................................................. 16-74 16.4.2.11.5 type 1 configuration translation.................................................................... 16-76 16.4.2.12 other bus transactions........................................................................................ 16-76 16.4.2.12.1 interrupt-acknowledge transactions .............................................................. 16-76 16.4.2.12.2 special-cycle transactions ............................................................................. 16-77 16.4.2.13 pci error functions ............................................................................................. 16-78 16.4.2.13.1 pci parity ........................................................................................................ 16 -78 16.4.2.13.2 error reporting................................................................................................ 16-79 16.4.3 pci-x bus protocol ................................................................................................. 16-81 16.4.3.1 pci-x terminology ............................................................................................. 16-81 16.4.3.2 pci-x command encodings ............................................................................... 16-82 16.4.3.3 pci-x attribute phase ......................................................................................... 16-83 16.4.3.4 pci-x transactions.............................................................................................. 16-84 16.4.3.5 pci-x wait state and termination rules ............................................................ 16-88 16.4.3.6 pci-x split transactions ..................................................................................... 16-89 16.4.3.6.1 split response ................................................................................................. 16-89 16.4.3.6.2 completion address ........................................................................................ 16-90 16.4.3.6.3 completer attributes ....................................................................................... 16-91 16.4.3.6.4 split completion messages ............................................................................. 16-92 16.4.3.7 pci-x configuration transactions ...................................................................... 16-93 16.4.3.8 pci-x error functions......................................................................................... 16-96 16.4.3.8.1 error reporting................................................................................................ 16-96 16.5 initialization/application information ......................................................................... 16-99 16.5.1 power-on reset configuration modes.................................................................... 16-99 16.5.1.1 host mode ......................................................................................................... 16-10 0 16.5.1.2 agent mode ....................................................................................................... 16-100 16.5.1.3 agent configuration lock mode....................................................................... 16-100 16.5.2 nonposted writes in pci-x ................................................................................... 16-100 16.5.3 pci-x outbound read transaction alignment ..................................................... 16-101
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xxxii freescale semiconductor contents paragraph number title page number 16.5.4 pci-x inbound reads that cross window boundaries ......................................... 16-101 16.5.5 bridging between rapidio and pci/x ................................................................. 16-101 chapter 17 rapidio interface 17.1 introduction............................................................................................................... ..... 17-1 17.1.1 overview................................................................................................................. ... 17-1 17.1.2 rapidio terminology ................................................................................................ 17-4 17.1.3 rapidio interface features ........................................................................................ 17-4 17.1.3.1 supported features ................................................................................................ 17-4 17.1.3.2 features not implemented..................................................................................... 17-5 17.1.4 rapidio modes of operation .................................................................................... 17-5 17.1.4.1 transmit clock-select mode ................................................................................. 17-5 17.1.4.2 crc checking modes ........................................................................................... 17-5 17.1.4.3 error checking disable mode ............................................................................... 17-6 17.1.4.4 output port enable mode ...................................................................................... 17-6 17.1.4.5 output port driver disable mode.......................................................................... 17-6 17.1.4.6 accept all mode.................................................................................................... 17-6 17.1.4.7 packet response time-out disable mode ............................................................ 17-6 17.1.4.8 link response time-out disable mode ............................................................... 17-6 17.2 external signal descriptions ......................................................................................... 17-7 17.2.1 signals overview ....................................................................................................... 17 -7 17.2.2 detailed signal descriptions ..................................................................................... 17-8 17.3 memory map/register definition ................................................................................. 17-9 17.3.1 architectural registers ............................................................................................ 17-13 17.3.1.1 device identity capability register (didcar).................................................. 17-13 17.3.1.2 device information capability register (dicar).............................................. 17-14 17.3.1.3 assembly identity capability register (aidcar) ............................................. 17-14 17.3.1.4 assembly information capability register (aicar) ......................................... 17-15 17.3.1.5 processing element features capability register (pefcar) ............................ 17-15 17.3.1.6 switch port information capability register (spicar)..................................... 17-17 17.3.1.7 source operations capability register (socar)............................................... 17-17 17.3.1.8 destination operations capability register (docar)....................................... 17-19 17.3.1.9 mailbox command and status register (msr) .................................................. 17-22 17.3.1.10 port-write and doorbell command and status register (pwdcsr)................. 17-22 17.3.1.11 processing element logic layer control command and status register (pellccsr) .................................................................................... 17-24 17.3.1.12 local configuration space base address 1 command and status register (lcsba1csr).................................................................................. 17-24
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xxxiii contents paragraph number title page number 17.3.1.13 base device id command and status register (bdidcsr) ............................. 17-25 17.3.1.14 host base device id lock command and status register (hbdidlcsr)................................................................................................ 17-26 17.3.1.15 component tag command and status register (ctcsr).................................. 17-26 17.3.1.16 8/16 lp-lvds port maintenance block header 0 command and status register (pmbh0csr)......................................................................... 17-27 17.3.1.17 port link time-out control command and status register (pltoccsr)................................................................................................... 17-27 17.3.1.18 port response time-out control command and status register (prtoccsr) .................................................................................................. 17-28 17.3.1.19 port general control command and status register (pgccsr) ....................... 17-29 17.3.1.20 port link maintenance request command and status register (plmreqcsr)............................................................................................... 17-29 17.3.1.21 port link maintenance response command and status register (plmrespcsr) ............................................................................................. 17-30 17.3.1.22 port local ackid status command and status register (plascsr) ............... 17-31 17.3.1.23 port error and status command and status register (pescsr) ........................ 17-31 17.3.1.24 port control command and status register (pccsr)........................................ 17-33 17.3.2 implementation registers ........................................................................................ 17-34 17.3.2.1 general registers................................................................................................. 17-34 17.3.2.1.1 configuration register (cr) ........................................................................... 17-34 17.3.2.1.2 port configuration register (pcr).................................................................. 17-35 17.3.2.1.3 port error injection register (peir) ............................................................... 17-35 17.3.2.2 atmu registers .................................................................................................. 17-36 17.3.2.2.1 rapidio outbound window translation address registers 0?8 (rowtar n ) ............................................................................................... 17-37 17.3.2.2.2 rapidio outbound window base address registers 1?8 (rowbar n ) ............................................................................................... 17-38 17.3.2.2.3 rapidio outbound window attributes registers 0?8 (rowar n )................ 17-39 17.3.2.2.4 rapidio inbound window translation address registers 0?4 (riwtar n ) ................................................................................................. 17-40 17.3.2.2.5 rapidio inbound window base address registers 1?4 (riwbar n ) ................................................................................................ 17-41 17.3.2.2.6 rapidio inbound window attributes registers 0?4 (riwar n ) .................... 17-42 17.3.2.3 error management registers ............................................................................... 17-43 17.3.2.3.1 port notification/fatal error detect register (pnfedr)............................... 17-44 17.3.2.3.2 port notification/fatal error detect disable register (pnfedir) .................................................................................................. 17-47 17.3.2.3.3 port notification/fatal error interrupt enable register (pnfeier) .................................................................................................. 17-49
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xxxiv freescale semiconductor contents paragraph number title page number 17.3.2.3.4 port error capture status register (pecsr) .................................................. 17-52 17.3.2.3.5 error packet capture register 0 (epcr0) ...................................................... 17-52 17.3.2.3.6 error packet capture register 1 (epcr1) ...................................................... 17-53 17.3.2.3.7 epcr1?type 1 packet format ...................................................................... 17-53 17.3.2.3.8 epcr1?type 2 packet format ...................................................................... 17-54 17.3.2.3.9 epcr1?type 5 packet format ...................................................................... 17-54 17.3.2.3.10 epcr1?type 6 packet format ...................................................................... 17-55 17.3.2.3.11 epcr1?type 8 request packet format ........................................................ 17-55 17.3.2.3.12 epcr1?type 8 response packet format...................................................... 17-56 17.3.2.3.13 epcr1?type 10 packet format .................................................................... 17-56 17.3.2.3.14 epcr1?type 11 packet format .................................................................... 17-57 17.3.2.3.15 epcr1?type 13 packet format .................................................................... 17-58 17.3.2.3.16 error packet capture register 2 (epcr2) ...................................................... 17-58 17.3.2.3.17 epcr2?type 1, 2, or 5 packet format.......................................................... 17-58 17.3.2.3.18 epcr2?type 6 packet format ...................................................................... 17-59 17.3.2.3.19 epcr2?type 8 request packet format ........................................................ 17-59 17.3.2.3.20 epcr2?type 8 response packet format...................................................... 17-60 17.3.2.3.21 epcr2?type 10 packet format .................................................................... 17-60 17.3.2.3.22 epcr2?type 11 or 13 packet format ........................................................... 17-61 17.3.2.3.23 port recoverable error detect register (predr).......................................... 17-61 17.3.2.3.24 port error recovery threshold register (pertr) ......................................... 17-64 17.3.2.3.25 port retry threshold register (prtr)............................................................ 17-64 17.3.3 rapidio message unit registers............................................................................. 17-65 17.3.3.1 rapidio outbound message registers................................................................ 17-65 17.3.3.1.1 outbound mode register (omr).................................................................... 17-65 17.3.3.1.2 outbound status register (osr)..................................................................... 17-67 17.3.3.1.3 outbound descriptor queue dequeue pointer address register (odqdpar)................................................................................................ 17-68 17.3.3.1.4 outbound unit source address register (osar) .......................................... 17-69 17.3.3.1.5 outbound destination port register (odpr) ................................................. 17-70 17.3.3.1.6 outbound destination attributes register (odatr) ..................................... 17-70 17.3.3.1.7 outbound double-word count register (odcr) .......................................... 17-71 17.3.3.1.8 outbound descriptor queue enqueue pointer address register (odqepar) ................................................................................................ 17-72 17.3.3.2 rapidio inbound message registers .................................................................. 17-72 17.3.3.2.1 inbound mode register (imr) ........................................................................ 17-72 17.3.3.2.2 inbound status register (isr) ......................................................................... 17-74 17.3.3.2.3 inbound frame queue dequeue pointer address register (ifqdpar).................................................................................................. 17-75
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xxxv contents paragraph number title page number 17.3.3.2.4 inbound frame queue enqueue pointer address register (ifqepar) .................................................................................................. 17-76 17.3.3.3 rapidio doorbell registers ................................................................................ 17-77 17.3.3.3.1 doorbell mode register (dmr)...................................................................... 17-77 17.3.3.3.2 doorbell status register (dsr) ...................................................................... 17-78 17.3.3.3.3 doorbell queue/dequeue pointer address register (dqdpar).................... 17-79 17.3.3.3.4 doorbell queue enqueue pointer address register (dqepar) .................... 17-80 17.3.3.4 rapidio port-write registers.............................................................................. 17-81 17.3.3.4.1 port-write mode register (pwmr)................................................................ 17-81 17.3.3.4.2 port-write status register (pwsr)................................................................. 17-82 17.3.3.4.3 port-write queue base address register (pwqbar)................................... 17-83 17.4 functional description................................................................................................. 17-8 3 17.4.1 rapidio transaction, packet, and control symbol summary ................................ 17-83 17.5 rapidio functionality ................................................................................................. 17-89 17.5.1 general functionality lists...................................................................................... 17-89 17.5.1.1 8/16 lp-lvds layer functionality lists............................................................ 17-91 17.5.2 common transport layer functionality lists......................................................... 17-98 17.5.3 logical layer functionality lists.......................................................................... 17-100 17.5.3.1 logical layer source transaction support list ................................................ 17-101 17.5.3.2 logical layer extended functionality .............................................................. 17-101 17.6 rapidio errors........................................................................................................... 17 -102 17.7 atmu (address translation and mapping unit) ...................................................... 17-106 17.7.1 outbound atmu translation ................................................................................ 17-106 17.7.1.1 outbound atmu bypass mode ........................................................................ 17-107 17.7.1.2 outbound special transactions and requirements ........................................... 17-107 17.7.2 inbound atmu translation................................................................................... 17-107 17.7.2.1 inbound atmu lcsba1csr window............................................................ 17-108 17.7.2.2 inbound atmu bypass mode........................................................................... 17-108 17.7.2.3 inbound special transactions and requirements .............................................. 17-108 17.7.2.4 atmu boundary crossing errors ..................................................................... 17-109 17.8 rapidio message unit............................................................................................... 17-109 17.8.1 overview................................................................................................................ 1 7-109 17.8.2 message unit features........................................................................................... 17-110 17.8.3 message unit modes of operation .........................................................................17-111 17.8.4 rapidio messaging description.............................................................................17-111 17.8.4.1 data message controller ....................................................................................17-111 17.8.4.2 outbox controller operation ..............................................................................17-111 17.8.4.2.1 direct mode operation .................................................................................. 17-112 17.8.4.2.2 chaining mode operation ............................................................................. 17-112 17.8.4.2.3 switching between direct and chaining modes........................................... 17-115
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xxxvi freescale semiconductor contents paragraph number title page number 17.8.4.2.4 descriptor format.......................................................................................... 17-115 17.8.4.2.5 outbox controller interrupts ......................................................................... 17-116 17.8.4.2.6 special error case condition ........................................................................ 17-117 17.8.4.3 inbox controller operation................................................................................ 17-117 17.8.4.3.1 retry response conditions ........................................................................... 17-118 17.8.4.3.2 error response conditions............................................................................ 17-118 17.8.4.3.3 inbox controller interrupts............................................................................ 17-118 17.8.4.3.4 data message controller limitations and restrictions ................................. 17-119 17.8.4.4 doorbell message controller............................................................................. 17-119 17.8.4.4.1 inbound doorbell reception ......................................................................... 17-120 17.8.4.4.2 doorbell queue entry format ....................................................................... 17-120 17.8.4.4.3 retry response conditions ........................................................................... 17-121 17.8.4.4.4 error response conditions............................................................................ 17-121 17.8.4.4.5 doorbell controller interrupts ....................................................................... 17-121 17.8.4.5 port-write controller structure ......................................................................... 17-121 17.9 initialization and application information ................................................................ 17-122 part iv global functions and debug chapter 18 global utilities 18.1 overview................................................................................................................... ..... 18-1 18.2 global utilities features ................................................................................................ 18 -1 18.2.1 power management and block disables ................................................................... 18-1 18.2.2 accessing current por configuration settings........................................................ 18-1 18.2.3 general-purpose i/o .................................................................................................. 18-1 18.2.4 interrupt and local bus signal multiplexing ............................................................ 18-2 18.2.5 clock control............................................................................................................ . 18-2 18.3 external signal descriptions ......................................................................................... 18-2 18.3.1 signals overview ....................................................................................................... 18 -2 18.3.2 detailed signal descriptions ..................................................................................... 18-2 18.4 memory map/register definition ................................................................................. 18-3 18.4.1 register descriptions ................................................................................................. 18- 4 18.4.1.1 por pll status register (porpllsr) ............................................................... 18-4 18.4.1.2 por boot mode status register (porbmsr)..................................................... 18-5 18.4.1.3 por i/o impedance status and control register (porimpscr) ....................... 18-6 18.4.1.4 por device status register (pordevsr).......................................................... 18-7 18.4.1.5 por debug mode status register (pordbgmsr) ............................................ 18-9
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xxxvii contents paragraph number title page number 18.4.1.6 general-purpose por configuration register (gpporcr) ................................ 18-9 18.4.1.7 general-purpose i/o control register (gpiocr) .............................................. 18-10 18.4.1.8 general-purpose output data register (gpoutdr) ......................................... 18-11 18.4.1.9 general-purpose input data register (gpindr)................................................ 18-12 18.4.1.10 alternate function signal multiplex control register (pmuxcr) ................... 18-12 18.4.1.11 device disable register (devdisr) ................................................................. 18-13 18.4.1.12 power management control and status register (powmgtcsr) ................... 18-15 18.4.1.13 machine check summary register (mcpsumr).............................................. 18-16 18.4.1.14 processor version register (pvr)....................................................................... 18-17 18.4.1.15 system version register (svr)........................................................................... 18-18 18.4.1.16 clock out control register (clkocr) ............................................................. 18-18 18.4.1.17 ddr dll control register (ddrdllcr) ....................................................... 18-19 18.4.1.18 local bus dll control register (lbdllcr)................................................... 18-20 18.5 functional description................................................................................................. 18-2 1 18.5.1 power management ................................................................................................. 18-21 18.5.1.1 relationship between core and device power management states................... 18-21 18.5.1.2 ckstp_in is not power management............................................................... 18-22 18.5.1.3 dynamic power management.............................................................................. 18-22 18.5.1.4 shutting down unused blocks............................................................................ 18-22 18.5.1.5 software-controlled power-down states............................................................ 18-23 18.5.1.5.1 doze mode ...................................................................................................... 18-23 18.5.1.5.2 nap mode ........................................................................................................ 18-23 18.5.1.5.3 sleep mode ...................................................................................................... 18-24 18.5.1.6 power management control fields ..................................................................... 18-24 18.5.1.7 power-down sequence coordination.................................................................. 18-24 18.5.1.8 interrupts and power management ...................................................................... 18-27 18.5.1.8.1 interrupts and power ma nagement controlled by msr[we] ........................ 18-27 18.5.1.8.2 interrupts and power management controlled by powmgtcsr ................ 18-27 18.5.1.9 snooping in power-down modes........................................................................ 18-28 18.5.1.10 software considerations for power management ............................................... 18-28 18.5.1.11 requirements for reaching and recovering from sleep state ........................... 18-28 18.5.2 general-purpose i/o signals ................................................................................... 18-29 18.5.3 interrupt and local bus signal multiplexing .......................................................... 18-29 chapter 19 performance monitor 19.1 introduction............................................................................................................... ..... 19-1 19.1.1 overview................................................................................................................. ... 19-1 19.1.2 features................................................................................................................. ..... 19-3
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xxxviii freescale semiconductor contents paragraph number title page number 19.2 external signal descriptions ......................................................................................... 19-3 19.3 memory map and register definition........................................................................... 19-3 19.3.1 register summary...................................................................................................... 19- 3 19.3.2 control registers ....................................................................................................... 1 9-5 19.3.2.1 performance monitor global control register (pmgc0) .................................... 19-5 19.3.2.2 performance monitor local control registers (pmlca n and pmlcb n ) ................................................................................. 19-5 19.3.3 counter registers....................................................................................................... 1 9-9 19.3.3.1 performance monitor counters (pmc0?pmc8)................................................... 19-9 19.4 functional description................................................................................................. 19-1 0 19.4.1 performance monitor interrupt................................................................................ 19-10 19.4.2 event counting ........................................................................................................ 19- 11 19.4.3 threshold events ..................................................................................................... 19-1 1 19.4.4 chaining................................................................................................................. .. 19-12 19.4.5 triggering ............................................................................................................... . 19-12 19.4.6 burstiness counting................................................................................................. 19-13 19.4.7 performance monitor events ................................................................................... 19-15 19.4.8 performance monitor examples .............................................................................. 19-27 chapter 20 debug features and watchpoint facility 20.1 introduction............................................................................................................... ..... 20-1 20.1.1 overview................................................................................................................. ... 20-2 20.1.2 features................................................................................................................. ..... 20-3 20.1.3 modes of operation ................................................................................................... 20-3 20.1.3.1 local bus (lbc) debug mode.............................................................................. 20-4 20.1.3.2 ddr sdram interface debug modes ................................................................. 20-4 20.1.3.3 pci/pci-x interface debug modes....................................................................... 20-5 20.1.3.4 watchpoint monitor modes ................................................................................... 20-5 20.1.3.5 trace buffer modes ............................................................................................... 20-5 20.2 external signal descriptions ......................................................................................... 20-6 20.2.1 overview................................................................................................................. ... 20-6 20.2.2 detailed signal descriptions ..................................................................................... 20-7 20.2.2.1 debug signals?details......................................................................................... 20-7 20.2.2.2 watchpoint monitor trigger signals?details...................................................... 20-8 20.2.2.3 test signals?details............................................................................................. 20-9 20.3 memory map/register definition ............................................................................... 20-10 20.3.1 watchpoint monitor register descriptions ............................................................. 20-11 20.3.1.1 watchpoint monitor control registers 0?1 (wmcr0, wmcr1)...................... 20-11
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xxxix contents paragraph number title page number 20.3.1.2 watchpoint monitor address register (wmar)................................................ 20-13 20.3.1.3 watchpoint monitor address mask register (wmamr) ................................. 20-14 20.3.1.4 watchpoint monitor transaction mask register (wmtmr) ............................. 20-14 20.3.1.5 watchpoint monitor status register (wmsr).................................................... 20-16 20.3.2 trace buffer register descriptions.......................................................................... 20-16 20.3.2.1 trace buffer control registers (tbcr0, tbcr1) ............................................. 20-16 20.3.2.2 trace buffer address register (tbar) .............................................................. 20-19 20.3.2.3 trace buffer address mask register (tbamr)................................................. 20-19 20.3.2.4 trace buffer transaction mask register (tbtmr)............................................ 20-20 20.3.2.5 trace buffer status register (tbsr) .................................................................. 20-21 20.3.2.6 trace buffer access control register (tbacr) ................................................ 20-22 20.3.2.7 trace buffer access data high register (tbadhr)......................................... 20-22 20.3.2.8 trace buffer access data register (tbadr)..................................................... 20-23 20.3.3 context id registers................................................................................................ 20-24 20.3.3.1 programmed context id register (pcidr) ........................................................ 20-24 20.3.3.2 current context id register (ccidr) ................................................................ 20-24 20.3.4 trigger out function ............................................................................................... 20-25 20.3.4.1 trigger out source register (tosr) .................................................................. 20-25 20.4 functional description................................................................................................. 20-2 6 20.4.1 source and target id ............................................................................................... 20-26 20.4.2 pci/pci-x interface debug..................................................................................... 20-27 20.4.3 ddr sdram interface debug ............................................................................... 20-28 20.4.3.1 debug information on debug pins ...................................................................... 20-28 20.4.3.2 debug information on ecc pins......................................................................... 20-28 20.4.4 local bus interface debug ...................................................................................... 20-28 20.4.5 watchpoint monitor ................................................................................................. 20-28 20.4.5.1 watchpoint monitor performance monitor events ............................................. 20-29 20.4.6 trace buffer ............................................................................................................. 20-29 20.4.6.1 traced data formats (as a function of tbcr1[ifsel]).................................... 20-30 20.5 initialization ............................................................................................................. .... 20-33 chapter 21 10/100 fast ethernet controller 21.1 introduction............................................................................................................... ..... 21-1 21.1.1 10/100 fast ethernet controller overview................................................................ 21-5 21.2 features ................................................................................................................... ....... 21-6 21.3 modes of operation ....................................................................................................... 21 -7 21.4 external signal descriptions ......................................................................................... 21-7 21.4.1 detailed signal descriptions ..................................................................................... 21-8
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xl freescale semiconductor contents paragraph number title page number 21.5 memory map/register definition ................................................................................. 21-9 21.5.1 top-level module memory map .............................................................................. 21-9 21.5.2 detailed memory map............................................................................................. 21-10 21.5.3 memory-mapped register descriptions.................................................................. 21-13 21.5.3.1 fec general control and status registers.......................................................... 21-13 21.5.3.1.1 interrupt event register (ievent) ................................................................ 21-13 21.5.3.1.2 interrupt mask register (imask) .................................................................. 21-16 21.5.3.1.3 error disabled register (edis)....................................................................... 21-18 21.5.3.1.4 minimum frame length register (minflr)................................................. 21-18 21.5.3.1.5 pause time value register (ptv) ................................................................... 21-19 21.5.3.1.6 dma control register (dmactrl) ............................................................. 21-20 21.5.3.2 fec fifo control and status registers.............................................................. 21-21 21.5.3.2.1 fifo pause control register (fifo_pause_ctrl).................................... 21-22 21.5.3.2.2 fifo transmit threshold register (fifo_tx_thr) .................................... 21-23 21.5.3.2.3 fifo transmit starve register (fifo_tx_starve) ................................... 21-24 21.5.3.2.4 fifo transmit starve shutoff register (fifo_tx_starve_shutoff).............................................................. 21-24 21.5.3.3 fec transmit control and status registers ........................................................ 21-25 21.5.3.3.1 transmit control register (tctrl) ............................................................... 21-25 21.5.3.3.2 transmit status register (tstat) .................................................................. 21-26 21.5.3.3.3 txbd data length register (tbdlen)......................................................... 21-27 21.5.3.3.4 current transmit buffer descriptor pointer register (ctbptr) ................... 21-27 21.5.3.3.5 transmit buffer descriptor pointer register (tbptr) ................................... 21-28 21.5.3.3.6 transmit descriptor base address register (tbase) ................................... 21-28 21.5.3.3.7 out-of-sequence txbd register (ostbd).................................................... 21-29 21.5.3.3.8 out-of-sequence tx data buffer pointer register (ostbdp)....................... 21-31 21.5.3.4 fec receive control and status registers ......................................................... 21-31 21.5.3.4.1 receive control register (rctrl) ................................................................ 21-31 21.5.3.4.2 receive status register (rstat).................................................................... 21-32 21.5.3.4.3 rxbd data length register (rbdlen) ........................................................ 21-33 21.5.3.4.4 current receive buffer descriptor pointer register (crbptr) .................... 21-33 21.5.3.4.5 maximum receive buffer length register (mrblr) ................................... 21-34 21.5.3.4.6 receive buffer descriptor pointer register (rbptr) .................................... 21-35 21.5.3.4.7 receive descriptor base address register (rbase)..................................... 21-35 21.5.3.5 mac functionality.............................................................................................. 21-36 21.5.3.5.1 configuring the mac...................................................................................... 21-36 21.5.3.5.2 controlling csma/cd.................................................................................... 21-36 21.5.3.5.3 handling packet collisions ............................................................................. 21-36 21.5.3.5.4 controlling packet flow .................................................................................. 21-37 21.5.3.6 mac registers .................................................................................................... 21-38
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xli contents paragraph number title page number 21.5.3.6.1 mac configuration register 1 (maccfg1)................................................. 21-38 21.5.3.6.2 mac configuration register 2 (maccfg2)................................................. 21-40 21.5.3.6.3 inter-packet gap/inter-frame gap register (ipgifg) ................................... 21-41 21.5.3.6.4 half-duplex register (hafdup) ................................................................... 21-41 21.5.3.6.5 maximum frame length register (maxfrm) ............................................. 21-42 21.5.3.6.6 interface status register (ifstat) ................................................................. 21-43 21.5.3.6.7 station address register part 1 (macstnaddr1) ..................................... 21-43 21.5.3.6.8 station address register part 2 (macstnaddr2) ..................................... 21-44 21.5.3.7 hash function registers ...................................................................................... 21-45 21.5.3.7.1 individual address registers 0?7 (iaddr n ) ................................................. 21-45 21.5.3.7.2 group address registers 0?7 (gaddr n ) ...................................................... 21-46 21.5.3.8 attribute registers ............................................................................................... 21-46 21.5.3.8.1 attribute register (attr)............................................................................... 21-46 21.5.3.8.2 attribute extract length and extract index register (attreli) .................. 21-47 21.6 functional description................................................................................................. 21-4 8 21.6.1 connecting to the physical interface ....................................................................... 21-48 21.6.1.1 media-independent interface (mii) ..................................................................... 21-48 21.6.2 fec channel operation........................................................................................... 21-49 21.6.2.1 initialization sequence......................................................................................... 21-50 21.6.2.1.1 hardware controlled initialization.................................................................. 21-50 21.6.2.1.2 user initialization ............................................................................................ 21-50 21.6.2.2 soft reset and reconfiguring procedure............................................................. 21-51 21.6.2.3 fec frame transmission .................................................................................... 21-52 21.6.2.4 fec frame reception.......................................................................................... 21-53 21.6.2.5 frame recognition............................................................................................... 21-54 21.6.2.5.1 destination address recognition .................................................................... 21-55 21.6.2.5.2 hash table algorithm...................................................................................... 21-57 21.6.2.5.3 crc computation examples .......................................................................... 21-57 21.6.2.6 flow control........................................................................................................ 21- 59 21.6.2.7 interrupt handling ............................................................................................... 21-59 21.6.2.8 inter-packet gap time ......................................................................................... 21-61 21.6.2.9 internal and external loop back ......................................................................... 21-61 21.6.2.10 error-handling procedure.................................................................................... 21-61 21.6.3 buffer descriptors.................................................................................................... 21- 63 21.6.3.1 transmit data buffer descriptor (txbd)............................................................ 21-65 21.6.3.2 receive buffer descriptor (rxbd) ..................................................................... 21-67 21.6.4 data extraction to the l2 cache.............................................................................. 21-69 21.7 application information .............................................................................................. 21-69 21.7.1 interface mode configuration ................................................................................. 21-69 21.7.1.1 mii interface mode.............................................................................................. 21-70
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xlii freescale semiconductor contents paragraph number title page number appendix a revision history a.1 changes from revision 0 to revision 1 ........................................................................ a-1 glossary of terms and abbreviations index 1 register index (memory-mapped registers) index 2 general index
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xliii figures figure number title page number figures 1-1 MPC8540 block diagram....................................................................................................... 1-2 1-2 processing transactions across the on-chip fabric............................................................ 1-21 1-3 high-performance communication system using smp...................................................... 1-22 1-4 high-performance communication system using MPC8540 ............................................. 1-22 1-5 raid controller application using MPC8540.................................................................... 1-23 1-6 vpn access point enabled by rapidio and ethernet.......................................................... 1-23 1-7 MPC8540 with serdes ...................................................................................................... 1-2 4 1-8 MPC8540 with a dsp farm enabled by general-purpose chip select machine or user programmable machine on the local bus controller port .................. 1-24 2-1 local memory map example ................................................................................................. 2-2 2-2 local access window n base address registers (lawbar0?lawbar7) ....................... 2-6 2-3 local access window n attributes registers (lawar0?lawar7) ................................... 2-6 2-4 top-level register map example ........................................................................................ 2-10 2-5 general utilities registers mapping to configuration, control, and status memory block.................................................................................................................. 2 -13 2-6 pic mapping to configuration, control, and status memory block ................................... 2-14 2-7 rapidio mapping to configuration, control, and status memory block............................ 2-15 2-8 device-specific register mapping to configuration, control, and status memory block.................................................................................................................. 2 -16 3-1 MPC8540 signal groupings ................................................................................................... 3 -3 4-1 configuration, control, and status register base address register (ccsrbar)................ 4-5 4-2 alternate configuration base address register (altcbar) ............................................... 4-6 4-3 alternate configuration attribute register (altcar) ......................................................... 4-6 4-4 boot page translation register (bptr) ................................................................................. 4-8 4-5 power-on reset sequence .................................................................................................... 4 -11 4-6 clock subsystem block diagram ......................................................................................... 4-24 4-7 rapidio transmit clock options ......................................................................................... 4-24 4-8 rtc and core timer facilities clocking options ................................................................ 4-26 5-1 e500 core complex block diagram ....................................................................................... 5-2 5-2 four-stage mu pipeline, showing divide bypass................................................................. 5-8 5-3 three-stage load/store unit ................................................................................................. .5-9 5-4 instruction pipeline flow ................................................................................................... ... 5-15 5-5 gpr issue queue (giq) ....................................................................................................... 5-17 5-6 e500 core programming model............................................................................................ 5-19 5-7 mmu structure ............................................................................................................... ...... 5-25 5-8 effective-to-real address translation flow......................................................................... 5-26 6-1 core register model ......................................................................................................... ...... 6-2 6-2 integer exception register (xer) .......................................................................................... 6- 8
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xliv freescale semiconductor figures figure number title page number 6-3 condition register (cr) ..................................................................................................... .... 6-9 6-4 link register (lr) .......................................................................................................... ...... 6-11 6-5 count register (ctr) ........................................................................................................ ... 6-11 6-6 machine state register (msr) ............................................................................................. 6-1 2 6-7 processor id register (pir)................................................................................................. .6-14 6-8 processor version register (pvr) ........................................................................................ 6-14 6-9 system version register (svr)............................................................................................ 6-1 4 6-10 timer control register (tcr) .............................................................................................. 6 -15 6-11 timer status register (tsr) ................................................................................................ .6-16 6-12 time base upper/lower registers (tbu/tbl)................................................................... 6-17 6-13 decrementer register (dec) ................................................................................................ 6 -17 6-14 decrementer auto-reload register (decar)..................................................................... 6-17 6-15 save/restore register 0 (srr0) ........................................................................................... 6- 18 6-16 save/restore register 1 (srr1) ........................................................................................... 6- 18 6-17 critical save/restore register 0 (csrr0) ........................................................................... 6-18 6-18 critical save/restore register 1 (csrr1) ........................................................................... 6-19 6-19 data exception address register (dear) ........................................................................... 6-19 6-20 interrupt vector prefix register (ivpr) ............................................................................... 6-19 6-21 interrupt vector offset registers (ivor n ) ........................................................................... 6-19 6-22 exception syndrome register (esr).................................................................................... 6-20 6-23 machine check save/restore register 0 (mcsrr0)........................................................... 6-21 6-24 machine check save/restore register 1 (mcsrr1)........................................................... 6-22 6-25 machine check address register (mcar).......................................................................... 6-22 6-26 machine check syndrome register (mcsr) ....................................................................... 6-23 6-27 software-use sprs (sprg0?sprg7 and usprg0)........................................................... 6-24 6-28 branch buffer entry address register (bbear) ................................................................ 6-25 6-29 branch buffer target address register (bbtar)................................................................ 6-25 6-30 branch unit control and status register (bucsr) ............................................................. 6-26 6-31 hardware implementation-dependent register 0 (hid0).................................................... 6-27 6-32 hardware implementation-dependent register 1 (hid1).................................................... 6-28 6-33 l1 cache control and status register 0 (l1csr0) ............................................................. 6-30 6-34 l1 cache control and status register 1 (l1csr1) ............................................................. 6-31 6-35 l1 cache configuration register 0 (l1cfg0)..................................................................... 6-32 6-36 l1 cache configuration register 1 (l1cfg1)..................................................................... 6-33 6-37 process id registers (pid0?pid2)....................................................................................... 6-34 6-38 mmu control and status register 0 (mmucsr0) ............................................................. 6-34 6-39 mmu configuration register (mmucfg) ......................................................................... 6-35 6-40 tlb configuration register 0 (tlb0cfg) ......................................................................... 6-35 6-41 tlb configuration register 1 (tlb1cfg) ......................................................................... 6-36 6-42 mas register 0 (mas0) ...................................................................................................... 6-37
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xlv figures figure number title page number 6-43 mas register 1 (mas1) ...................................................................................................... 6-38 6-44 mas register 2 (mas2) ...................................................................................................... 6-39 6-45 mas register 3 (mas3) ...................................................................................................... 6-40 6-46 mas register 4 (mas4) ...................................................................................................... 6-40 6-47 mas register 6 (mas6) ...................................................................................................... 6-41 6-48 debug control register 0 (dbcr0) ..................................................................................... 6-42 6-49 debug control register 1 (dbcr1) ..................................................................................... 6-43 6-50 debug control register 2 (dbcr2) ..................................................................................... 6-45 6-51 debug status register (dbsr)............................................................................................. 6- 46 6-52 instruction address compare registers (iac1?iac2) ........................................................ 6-47 6-53 data address compare registers (dac1?dac2) ............................................................... 6-48 6-54 signal processing and embedded fl oating-point status and control register (spefscr) ........................................................................................................ 6-48 6-55 accumulator (acc) .......................................................................................................... .... 6-50 6-56 performance monitor global control register 0 (pmgc0), user performance monitor global control register 0 (upmgc0) ................................ 6-52 6-57 local control a registers (pmlca0?pmlca3), user local control a registers (upmlca0?upmlca3) .............................................. 6-52 6-58 local control b registers (pmlcb0?pmlcb3), user local control b registers (upmlcb0?upmlcb3) .............................................. 6-53 6-59 performance monitor counter registers (pmc0?pmc3), user performance monitor counter registers (upmc0?upmc3)................................. 6-54 7-1 l2 cache/sram configuration ............................................................................................. 7-1 7-2 cache organization .......................................................................................................... ....... 7-3 7-3 256-kbyte l2 cache address configuration?full cache mode.......................................... 7-4 7-4 128-kbyte l2 cache address configuration?half sram, half cache mode.................... 7-5 7-5 data bus connection of ccb ................................................................................................. 7 -5 7-6 address bus connection of ccb............................................................................................ 7-6 7-7 l2 control register (l2ctl) ................................................................................................. 7-7 7-8 l2 cache external write address registers (l2cewar n )................................................. 7-10 7-9 l2 cache external write control registers (l2cewcr0?l2cewcr3)........................... 7-10 7-10 l2 memory-mapped sram base address registers (l2srbar n )................................... 7-11 7-11 l2 error injection mask high register (l2errinjhi) ...................................................... 7-13 7-12 l2 error injection mask low register (l2errinjlo) ...................................................... 7-14 7-13 l2 error injection mask control register (l2errinjctl) ............................................... 7-14 7-14 l2 error capture data high register (l2captdatahi)................................................... 7-15 7-15 l2 error capture data low register (l2captdatalo) .................................................. 7-15 7-16 l2 error syndrome register (l2captecc) ....................................................................... 7-16 7-17 l2 error detect register (l2errdet) ............................................................................... 7-16 7-18 l2 error disable register (l2errdis) ............................................................................... 7-17
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xlvi freescale semiconductor figures figure number title page number 7-19 l2 error interrupt enable register (l2errinten) ........................................................... 7-18 7-20 l2 error attributes capture register (l2errattr) .......................................................... 7-19 7-21 l2 error address capture register (l2erraddr) ........................................................... 7-20 7-22 l2 error control register (l2errctl).............................................................................. 7-20 7-23 l2 cache line replacement algorithm ............................................................................... 7-28 8-1 e500 coherency module block diagram................................................................................ 8-1 8-2 ecm ccb address configuration register (eebacr)........................................................ 8-3 8-3 ecm ccb port configuration register (eebpcr)............................................................... 8-4 8-4 ecm error detect register (eedr)....................................................................................... 8-5 8-5 ecm error enable register (eeer) ...................................................................................... 8-6 8-6 ecm error attributes capture register (eeatr) ................................................................. 8-7 8-7 ecm error address capture register (eeadr) ................................................................... 8-8 9-1 ddr memory controller simplified block diagram............................................................. 9-2 9-2 chip select bounds registers (cs n _bnds)........................................................................ 9-10 9-3 chip select configuration register (cs n _config) ........................................................... 9-10 9-4 ddr sdram timing configuration register 1 (timing_cfg_1).................................. 9-11 9-5 ddr sdram timing configuration register 2 (timing_cfg_2).................................. 9-13 9-6 ddr sdram control configuration register (ddr_sdram_cfg).............................. 9-14 9-7 ddr sdram mode configuration register (ddr_sdram_mode)............................. 9-16 9-8 ddr sdram interval configuration register (ddr_sdram_interval) .................. 9-16 9-9 memory data path error injection mask high register (data_err_inject_hi) ......... 9-17 9-10 memory data path error injection mask low register (data_err_inject_lo)......... 9-18 9-11 memory data path error injection mask ecc register (ecc_err_inject) .................. 9-18 9-12 memory data path read capture high register (capture_data_hi).......................... 9-19 9-13 memory data path read capture low register (capture_data_lo) ......................... 9-20 9-14 memory data path read capture ecc register (capture_ecc)................................... 9-20 9-15 memory error detect register (err_detect) ................................................................. 9-21 9-16 memory error disable register (err_disable).............................................................. 9-22 9-17 memory error interrupt enable register (err_int_en)................................................... 9-22 9-18 memory error attributes capture register (capture_attributes)........................... 9-23 9-19 memory error address capture register (capture_address) ................................... 9-24 9-20 single-bit ecc memory error management register (err_sbe) .................................... 9-25 9-21 ddr memory controller block diagram ............................................................................ 9-26 9-22 controller dll timing loop ............................................................................................... 9- 27 9-23 typical dual data rate sdram internal organization....................................................... 9-28 9-24 typical ddr sdram interface signals .............................................................................. 9-28 9-25 example 256-mbyte ddr sdram configuration with ecc............................................. 9-29 9-26 ddr sdram burst read timing?acttorw = 3, mcas latency = 2 ........................ 9-36 9-27 ddr sdram single-beat (double-word) write timing?acttorw = 3 ..................... 9-37 9-28 ddr sdram burst write timing?acttorw = 4 ......................................................... 9-37
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xlvii figures figure number title page number 9-29 ddr sdram clock distribution example ......................................................................... 9-38 9-30 ddr sdram mode-set command timing........................................................................ 9-39 9-31 registered ddr sdram dimm burst write timing ........................................................ 9-40 9-32 write timing adjustments example..................................................................................... 9-41 9-33 ddr sdram bank-staggered auto-refresh timing......................................................... 9-42 9-34 ddr sdram power-down mode ...................................................................................... 9-43 9-35 ddr sdram self-refresh entry timing ........................................................................... 9-44 9-36 ddr sdram self-refresh exit timing ............................................................................. 9-44 10-1 MPC8540 interrupt sources block diagram ........................................................................ 10-3 10-2 pass-through mode example ............................................................................................... 10- 6 10-3 feature reporting register (frr) ...................................................................................... 10-16 10-4 global configuration register (gcr) ................................................................................ 10-17 10-5 vendor identification register (vir).................................................................................. 10-17 10-6 processor initialization register (pir) ............................................................................... 10-18 10-7 ipi vector/priority registers (ipivpr n )............................................................................. 10-19 10-8 spurious vector register (svr) ......................................................................................... 10-2 0 10-9 timer frequency reporting register (tfrr) .................................................................... 10-20 10-10 global timer current count registers (gtccr n ) ............................................................ 10-21 10-11 global timer base count registers (gtbcr n )................................................................. 10-22 10-12 global timer vector/priority registers (gtvpr n )............................................................ 10-22 10-13 global timer destination registers (gtdr n ) ................................................................... 10-23 10-14 example calculation for cascaded timers ......................................................................... 10-24 10-15 timer control register (tcr) ............................................................................................ 10 -24 10-16 irq_out summary register 0 (irqsr0) ........................................................................ 10-26 10-17 irq_out summary register 1 (irqsr1) ........................................................................ 10-27 10-18 critical interrupt summary register 0 (cisr0) ................................................................. 10-27 10-19 critical interrupt summary register 1 (cisr1) ................................................................. 10-28 10-20 performance monitor mask registers (pm n mr0)............................................................. 10-29 10-21 performance monitor mask registers (pm n mr1)............................................................. 10-30 10-22 message registers (msgrs) .............................................................................................. 10- 30 10-23 message enable register (mer) ........................................................................................ 10-31 10-24 message status register (msr) ......................................................................................... 10-3 1 10-25 external interrupt vector/priority registers (eivpr0?eivpr11) ..................................... 10-32 10-26 external interrupt destination registers (eidr n ).............................................................. 10-33 10-27 internal interrupt vector/priority registers (iivpr n ) ........................................................ 10-34 10-28 internal interrupt destination registers (iidr n ) ................................................................ 10-35 10-29 messaging interrupt vector/priority registers (mivpr n ) ................................................. 10-36 10-30 messaging interrupt destination registers (midr n ) ......................................................... 10-37 10-31 per-cpu register address decoding in a four-core device............................................. 10-39 10-32 interprocessor interrupt dispatch registers (ipidr0?ipidr3) ......................................... 10-39
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xlviii freescale semiconductor figures figure number title page number 10-33 processor current task priority register (ctpr) .............................................................. 10-40 10-34 processor who am i register (whoami)........................................................................ 10-41 10-35 processor interrupt acknowledge register (iack) ........................................................... 10-42 10-36 end of interrupt register (eoi) .......................................................................................... 1 0-42 10-37 pic interrupt processing flow diagram ............................................................................. 10-44 11-1 i 2 c block diagram................................................................................................................ 11-1 11-2 i 2 c address register (i2cadr)........................................................................................... 11-5 11-3 i 2 c frequency divider register (i2cfdr) .......................................................................... 11-5 11-4 i 2 c control register (i2ccr)............................................................................................... 11-6 11-5 i 2 c status register (i2csr) ................................................................................................. 11-8 11-6 i 2 c data register (i2cdr) ................................................................................................... 11-9 11-7 i 2 c digital filter sampling rate register (i2cdfsrr).................................................... 11-10 11-8 i 2 c interface transaction protocol.......................................................................................11-11 11-9 eeprom data format for one register preload command............................................. 11-19 11-10 eeprom contents ........................................................................................................... .. 11-19 11-11 example i 2 c interrupt service routine flowchart ............................................................. 11-24 12-1 uart block diagram ......................................................................................................... . 12-2 12-2 receiver buffer registers (urbr0, urbr1)...................................................................... 12-6 12-3 transmitter holding registers (uthr0, uthr1)............................................................... 12-7 12-4 divisor most significant byte registers (udmb0, udmb1)............................................. 12-7 12-5 divisor least significant byte registers (udlb0, udlb1)............................................... 12-8 12-6 interrupt enable register (uier) ......................................................................................... 12 -9 12-7 interrupt id registers (uiir).............................................................................................. 12-10 12-8 fifo control registers (ufcr0, ufcr1) ........................................................................ 12-11 12-9 line control register (ulcr) ........................................................................................... 12-1 3 12-10 modem control register (umcr) ..................................................................................... 12-14 12-11 line status register (ulsr) .............................................................................................. 1 2-15 12-12 modem status register (umsr) ........................................................................................ 12-16 12-13 scratch register (uscr) ................................................................................................... . 12-17 12-14 alternate function register (uafr) .................................................................................. 12-18 12-15 dma status register (udsr)............................................................................................ 12-1 8 12-16 uart bus interface transaction protocol example .......................................................... 12-21 13-1 local bus controller block diagram ................................................................................... 13-1 13-2 base registers (br n ) .......................................................................................................... 13-11 13-3 option registers (or n ) in gpcm mode............................................................................ 13-14 13-4 option registers (or n ) in upm mode .............................................................................. 13-16 13-5 option registers (or n ) in sdram mode......................................................................... 13-17 13-6 upm memory address register (mar) ............................................................................ 13-18 13-7 upm mode registers (m x mr)........................................................................................... 13-19 13-8 memory refresh timer prescaler register (mrtpr)........................................................ 13-21
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xlix figures figure number title page number 13-9 upm data register (mdr) ................................................................................................ 13-2 2 13-10 sdram machine mode register (lsdmr) ..................................................................... 13-22 13-11 upm refresh timer (lurt) .............................................................................................. 13-2 4 13-12 lsrt sdram refresh timer (lsrt)............................................................................... 13-25 13-13 transfer error status register (ltesr) ............................................................................. 13-26 13-14 transfer error check disable register (ltedr) ............................................................... 13-27 13-15 transfer error interrupt enable register (lteir).............................................................. 13-28 13-16 transfer error attributes register (lteatr) .................................................................... 13-29 13-17 transfer error address register (ltear) ......................................................................... 13-30 13-18 local bus configuration register....................................................................................... 13- 31 13-19 clock ratio register (lcrr) ............................................................................................. 13 -32 13-20 basic operation of memory controllers in the lbc.......................................................... 13-34 13-21 example of 8-bit gpcm writing 32 bytes to address 0x5420 ......................................... 13-36 13-22 basic lbc bus cycle with lale, ta, and lcs n ............................................................. 13-37 13-23 local bus to gpcm device interface ................................................................................ 13-39 13-24 gpcm basic read timing (xacs = 0, acs = 1x, trlx = 0, clkdiv = 4,8) .............................................................................................................. 13-39 13-25 gpcm basic write timing (xacs = 0, acs = 00, csnt = 1, scy = 1, trlx = 0, clkdiv = 4 or 8) ....................................................................................... 13-45 13-26 gpcm relaxed timing read (xacs = 0, acs = 1x, scy = 1, csnt = 0, trlx = 1, clkdiv = 4 or 8) ....................................................................................... 13-46 13-27 gpcm relaxed timing back-to-back writes (xacs = 0, acs = 1x, scy = 0, csnt = 0, trlx = 1, clkdiv = 4 or 8)..................................................... 13-46 13-28 gpcm relaxed timing write (xacs = 0, acs = 10, scy = 0, csnt = 1, trlx = 1, clkdiv = 4 or 8) ....................................................................................... 13-47 13-29 gpcm relaxed timing write (xacs = 0, acs = 00, scy = 1, csnt = 1, trlx = 1, clkdiv = 4 or 8) ....................................................................................... 13-48 13-30 gpcm read followed by read (trlx = 0, ehtr = 0, fastest timing)......................... 13-49 13-31 gpcm read followed by write (trlx = 0, ehtr = 1, 1-cycle extended hold time on reads) ..................................................................................................... 13-49 13-32 external termination of gpcm access.............................................................................. 13-50 13-33 connection to a 32-bit sdram with 12 address lines.................................................... 13-52 13-34 sdram address multiplexing .......................................................................................... 13-54 13-35 pretoact = 2 (2 clock cycles)...................................................................................... 13-55 13-36 acttorw = 2 (2 clock cycles)....................................................................................... 13-56 13-37 cl = 2 (2 clock cycles) ................................................................................................... .. 13-56 13-38 wrc = 2 (2 clock cycles) ................................................................................................. 1 3-57 13-39 rfrc = 4 (6 clock cycles) ................................................................................................ 1 3-57 13-40 bufcmd = 1, lcrr[bufcmdc] = 2............................................................................. 13-58 13-41 sdram single-beat read, page closed, cl = 3 .............................................................. 13-58
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 l freescale semiconductor figures figure number title page number 13-42 sdram single-beat read, page hit, cl = 3 .................................................................... 13-58 13-43 sdram two-beat burst read, page closed, cl = 3........................................................ 13-58 13-44 sdram four-beat burst read, page miss, cl = 3........................................................... 13-59 13-45 sdram single-beat write, page hit................................................................................. 13-59 13-46 sdram three-beat write, page closed............................................................................ 13-59 13-47 sdram read-after-read pipelined, page hit, cl = 3...................................................... 13-59 13-48 sdram write-after-write pipelined, page hit.................................................................. 13-60 13-49 sdram read-after-write pipelined, page hit .................................................................. 13-60 13-50 sdram mode-set command........................................................................................ 13-61 13-51 sdram bank-staggered auto-refresh timing ................................................................ 13-62 13-52 user-programmable machine functional block diagram.................................................. 13-62 13-53 ram array indexing ........................................................................................................ .. 13-64 13-54 memory refresh timer request block diagram ............................................................... 13-65 13-55 upm clock scheme for lcrr[clkdiv] = 2................................................................... 13-67 13-56 upm clock scheme for lcrr[clkdiv] = 4 or 8 ........................................................... 13-67 13-57 ram array and signal generation .................................................................................... 13-68 13-58 ram word field descriptions ........................................................................................... 13-6 8 13-59 lcs n signal selection ........................................................................................................ 13-72 13-60 lbs signal selection ...................................................................................................... .... 13-73 13-61 upm read access data sampling...................................................................................... 13-76 13-62 effect of lupwait signal ................................................................................................. 1 3-77 13-63 single-beat read access to fpm dram .......................................................................... 13-79 13-64 single-beat write access to fpm dram ......................................................................... 13-80 13-65 burst read access to fpm dram using loop (two beats shown).............................. 13-81 13-66 refresh cycle (cbr) to fpm dram ................................................................................ 13-82 13-67 exception cycle ........................................................................................................... ....... 13-83 13-68 multiplexed address/data bus ........................................................................................... 13- 84 13-69 local bus peripheral hierarchy .......................................................................................... 13 -85 13-70 local bus peripheral hierarchy for very high bus speeds ............................................... 13-86 13-71 gpcm address timings ..................................................................................................... 1 3-86 13-72 gpcm data timings ......................................................................................................... ... 13-87 13-73 interface to different port-size devices ............................................................................. 13-89 13-74 128-mbyte sdram diagram............................................................................................. 13-93 13-75 sdram power-down timing............................................................................................ 13-97 13-76 sdram self-refresh mode timing .................................................................................. 13-98 13-77 local bus dll operation................................................................................................. 13 -100 13-78 parity support for sdram............................................................................................... 13- 101 13-79 interface to zbt sram ................................................................................................... 13 -102 13-80 msc8101 hdi16 peripheral registers............................................................................. 13-104 13-81 interface to msc8101 hdi16........................................................................................... 13-10 5
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor li figures figure number title page number 13-82 interface to msc8102 dsi in asynchronous mode ......................................................... 13-108 13-83 asynchronous write to msc8102 dsi............................................................................. 13-109 13-84 asynchronous read from msc8102 dsi......................................................................... 13-110 13-85 interface to msc8102 dsi in synchronous mode ............................................................13-111 13-86 upm synchronization cycle ............................................................................................ 13-11 2 13-87 synchronous single write to msc8102 dsi.................................................................... 13-114 13-88 synchronous single read from msc8102 dsi................................................................ 13-115 13-89 synchronous burst write to msc8102 dsi ..................................................................... 13-116 13-90 synchronous burst read from msc8102 dsi ................................................................. 13-117 13-91 interface to texas instruments ehpi in non-multiplexed mode ..................................... 13-120 13-92 ehpi non-multiplexed read timings.............................................................................. 13-121 13-93 ehpi non-multiplexed write timings............................................................................. 13-121 14-1 ethernet protocol in relation to the osi protocol stack ...................................................... 14-2 14-2 ieee 802.3z and 802.3ab physical standards ...................................................................... 14-3 14-3 ethernet/ieee 802.3 frame structure .................................................................................. 14-3 14-4 ethernet/ieee 802.3 frame structure with more details.................................................... 14-5 14-5 tsec block diagram ......................................................................................................... .. 14-6 14-6 ievent register definition .............................................................................................. 14- 21 14-7 imask register definition ................................................................................................ 14 -23 14-8 error disabled register (edis) .......................................................................................... 14- 24 14-9 ecntrl register definition ............................................................................................. 14-2 5 14-10 minflr register definition.............................................................................................. 14 -26 14-11 ptv register definition................................................................................................... ... 14-27 14-12 dmactrl register definition ......................................................................................... 14-28 14-13 tbipa register definition................................................................................................. . 14-29 14-14 fifo_pause_ctrl register definition......................................................................... 14-31 14-15 fifo_tx_thr register definition................................................................................... 14-31 14-16 fifo_tx_starve register definition ............................................................................ 14-32 14-17 fifo_tx_starve_shutoff register definition ........................................................ 14-33 14-18 tctrl register definition ................................................................................................ 1 4-33 14-19 tstat register definition ................................................................................................. 14-34 14-20 tbdlen register definition ............................................................................................. 14- 35 14-21 txic register definition.................................................................................................. .. 14-35 14-22 ctbptr register definition .............................................................................................. 14 -36 14-23 tbptr register definition................................................................................................. 14-37 14-24 tbase register definition ................................................................................................ 1 4-38 14-25 ostbd register definition................................................................................................ 1 4-38 14-26 ostbdp register definition.............................................................................................. 14 -40 14-27 rctrl register definition ................................................................................................ 1 4-41 14-28 rstat register definition ................................................................................................. 14-42
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 lii freescale semiconductor figures figure number title page number 14-29 rbdlen register definition............................................................................................. 14- 42 14-30 rxic register definition .................................................................................................. . 14-43 14-31 crbptr register definition.............................................................................................. 14 -44 14-32 mrbl register definition.................................................................................................. 14-44 14-33 rbptr register definition ................................................................................................ 1 4-45 14-34 rbase register definition ................................................................................................ 1 4-46 14-35 maccfg1 register definition .......................................................................................... 14-49 14-36 maccfg2 register definition .......................................................................................... 14-51 14-37 ipgifg register definition ................................................................................................ 14-52 14-38 half-duplex register definition......................................................................................... 14 -53 14-39 maximum frame length register definition..................................................................... 14-54 14-40 mii management configuration register definition ......................................................... 14-54 14-41 miimcom register definition .......................................................................................... 14-55 14-42 miimadd register definition .......................................................................................... 14-56 14-43 mii management control register definition.................................................................... 14-57 14-44 miimstat register definition .......................................................................................... 14-5 7 14-45 mii management indicator register definition ........... ...................................................... 14-58 14-46 interface status register definition .................................................................................... 14 -58 14-47 station address part 1 register definition ......................................................................... 14-59 14-48 station address part 2 register definition ......................................................................... 14-60 14-49 transmit and receive 64-byte frame register definition................................................. 14-61 14-50 transmit and receive 65- to 127-byte frame register definition .................................... 14-61 14-51 transmit and receive 128- to 255-byte frame register definition .................................. 14-62 14-52 transmit and receive 256- to 511-byte frame register definition................................... 14-62 14-53 transmit and receive 512- to 1023-byte frame register definition ................................ 14-63 14-54 transmit and receive 1024- to 1518-byte frame register definition .............................. 14-63 14-55 transmit and receive 1519- to 1522-byte vlan frame register definition .................. 14-64 14-56 receive byte counter register definition.......................................................................... 14-64 14-57 receive packet counter register definition ...................................................................... 14-65 14-58 receive fcs error counter register definition................................................................. 14-65 14-59 receive multicast packet counter register definition ...................................................... 14-66 14-60 receive broadcast packet counter register definition ..................................................... 14-66 14-61 receive control frame packet counter register definition .............................................. 14-67 14-62 receive pause frame packet counter register definition ................................................. 14-67 14-63 receive unknown opcode packet counter register definition ........................................ 14-68 14-64 receive alignment error counter register definition....................................................... 14-68 14-65 receive frame length error counter register definition ................................................. 14-69 14-66 receive code error counter register definition ............................................................... 14-69 14-67 receive carrier sense error counter register definition .................................................. 14-70 14-68 receive undersize packet counter register definition ..................................................... 14-70
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor liii figures figure number title page number 14-69 receive oversize packet counter register definition ....................................................... 14-71 14-70 receive fragments counter register definition ................................................................ 14-71 14-71 receive jabber counter register definition....................................................................... 14-72 14-72 receive dropped packet counter register definition ....................................................... 14-72 14-73 transmit byte counter register definition ........................................................................ 14-73 14-74 transmit packet counter register definition ..................................................................... 14-73 14-75 transmit multicast packet counter register definition ..................................................... 14-74 14-76 transmit broadcast packet counter register definition .................................................... 14-74 14-77 transmit pause control frame counter register definition .............................................. 14-75 14-78 transmit deferral packet counter register definition....................................................... 14-75 14-79 transmit excessive deferral packet counter register definition...................................... 14-76 14-80 transmit single collision packet counter register definition .......................................... 14-76 14-81 transmit multiple collision packet counter register definition....................................... 14-77 14-82 transmit late collision packet counter register definition ............................................. 14-77 14-83 transmit excessive collision packet counter register definition .................................... 14-78 14-84 transmit total collision counter register definition ........................................................ 14-78 14-85 transmit drop frame counter register definition ............................................................ 14-79 14-86 transmit jabber frame counter register definition .......................................................... 14-79 14-87 transmit fcs error counter register definition ............................................................... 14-80 14-88 transmit control frame counter register definition ........................................................ 14-80 14-89 transmit oversized frame counter register definition .................................................... 14-81 14-90 transmit undersize frame counter register definition .................................................... 14-81 14-91 transmit fragment counter register definition ................................................................ 14-82 14-92 carry register 1 (car1) register definition..................................................................... 14-82 14-93 carry register 2 (car2) register definition..................................................................... 14-84 14-94 carry mask register 1 (cam1) register definition.......................................................... 14-85 14-95 carry mask register 2 (cam2) register definition.......................................................... 14-86 14-96 iaddr n register definition .............................................................................................. 14-88 14-97 gaddr n register definition............................................................................................. 14-88 14-98 attr register definition.................................................................................................. . 14-89 14-99 attreli register definition............................................................................................. 14 -90 14-100 control register definition.............................................................................................. ... 14-92 14-101 status register definition ............................................................................................... .... 14-93 14-102 an advertisement register definition............................................................................... 14-94 14-103 an link partner base page ability register definition .................................................... 14-96 14-104 an expansion register definition ..................................................................................... 14-9 8 14-105 an next page transmit register definition ...................................................................... 14-98 14-106 an link partner ability next page register definition .................................................... 14-99 14-107 extended status register definition ................................................................................. 14-10 0 14-108 jitter diagnostics register definition ............................................................................... 14-1 01
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 liv freescale semiconductor figures figure number title page number 14-109 tbi control register definition ....................................................................................... 14- 102 14-110 tsec-mii connection ...................................................................................................... 14-104 14-111 tsec-gmii connection ................................................................................................... 14 -105 14-112 tsec-rgmii connection ................................................................................................ 14-1 06 14-113 tsec-tbi connection...................................................................................................... 14-107 14-114 tsec-rtbi connection ................................................................................................... 14 -108 14-115 ethernet address recognition flowchart ......................................................................... 14-117 14-116 example of tsec memory structure for bd................................................................... 14-126 14-117 buffer descriptor ring................................................................................................... ... 14-126 14-118 transmit buffer descriptor ............................................................................................... 14-127 14-119 receive buffer descriptor................................................................................................ . 14-129 15-1 dma block diagram.......................................................................................................... .. 15-1 15-2 dma operational flow chart .............................................................................................. 15- 4 15-3 dma signal summary......................................................................................................... . 15-5 15-4 dma register space (memory-mapped)............................................................................. 15-7 15-5 dma mode registers (mr n ) ............................................................................................. 15-10 15-6 status registers (sr n ) ........................................................................................................ 15-13 15-7 basic chaining mode flow chart....................................................................................... 15-15 15-8 current link descriptor address registers (clndar n ).................................................. 15-16 15-9 source attributes registers (satr n ) ................................................................................. 15-17 15-10 source address registers (sar n ) ...................................................................................... 15-18 15-11 source address registers for rapidio maintenance reads (sar n ) ................................. 15-19 15-12 destination attributes registers (datr n ) ......................................................................... 15-20 15-13 destination address registers (dar n ) .............................................................................. 15-21 15-14 destination address registers for rapidio maintenance writes (dar n )......................... 15-22 15-15 byte count registers (bcr n )............................................................................................. 15-23 15-16 next link descriptor address registers (nlndar n ) ...................................................... 15-23 15-17 current list descriptor address registers (clsdar n ).................................................... 15-24 15-18 next list descriptor address registers (nlsdar n ) ........................................................ 15-25 15-19 source stride registers (ssr n ) .......................................................................................... 15-25 15-20 destination stride registers (dsr n ) .................................................................................. 15-26 15-21 dma general status register (dgsr) .............................................................................. 15-27 15-22 external control interface timing ...................................................................................... 15- 34 15-23 stride size and stride distance ........................................................................................... 15-37 15-24 dma transaction flow with dma descriptors ................................................................ 15-39 15-25 list descriptor format .................................................................................................... .... 15-40 15-26 link descriptor format.................................................................................................... ... 15-40 15-27 dma data paths ............................................................................................................ ..... 15-42 16-1 pci/x controller block diagram ......................................................................................... 16-2 16-2 pci/x interface external signals .......................................................................................... 1 6-7
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor lv figures figure number title page number 16-3 pci/x cfg_addr register .............................................................................................. 16-18 16-4 pci/x cfg_data register ............................................................................................... 16-19 16-5 pci/x int_ack register .................................................................................................. 16- 20 16-6 pci/x outbound translation address registers ................................................................ 16-21 16-7 pci/x outbound translation extended address registers ................................................ 16-21 16-8 pci/x outbound window base address registers ............................................................ 16-22 16-10 pci/x outbound window attributes registers 1?4 ........................................................... 16-23 16-9 pci/x outbound window attributes register 0 (default) ................................................. 16-23 16-11 pci/x inbound translation address registers ................................................................... 16-25 16-12 pci/x inbound window base address registers............................................................... 16-25 16-13 pci/x inbound window base extended address registers............................................... 16-26 16-14 pci/x inbound window attributes registers..................................................................... 16-27 16-15 pci/x error detect register (err_dr) ............................................................................ 16-29 16-16 pci/x error capture disable register (err_cap_dr) ................................................... 16-30 16-17 pci/x error enable register (err_en)............................................................................ 16-31 16-18 pci/x error attributes capture register (err_attrib)................................................. 16-32 16-19 pci/x error address capture register (err_addr) ...................................................... 16-33 16-20 pci/x error extended address capture register (err_ext_addr) ............................ 16-34 16-21 pci/x error data low capture register (err_dl) ......................................................... 16-34 16-22 pci/x error data high capture register (err_dh) ........................................................ 16-35 16-23 pci/x gasket timer register (gas_timr)...................................................................... 16-35 16-24 pci-x split completion timer register (pcix_timr) .................................................... 16-36 16-25 MPC8540 pci/x configuration header ............................................................................. 16-37 16-26 pci-x additional configuration registers ......................................................................... 16-37 16-27 pci vendor id register .................................................................................................... .. 16-38 16-28 pci device id register.................................................................................................... ... 16-38 16-29 pci bus command register ............................................................................................... 16- 39 16-30 pci bus status register ................................................................................................... ... 16-40 16-31 pci revision id register.................................................................................................. .. 16-41 16-32 pci bus programming interface register........................................................................... 16-41 16-33 pci subclass code register................................................................................................ 16-42 16-34 pci bus base class code register ..................................................................................... 16-42 16-35 pci bus cache line size register (pclsr)...................................................................... 16-43 16-36 pci bus latency timer register ........................................................................................ 16-4 3 16-37 pci configuration and status register base address register (pcsrbar) .................... 16-44 16-38 32?bit memory base address register.............................................................................. 16-44 16-39 64-bit low memory base address register ...................................................................... 16-45 16-40 64-bit high memory base address register ..................................................................... 16-46 16-41 pci subsystem vendor id register .................................................................................... 16-46 16-42 pci subsystem id register................................................................................................. 16-47
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 lvi freescale semiconductor figures figure number title page number 16-43 pci bus capabilities pointer register ................................................................................ 16-47 16-44 pci bus interrupt line register.......................................................................................... 1 6-47 16-45 pci bus interrupt pin register............................................................................................ 16-48 16-46 pci bus minimum grant register...................................................................................... 16-48 16-47 pci bus maximum latency register ................................................................................. 16-49 16-48 pci bus function register................................................................................................. . 16-49 16-49 pci bus arbiter configuration register ............................................................................. 16-50 16-50 pci-x next capabilities id register.................................................................................. 16-51 16-51 pci-x capability pointer register...................................................................................... 16- 51 16-52 pci-x command register .................................................................................................. 16 -52 16-53 pci-x status register ..................................................................................................... .... 16-53 16-54 pci/x arbitration example ................................................................................................ 1 6-55 16-55 pci single-beat read transaction...................................................................................... 16-6 3 16-56 pci burst read transaction................................................................................................ 16-63 16-57 pci single-beat write transaction ..................................................................................... 16-6 4 16-58 pci burst write transaction ............................................................................................... 16-64 16-59 pci target-initiated terminations....................................................................................... 16 -67 16-60 dac single-beat read example ........................................................................................ 16-69 16-61 dac burst read example .................................................................................................. 16 -69 16-62 dac single-beat write example ....................................................................................... 16-69 16-63 dac burst write example ................................................................................................. 16 -70 16-64 64-bit dual address read cycle ........................................................................................ 16-7 0 16-65 standard pci configuration header ................................................................................... 16-71 16-66 pci type 0 configuration translation ................................................................................ 16-75 16-67 pci parity operation ...................................................................................................... ..... 16-79 16-68 ad[31:0] during pci-x burst/dword attribute phase.................................................. 16-83 16-69 typical pci-x write transaction........................................................................................ 16- 85 16-70 burst memory write transaction........................................................................................ 16-8 6 16-71 memory read block transaction ....................................................................................... 16-87 16-72 dword (4-byte) write transaction ................................................................................. 16-88 16-73 dword (4-byte) read transaction .................................................................................. 16-88 16-74 split response to a read transaction ................................................................................. 16-90 16-75 split response to a dword (4-byte) write transaction.................................................. 16-90 16-76 split completion transaction address ad[31:0]............................................................... 16-91 16-77 ad[31:0] during pci-x split completi on attribute phase ............................................... 16-92 16-78 pci-x split completion message format .......................................................................... 16-92 16-79 pci-x type 0 configuration translation............................................................................ 16-94 16-80 ad[31:0] during pci-x configuration attribute phase .................................................... 16-95 17-1 rapidio high level block diagram .................................................................................... 17-2 17-2 rapidio interface signals model ......................................................................................... 17- 7
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor lvii figures figure number title page number 17-3 device identity capability register (didcar) ................................................................. 17-13 17-4 device information capability register (dicar) ............................................................. 17-14 17-5 assembly identity capability register (aidcar) ............................................................ 17-14 17-6 assembly information capability register (aicar) ........................................................ 17-15 17-7 processing element features capability register (pefcar)............................................ 17-15 17-8 switch port information capability register (spicar) .................................................... 17-17 17-9 source operations capability register (socar) .............................................................. 17-17 17-10 destination operations capability register (docar) ...................................................... 17-20 17-11 mailbox status register (msr).......................................................................................... 17- 22 17-12 port-write and doorbell command and status register (pwdcsr) ................................ 17-23 17-13 processing element logic layer control command and status register (pellccsr) ................................................................................................................. 17-2 4 17-14 local configuration space base address 1 command and status register (lcsba1csr) ................................................................................................ 17-25 17-15 base device id command and status register (bdidcsr)............................................. 17-25 17-16 host base device id lock command and status register (hbdidlcsr)...................... 17-26 17-17 component tag command and status register (ctcsr) ................................................. 17-26 17-18 8/16 lp-lvds port maintenance block header 0 command and status register (pmbh0csr) .................................................................................................. 17-27 17-19 port link time-out control command and status register (pltoccsr)....................... 17-28 17-20 port response time-out control command and status register (prtoccsr) .............. 17-28 17-21 port general control command and status register (pgccsr)....................................... 17-29 17-22 port link maintenance request command and status register (plmreqcsr)............. 17-30 17-23 port link maintenance response command and status register (plmrespcsr)......... 17-30 17-24 port local ackid status command and status register (plascsr)............................... 17-31 17-25 port error and status command and status register (pescsr) ....................................... 17-32 17-26 port control command and status register (pccsr) ....................................................... 17-33 17-27 configuration register (cr) ............................................................................................... 17-34 17-28 port configuration register (pcr) ..................................................................................... 17-3 5 17-29 port error injection register (peir)................................................................................... 17- 36 17-30 rapidio outbound window translation address registers 0?8 for standard transactions (rowtar n ) ............................................................................................. 17-37 17-31 rapidio outbound window translation address registers 0?8 for maintenance transactions (rowtar n ) ....................................................................... 17-38 17-32 rapidio outbound window base address registers 1?8 (rowbar n ) .......................... 17-38 17-33 rapidio outbound window attributes register 0 (rowar0) ......................................... 17-39 17-34 rapidio outbound window attributes registers 1?8 (rowar n ) ................................... 17-39 17-35 rapidio inbound window translation address registers 0?4 (riwtar n )..................... 17-41 17-36 rapidio inbound window base address registers 1?4 (riwbar n )............................... 17-41 17-37 rapidio inbound window attributes register 0 (riwar0) ............................................. 17-42
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 lviii freescale semiconductor figures figure number title page number 17-38 rapidio inbound window attributes registers 1?4 (riwar n )........................................ 17-42 17-39 port notification/fatal error detect register (pnfedr) .................................................. 17-44 17-40 port notification/fatal error detect disable register (pnfedir) .................................... 17-47 17-41 port notification/fatal error interrupt enable register (pnfeier).................................. 17-49 17-42 port error capture status register (pecsr) ...................................................................... 17-52 17-43 error packet capture register 0 (epcr0) .......................................................................... 17-52 17-44 error packet capture register 1 (epcr1)?type 1 packet format................................... 17-53 17-45 error packet capture register 1 (epcr1)?type 2 packet format................................... 17-54 17-46 error packet capture register 1 (epcr1)?type 5 packet format................................... 17-54 17-47 error packet capture register 1 (epcr1)?type 6 packet format................................... 17-55 17-48 error packet capture register 1 (epcr1)?type 8 request packet format..................... 17-55 17-49 error packet capture register 1 (epcr1)?type 8 response packet format .................. 17-56 17-50 error packet capture register 1 (epcr1)?type 10 packet format................................. 17-57 17-51 error packet capture register 1 (epcr1)?type 11 packet format ................................. 17-57 17-52 error packet capture register 1 (epcr1)?type 13 packet format................................. 17-58 17-53 error packet capture register 2 (epcr2)?type 1, 2, or 5 packet format ...................... 17-58 17-54 error packet capture register 2 (epcr2)?type 6 packet format................................... 17-59 17-55 error packet capture register 2 (epcr2)?type 8 request packet format..................... 17-59 17-56 error packet capture register 2 (epcr2)?type 8 response packet format .................. 17-60 17-57 error packet capture register 2 (epcr2)?type 10 packet format................................. 17-60 17-58 error packet capture register 2 (epcr2)?type 11 or 13 packet format........................ 17-61 17-59 port recoverable error detect register (predr) ............................................................. 17-61 17-60 port error recovery threshold register (pertr)............................................................. 17-64 17-61 port retry threshold register (prtr) ............................................................................... 17-64 17-62 outbound mode register (omr) ....................................................................................... 17-65 17-63 outbound status register (osr) ........................................................................................ 17-6 7 17-64 outbound descriptor queue dequeue pointer address register (odqdpar)................. 17-69 17-65 outbound unit source address registers (osar) ............................................................ 17-69 17-66 outbound destination port registers (odpr) ................................................................... 17-70 17-67 outbound destination attributes register (odatr) ......................................................... 17-70 17-68 outbound double-word count register (odcr) .............................................................. 17-71 17-69 outbound descriptor queue enqueue pointer register (odqepar) ............................... 17-72 17-70 inbound mode register (imr) ........................................................................................... 17-7 3 17-71 inbound status register (isr) ............................................................................................ 1 7-74 17-72 inbound frame queue dequeue pointer address registers (ifqdpar)........................... 17-75 17-73 inbound frame queue enqueue pointer address registers (ifqepar) ........................... 17-76 17-74 doorbell mode register (dmr) ......................................................................................... 17-77 17-75 doorbell status register (dsr).......................................................................................... 17 -78 17-76 doorbell queue dequeue pointer address registers (dqdpar)...................................... 17-80 17-77 doorbell queue enqueue pointer address register (dqepar)........................................ 17-80
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor lix figures figure number title page number 17-78 port-write mode register (pwmr) ................................................................................... 17-81 17-79 port-write status register (pwsr) .................................................................................... 17-82 17-80 port-write queue base address register (pwqbar) ...................................................... 17-83 17-81 physical maintenance field (pmf) definition ................................................................... 17-86 17-82 outbound message queue structure................................................................................. 17-113 17-83 descriptor dequeue pointer and descriptor ..................................................................... 17-116 17-84 inbound mailbox structure ............................................................................................... 17 -117 17-85 inbound doorbell queue and pointer structure................................................................ 17-119 17-86 doorbell entry format ..................................................................................................... . 17-120 17-87 inbound port-write structure............................................................................................ 17 -122 18-1 por pll status register (porpllsr) .............................................................................. 18-4 18-2 por boot mode status register (porbmsr) .................................................................... 18-5 18-3 por i/o impedance status and control register (porimpscr)....................................... 18-6 18-4 por device status register (pordevsr) ......................................................................... 18-8 18-5 por debug mode status register (pordbgmsr) ........................................................... 18-9 18-6 por configuration register (gpporcr) ........................................................................... 18-9 18-7 general-purpose i/o control register (gpiocr).............................................................. 18-10 18-8 general-purpose output data register (gpoutdr) ........................................................ 18-11 18-9 general-purpose output data register (gpindr) ............................................................ 18-12 18-10 alternate function pin multiplex control register (pmuxcr) ....................................... 18-13 18-11 device disable register (devdisr)................................................................................. 18-13 18-12 power management control and status register (powmgtcsr) .................................. 18-15 18-13 machine check summary register (mcpsumr) ............................................................. 18-17 18-14 processor version register (pvr) ...................................................................................... 18-1 7 18-15 system version register (svr).......................................................................................... 18- 18 18-16 clock out control register (clkocr)............................................................................. 18-18 18-17 ddr dll control register (ddrdllcr)....................................................................... 18-19 18-18 local bus dll control register (lbdllcr) .................................................................. 18-20 18-19 e500 core power management state diagram ................................................................... 18-21 18-20 MPC8540 power management handshaki ng signals ........................................................ 18-26 19-1 performance monitor block diagram................................................................................... 19-2 19-2 performance monitor global control register (pmgc0).................................................... 19-5 19-3 performance monitor local control register a0 (pmlca0) ............................................. 19-6 19-4 performance monitor local control registers a1?a8 (pmlca1?pmlca8) ................... 19-6 19-5 performance monitor local control register b0 (pmlcb0).............................................. 19-7 19-6 performance monitor local control registers b1?b8 (pmlcb1?pmlcb8).................... 19-8 19-7 performance monitor counter register 0 (pmc0)............................................................. 19-10 19-8 performance monitor counter registers 1?8 (pmc1?pmc8)........................................... 19-10 19-9 duration threshold event sequence timing diagram ....................................................... 19-12 19-10 burst size, distance, granularity, and burstiness counting............................................... 19-13
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 lx freescale semiconductor figures figure number title page number 19-11 burstiness counting timing diagram ................................................................................ 19-15 20-1 debug and watchpoint monitor block diagram .................................................................. 20-2 20-2 watchpoint monitor control register 0 (wmcr0) ........................................................... 20-11 20-3 watchpoint monitor control register 1 (wmcr1) ........................................................... 20-13 20-4 watchpoint monitor address register (wmar) ............................................................... 20-13 20-5 watchpoint monitor address mask register (wmamr).................................................. 20-14 20-6 watchpoint monitor transaction mask register (wmtmr)............................................. 20-15 20-7 watchpoint monitor status register (wmsr) ................................................................... 20-16 20-8 trace buffer control register 0 (tbcr0).......................................................................... 20-17 20-9 trace buffer control register 1 (tbcr1).......................................................................... 20-18 20-10 trace buffer address register (tbar).............................................................................. 20-19 20-11 trace buffer address mask register (tbamr) ................................................................ 20-20 20-12 trace buffer transaction mask register (tbtmr) ........................................................... 20-20 20-13 trace buffer status register (tbsr).................................................................................. 20-21 20-14 trace buffer access control register (tbacr) ............................................................... 20-22 20-15 trace buffer read high register (tbadhr).................................................................... 20-23 20-16 trace buffer access data register (tbadr) .................................................................... 20-23 20-17 programmed context id register (pcidr) ....................................................................... 20-24 20-18 current context id register (ccidr) ............................................................................... 20-24 20-19 trigger out source register (tosr).................................................................................. 20-25 20-20 e500 coherency module dispatch (cmd) trace buffer entry .......................................... 20-30 20-21 ddr trace buffer entry .................................................................................................... . 20-31 20-22 pci trace buffer entry .................................................................................................... ... 20-32 20-23 rapidio trace buffer entry................................................................................................ 20-32 21-1 10/100 fast ethernet controller in relation to the osi protocol stack ............................... 21-1 21-2 ethernet/ieee 802.3 frame structure .................................................................................. 21-2 21-3 ethernet/ieee 802.3 frame structure with more details.................................................... 21-4 21-4 fec block diagram.......................................................................................................... .... 21-5 21-5 ievent register definition .............................................................................................. 21- 14 21-6 imask register definition ................................................................................................ 21 -17 21-7 edis register definition ................................................................................................... . 21-18 21-8 minflr register definition.............................................................................................. 21- 18 21-9 ptv register definition.................................................................................................... .. 21-19 21-10 dmactrl register definition ......................................................................................... 21-20 21-11 fifo_pause_ctrl register definition.......................................................................... 21-22 21-12 fifo_tx_thr register definition................................................................................... 21-23 21-13 fifo_tx_starve register definition ............................................................................ 21-24 21-14 fifo_tx_starve_shutoff register definition ........................................................ 21-25 21-15 tctrl register definition ................................................................................................ 2 1-25 21-16 tstat register definition ................................................................................................. 21-26
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor lxi figures figure number title page number 21-17 tbdlen register definition ............................................................................................. 21- 27 21-18 ctbptr register definition .............................................................................................. 21 -27 21-19 tbptr register definition................................................................................................. 21-28 21-20 tbase register definition ................................................................................................ 2 1-28 21-21 ostbd register definition................................................................................................ 2 1-29 21-22 ostbdp register definition.............................................................................................. 21 -31 21-23 rctrl register definition ................................................................................................ 2 1-31 21-24 rstat register definition ................................................................................................. 21-32 21-25 rbdlen register definition............................................................................................. 21- 33 21-26 crbptr register definition.............................................................................................. 21 -34 21-27 mrblr register definition............................................................................................... 21 -34 21-28 receive buffer descriptor pointer definition..................................................................... 21-35 21-29 rbase register definition ................................................................................................ 2 1-35 21-30 maccfg1 register definition .......................................................................................... 21-38 21-31 maccfg2 register definition .......................................................................................... 21-40 21-32 ipgifg register definition ................................................................................................ 21-41 21-33 half-duplex register definition......................................................................................... 21 -41 21-34 maximum frame length register definition..................................................................... 21-42 21-35 interface status register definition .................................................................................... 21 -43 21-36 station address part 1 register definition ......................................................................... 21-44 21-37 station address part 2 register definition ......................................................................... 21-44 21-38 iaddr n register definition .............................................................................................. 21-45 21-39 gaddr n register definition............................................................................................. 21-46 21-40 attr register definition.................................................................................................. . 21-47 21-41 attreli register definition............................................................................................. 21 -48 21-42 fec?mii connection........................................................................................................ .. 21-49 21-43 ethernet address recognition flowchart ........................................................................... 21-56 21-44 example of fec memory structure for bd ....................................................................... 21-64 21-45 buffer descriptor ring.................................................................................................... .... 21-64 21-46 transmit buffer descriptor ................................................................................................ . 21-65 21-47 receive buffer descriptor................................................................................................. .. 21-67
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 lxii freescale semiconductor figures figure number title page number
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor lxiii tables table number title page number ta bl e s 1 acronyms and abbreviated terms................................................................................... lxxxviii 2-1 target interface codes ...................................................................................................... ...... 2-1 2-2 local access windows example............................................................................................ 2-2 2-3 format of atmu window definitions................................................................................... 2-3 2-4 local access register memory map...................................................................................... 2-5 2-5 lawbar n field descriptions ............................................................................................... 2-6 2-6 lawar n field descriptions .................................................................................................. 2-6 2-7 overlapping local access windows ...................................................................................... 2-7 2-8 local memory configuration, control, and status register summary................................ 2-12 2-9 memory map.................................................................................................................. ....... 2-16 3-1 MPC8540 signal reference by functional block .................................................................. 3-4 3-2 MPC8540 alphabetical signal reference .............................................................................. 3-9 3-3 MPC8540 reset configuration signals ................................................................................ 3-16 3-4 output signal states during system reset........................................................................... 3-17 4-1 signal summary .............................................................................................................. ........ 4-1 4-2 system control signals?detailed signal descriptions ......................................................... 4-2 4-3 clock signals?detailed signal descriptions ........................................................................ 4-3 4-4 local configuration control register map ............................................................................ 4-4 4-5 ccsrbar field descriptions................................................................................................ 4- 5 4-6 altcbar field descriptions ................................................................................................ 4- 6 4-7 altcar field descriptions................................................................................................... 4-7 4-8 bptr field descriptions ..................................................................................................... ... 4-8 4-9 ccb clock pll ratio ......................................................................................................... .4-13 4-10 e500 core clock pll ratios ................................................................................................ 4 -13 4-11 boot rom location.......................................................................................................... .... 4-14 4-12 host/agent configuration................................................................................................... .. 4-15 4-13 cpu boot configuration..................................................................................................... .. 4-15 4-14 boot sequencer configuration.............................................................................................. 4 -16 4-15 tsec width configuration................................................................................................... 4-17 4-16 tsec1 protocol configuration ............................................................................................. 4- 17 4-17 tsec2 protocol configuration ............................................................................................. 4- 18 4-18 rapidio transmit clock source ................................. .......................................................... 4-1 8 4-19 rapidio device id .......................................................................................................... ..... 4-19 4-20 pci-32 configuration....................................................................................................... ..... 4-19 4-21 pci i/o impedance.......................................................................................................... ...... 4-19 4-22 pci arbiter configuration .................................................................................................. .. 4-20 4-23 pci debug configuration .................................................................................................... .4-20 4-24 pci/pci-x configuration .................................................................................................... .4-20
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 lxiv freescale semiconductor tables table number title page number 4-25 memory debug configuration.............................................................................................. 4-2 1 4-26 ddr debug configuration ................................................................................................... 4 -21 4-27 pci output hold configuration (cfg_pci_mode = 1) ........................................................... 4-22 4-28 pci-x output hold configuration (cfg_pci_mode = 0) ....................................................... 4-22 4-29 local bus output hold configuration.................................................................................. 4-22 4-30 general-purpose por configuration.................................................................................... 4-23 5-1 revision level-to-device marking cross-reference ............................................................. 5-5 5-2 performance monitor apu instructions ............................................................................... 5-12 5-3 cache block lock and unlock apu instructions ................................................................ 5-12 5-4 scalar and vector embedded floating-point apu instructions ........................................... 5-13 5-5 btb locking apu instructions............................................................................................ 5-13 5-6 interrupt registers......................................................................................................... ........ 5-22 5-7 interrupt vector registers and exception conditions........................................................... 5-24 5-8 differences between the e500 core and the powerquicc iii core implementation ......... 5-33 6-1 book e special-purpose registers (by spr abbreviation).................................................... 6-4 6-2 implementation-specific sprs (by spr abbreviation) ......................................................... 6-6 6-3 xer field description....................................................................................................... ..... 6-9 6-4 bi operand settings for cr fields ......................................................................................... 6- 9 6-5 cr0 bit descriptions ........................................................................................................ .... 6-11 6-6 msr field descriptions...................................................................................................... .. 6-12 6-7 pvr field descriptions ...................................................................................................... .. 6-14 6-8 tcr field descriptions ...................................................................................................... .. 6-15 6-9 tsr field descriptions ...................................................................................................... ... 6-16 6-10 ivor assignments ........................................................................................................... .... 6-20 6-11 esr field descriptions ..................................................................................................... .... 6-21 6-12 mcsr field descriptions .................................................................................................... .6-23 6-13 bbear field descriptions ................................................................................................... 6-25 6-14 bbtar field descriptions ................................................................................................... 6-25 6-15 bucsr field descriptions ................................................................................................... 6-26 6-16 hid0 field descriptions .................................................................................................... ... 6-27 6-17 hid1 field descriptions .................................................................................................... ... 6-28 6-18 l1csr0 field descriptions .................................................................................................. 6-30 6-19 l1csr1 field descriptions .................................................................................................. 6-31 6-20 l1cfg0 field descriptions .................................................................................................. 6-32 6-21 l1cfg1 field descriptions .................................................................................................. 6-33 6-22 mmucsr0 field descriptions............................................................................................. 6-34 6-23 mmucfg field descriptions .............................................................................................. 6-35 6-24 tlb0cfg field descriptions ............................................................................................... 6- 36 6-25 tlb1cfg field descriptions ............................................................................................... 6- 36 6-26 mas0 field descriptions?mmu read/write and replacement control .......................... 6-37
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor lxv tables table number title page number 6-27 mas1 field descriptions?descriptor context and configuration control........................ 6-38 6-28 mas2 field descriptions?epn and page attributes ......................................................... 6-39 6-29 mas3 field descriptions?rpn and access control ........................................................... 6-40 6-30 mas4 field descriptions?hardware replacement assist configuration.......................... 6-40 6-31 mas6?tlb search context register 0.............................................................................. 6-41 6-32 dbcr0 field descriptions ................................................................................................... 6-42 6-33 dbcr1 field descriptions ................................................................................................... 6-44 6-34 dbcr2 field descriptions ................................................................................................... 6-45 6-35 dbsr field descriptions.................................................................................................... .. 6-46 6-36 spefscr field descriptions................................................................................................ 6 -48 6-37 acc field descriptions..................................................................................................... ... 6-50 6-38 supervisor-level pmrs (pmr[5] = 1) ................................................................................. 6-51 6-39 user-level pmrs (pmr[5] = 0) (read only)...................................................................... 6-51 6-40 pmgc0 field descriptions ................................................................................................... 6-52 6-41 pmlca0?pmlca3 field descriptions ................................................................................. 6-53 6-42 pmlcb0?pmlcb3 field descriptions ................................................................................ 6-54 6-43 pmc0?pmc3 field descriptions ......................................................................................... 6-54 7-1 l2/sram memory-mapped registers................................................................................... 7-6 7-2 l2ctl field descriptions .................................................................................................... .. 7-8 7-3 l2cewar n field descriptions............................................................................................ 7-10 7-4 l2cewcr n field descriptions............................................................................................ 7-11 7-5 l2srbar n field descriptions............................................................................................. 7-12 7-6 l2errinjhi field description............................................................................................ 7-13 7-7 l2errinjlo field description .......................................................................................... 7-14 7-8 l2errinjctl field descriptions....................................................................................... 7-14 7-9 l2captdatahi field description..................................................................................... 7-15 7-10 l2captdatalo field description.................................................................................... 7-16 7-11 l2captecc field descriptions .......................................................................................... 7-16 7-12 l2errdet field descriptions ............................................................................................ 7-16 7-13 l2errdis field descriptions.............................................................................................. 7- 17 7-14 l2errinten field descriptions ........................................................................................ 7-18 7-15 l2errattr field descriptions .......................................................................................... 7-19 7-16 l2erraddr field description .......................................................................................... 7-20 7-17 l2errctl field descriptions ............................................................................................ 7-20 7-18 fastest read timing?hit in l2 ........................................................................................... 7-2 2 7-19 plru bit update algorithm ................................................................................................ 7- 28 7-20 plru-based victim selection mechanism .......................................................................... 7-29 7-21 l2 cache states............................................................................................................ ......... 7-30 7-22 state transitions due to core-initiated transactions ........................................................... 7-31 7-23 state transitions due to system-initiated transactions ....................................................... 7-33
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 lxvi freescale semiconductor tables table number title page number 8-1 ecm memory map .............................................................................................................. ... 8-3 8-2 eebacr field descriptions .................................................................................................. 8 -3 8-3 eebpcr field descriptions ................................................................................................... 8-4 8-4 eedr field descriptions..................................................................................................... ... 8-6 8-5 eeer field descriptions ..................................................................................................... ... 8-7 8-6 eeatr field descriptions.................................................................................................... .. 8-7 8-7 eeadr field descriptions .................................................................................................... .8-8 9-1 ddr memory interface signal summary .............................................................................. 9-4 9-2 memory address signal mappings......................................................................................... 9-4 9-3 memory interface signals?detailed signal descriptions ..................................................... 9-5 9-4 clock signals?detailed signal descriptions ........................................................................ 9-8 9-5 ddr memory controller memory map ................................................................................. 9-9 9-6 cs n _bnds field descriptions............................................................................................. 9-10 9-7 cs n _config field descriptions ........................................................................................ 9-11 9-8 timing_cfg_1 field descriptions .................................................................................... 9-12 9-9 timing_cfg_2 register field descriptions...................................................................... 9-13 9-10 ddr_sdram_cfg field descriptions.............................................................................. 9-15 9-11 ddr_sdram_mode field descriptions.......................................................................... 9-16 9-12 ddr_sdram_interval field descriptions .................................................................. 9-17 9-13 data_err_inject_hi field descriptions....................................................................... 9-17 9-14 data_err_inject_lo field descriptions ..................................................................... 9-18 9-15 ecc_err_inject field descriptions ............................................................................... 9-19 9-16 capture_data_hi field descriptions............................................................................ 9-19 9-17 capture_data_lo field descriptions........................................................................... 9-20 9-18 capture_ecc field descriptions .................................................................................... 9-20 9-19 err_detect field descriptions ....................................................................................... 9-21 9-20 err_disable field descriptions...................................................................................... 9-22 9-21 err_int_en field descriptions ........................................................................................ 9-23 9-22 capture_attributes field descriptions .................................................................... 9-23 9-23 capture_address field descriptions .......................................................................... 9-24 9-24 err_sbe field descriptions ............................................................................................... 9- 25 9-25 byte lane to data relationship ............................................................................................ 9 -30 9-26 supported ddr sdram device configurations ................................................................ 9-31 9-27 ddr sdram address multiplexing ................................................................................... 9-32 9-28 sdram command table ..................................................................................................... 9-3 4 9-29 ddr sdram interface timing intervals ............................................................................ 9-35 9-30 ddr sdram power-saving modes refresh configuration............................................... 9-43 9-31 memory controller?data beat ordering .............................................................................. 9-45 9-32 ddr sdram ecc syndrome encoding ............................................................................ 9-46 9-33 ddr sdram ecc syndrome encoding (check bits) ....................................................... 9-48
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor lxvii tables table number title page number 9-34 memory controller errors ................................................................................................... .9-49 9-35 memory interface configuration register initialization parameters.................................... 9-49 10-1 interrupt source signalling options ..................................................................................... 10- 2 10-2 processor interrupts generated outside the core?types and sources ............................... 10-4 10-3 e500 core-generated interrupts that cause a wake-up ........................................................ 10-5 10-4 internal interrupt assignments............................................................................................. . 10-7 10-5 pic interface signals ...................................................................................................... ...... 10-8 10-6 interrupt signals?detailed signal descriptions .................................................................. 10-8 10-7 pic register address map.................................................................................................. 1 0-10 10-8 frr field descriptions..................................................................................................... .. 10-16 10-9 gcr field descriptions ..................................................................................................... . 10-17 10-10 vir field descriptions .................................................................................................... ... 10-18 10-11 pir field descriptions .................................................................................................... .... 10-18 10-12 ipivpr n field descriptions................................................................................................ 10-19 10-13 svr field descriptions .................................................................................................... .. 10-20 10-14 tfrr field descriptions ................................................................................................... . 10-21 10-15 gtccr n field descriptions ............................................................................................... 10-21 10-16 gtbcr n field descriptions ............................................................................................... 10-22 10-17 gtvpr n field descriptions ............................................................................................... 10-23 10-18 gtdr n field descriptions ................................................................................................. 10-23 10-19 parameters for hourly interrupt timer cascade example.................................................. 10-24 10-20 tcr field descriptions .................................................................................................... .. 10-25 10-21 irqsr0 field descriptions ................................................................................................ 1 0-26 10-22 irqsr1 field descriptions ................................................................................................ 1 0-27 10-23 cisr0 field descriptions .................................................................................................. . 10-28 10-24 cisr1 field descriptions .................................................................................................. . 10-28 10-25 pm n mr0 field descriptions .............................................................................................. 10-29 10-26 pm n mr1 field descriptions .............................................................................................. 10-30 10-27 msgr n field descriptions ................................................................................................. 10-30 10-28 mer field descriptions.................................................................................................... .. 10-31 10-29 msr field descriptions.................................................................................................... .. 10-32 10-30 eivpr n field descriptions................................................................................................. 10-33 10-31 eidr n field descriptions ................................................................................................... 10-34 10-32 iivpr n field descriptions.................................................................................................. 10-35 10-33 iidr n field descriptions .................................................................................................... 10-36 10-34 mivpr n field descriptions................................................................................................ 10-36 10-35 midr n field descriptions.................................................................................................. 10-37 10-36 per-cpu registers?private access address offsets ........................................................ 10-38 10-37 ipidr n field descriptions.................................................................................................. 10-40 10-38 ctpr field descriptions ................................................................................................... . 10-40
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 lxviii freescale semiconductor tables table number title page number 10-39 whoami field descriptions ............................................................................................. 10-4 1 10-40 iack field descriptions ................................................................................................... . 10-42 10-41 eoi field descriptions.................................................................................................... .... 10-42 11-1 i 2 c interface signal description ........................................................................................... 11-3 11-2 i 2 c interface signal?detailed signal descriptions............................................................. 11-4 11-3 i 2 c memory map .................................................................................................................. 1 1-4 11-4 i2cadr field descriptions.................................................................................................. 11-5 11-5 i2cfdr field descriptions .................................................................................................. 11-6 11-6 i2ccr field descriptions ................................................................................................... .. 11-7 11-7 i2csr field descriptions ................................................................................................... .. 11-8 11-8 i2cdr field description .................................................................................................... .. 11-9 11-9 i2cdfsrr field descriptions............................................................................................ 11-1 0 12-1 duart signal overview ..................................................................................................... 1 2-3 12-2 duart signals?detailed signal descriptions .................................................................. 12-4 12-3 duart register summary .................................................................................................. 12- 5 12-4 urbr field definition ...................................................................................................... ... 12-6 12-5 uthr field definition ...................................................................................................... ... 12-7 12-6 udmb field definition ...................................................................................................... .. 12-7 12-7 udlb field definition ...................................................................................................... ... 12-8 12-8 baud rate examples ......................................................................................................... .... 12-8 12-9 uier field definitions ..................................................................................................... .... 12-9 12-10 uiir field definitions .................................................................................................... .... 12-10 12-11 uiir iid bits summary ..................................................................................................... . 12-11 12-12 ufcr field definitions .................................................................................................... .. 12-12 12-13 ulcr field definitions.................................................................................................... .. 12-13 12-14 parity selection using ulcr[pen], ulcr[sp], and ulcr[eps] .................................. 12-14 12-15 umcr field definitions.................................................................................................... . 12-14 12-16 ulsr field definitions .................................................................................................... .. 12-15 12-17 umsr field definitions .................................................................................................... . 12-17 12-18 uscr field definitions .................................................................................................... .. 12-17 12-19 uafr field definitions.................................................................................................... .. 12-18 12-20 udsr field definitions.................................................................................................... .. 12-19 12-21 udsr[txrdy] set conditions ......................................................................................... 12-19 12-22 udsr[txrdy] cleared conditions.................................................................................. 12-19 12-23 udsr[rxrdy] set conditions......................................................................................... 12-19 12-24 udsr[rxrdy] cleared .................................................................................................... 12- 20 13-1 signal properties?summary................................................................................................ 13 -5 13-2 local bus controller detailed signal descriptions .............................................................. 13-6 13-3 local bus controller memory map...................................................................................... 13-9 13-4 br n field descriptions ....................................................................................................... 13-11
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor lxix tables table number title page number 13-5 memory bank sizes in relation to address mask ............................................................. 13-13 13-6 or n ?gpcm field descriptions ....................................................................................... 13-14 13-7 or n ?upm field descriptions .......................................................................................... 13-16 13-8 or n ?sdram field descriptions .................................................................................... 13-18 13-9 mar field description...................................................................................................... . 13-19 13-10 m x mr field descriptions................................................................................................... 13-19 13-11 mrtpr field descriptions ................................................................................................. 1 3-22 13-12 mdr field description..................................................................................................... .. 13-22 13-13 lsdmr field descriptions ................................................................................................ 13 -23 13-14 lurt field descriptions ................................................................................................... . 13-25 13-15 lsrt field descriptions................................................................................................... .. 13-25 13-16 ltesr field descriptions .................................................................................................. 13-26 13-17 ltedr field descriptions.................................................................................................. 13-27 13-18 lteir field descriptions .................................................................................................. . 13-29 13-19 lteatr field descriptions................................................................................................ 1 3-30 13-20 ltear field descriptions.................................................................................................. 13-30 13-21 lbcr field descriptions................................................................................................... . 13-31 13-22 lcrr field descriptions................................................................................................... . 13-32 13-23 gpcm write control signal timing for lcrr[clkdiv] = 4 or 8.................................. 13-40 13-24 gpcm read control signal timing for lcrr[clkdiv] = 4 or 8................................... 13-41 13-25 gpcm write control signal timing for lcrr[clkdiv] = 2 ......................................... 13-42 13-26 gpcm read control signal timing for lcrr[clkdiv] = 2 .......................................... 13-43 13-27 boot bank field values after reset .................................................................................... 13-5 1 13-28 sdram interface commands ............................................................................................ 13-53 13-29 upm routines start addresses........................................................................................... 13- 64 13-30 ram word field descriptions ........................................................................................... 13-6 9 13-31 m x mr loop field use ....................................................................................................... 13-74 13-32 upm address multiplexing ................................................................................................ 13 -75 13-33 data bus requirements for read cycle............................................................................. 13-89 13-34 micron sdram devices.................................................................................................... 13 -91 13-35 lad n signal connections to 128-mbyte sdram ............................................................ 13-93 13-36 logical address bus partitioning ....................................................................................... 13- 94 13-37 sdram device address port during address phase ........................................................ 13-94 13-38 sdram device address port during read/write command...................................... 13-94 13-39 register settings for 128-mbytes sdrams....................................................................... 13-95 13-40 logical address partitioning .............................................................................................. 13-96 13-41 sdram device address port during address phase........................................................ 13-96 13-42 sdram device address port during read/write command..................................... 13-96 13-43 register settings for 512-mbyte sdrams ........................................................................ 13-96 13-44 sdram capacitance ......................................................................................................... . 13-99
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 lxx freescale semiconductor tables table number title page number 13-45 sdram ac characteristics ............................................................................................... 13- 99 13-46 local bus to msc8101 hdi16 connections.................................................................... 13-105 13-47 upm synchronization cycles ........................................................................................... 13-11 2 13-48 ehpi signals .............................................................................................................. ...... 13-119 14-1 tsec signals?detailed signal descriptions .................................................................... 14-10 14-2 module memory map summary......................................................................................... 14-13 14-3 module memory map ......................................................................................................... 1 4-14 14-4 ievent field descriptions................................................................................................ 14 -21 14-5 imask field descriptions ................................................................................................. 14 -24 14-6 edis field descriptions .................................................................................................... . 14-25 14-7 ecntrl field descriptions............................................................................................... 14- 25 14-8 minflr field descriptions ............................................................................................... 14- 27 14-9 ptv field descriptions ..................................................................................................... .. 14-27 14-10 dmactrl field descriptions........................................................................................... 14-28 14-11 tbipa field descriptions .................................................................................................. . 14-30 14-12 fifo_pause_ctrl field descriptions .......................................................................... 14-31 14-13 fifo_tx_thr field descriptions .................................................................................... 14-32 14-14 fifo_tx_starve field descriptions ............................................................................. 14-32 14-15 fifo_tx_starve_shutoff field descriptions.......................................................... 14-33 14-16 tctrl field descriptions.................................................................................................. 14-33 14-17 tstat field descriptions.................................................................................................. . 14-34 14-18 tbdlen field descriptions .............................................................................................. 14- 35 14-19 txic field descriptions ................................................................................................... .. 14-36 14-20 ctbptr field descriptions ............................................................................................... 14 -37 14-21 tbptr field descriptions .................................................................................................. 14-37 14-22 tbase field descriptions.................................................................................................. 14-38 14-23 ostbd field descriptions ................................................................................................. 1 4-39 14-24 ostbdp field descriptions ............................................................................................... 14 -40 14-25 rctrl field descriptions ................................................................................................. 1 4-41 14-26 rstat field descriptions .................................................................................................. 14-42 14-27 rbdlen field descriptions .............................................................................................. 14- 42 14-28 rxic field descriptions................................................................................................... .. 14-43 14-29 crbptr field descriptions ............................................................................................... 14 -44 14-30 mrblr field descriptions ................................................................................................ 14 -45 14-31 rbptr field descriptions.................................................................................................. 14-45 14-32 rbase field descriptions ................................................................................................. 1 4-46 14-33 maccfg1 field descriptions ........................................................................................... 14-49 14-34 maccfg2 field descriptions ........................................................................................... 14-51 14-35 ipgifg field descriptions ................................................................................................. 14-52 14-36 hafdup field descriptions .............................................................................................. 14- 53
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor lxxi tables table number title page number 14-37 maxfrm field descriptions ............................................................................................ 14-54 14-38 miimcfg field descriptions............................................................................................. 14- 55 14-39 miimcom field descriptions ........................................................................................... 14-56 14-40 miimadd field descriptions............................................................................................ 14-5 6 14-41 miimcon field descriptions ............................................................................................ 14-5 7 14-42 miimstat field descriptions ........................................................................................... 14-5 7 14-43 miimind field descriptions ............................................................................................. 14- 58 14-44 ifstat field descriptions ................................................................................................. 14-59 14-45 macstnaddr1 field descriptions ................................................................................ 14-60 14-46 macstnaddr2 field descriptions ................................................................................ 14-60 14-47 tr64 field descriptions ................................................................................................... .. 14-61 14-48 tr127 field descriptions .................................................................................................. . 14-62 14-49 tr255 field descriptions .................................................................................................. . 14-62 14-50 tr511 field descriptions .................................................................................................. . 14-63 14-51 tr1k field descriptions ................................................................................................... . 14-63 14-52 trmax field descriptions................................................................................................ 14 -64 14-53 trmgv field descriptions................................................................................................ 14 -64 14-54 rbyt field descriptions................................................................................................... . 14-65 14-55 rpkt field descriptions ................................................................................................... . 14-65 14-56 rfcs field descriptions ................................................................................................... . 14-66 14-57 rmca field descriptions .................................................................................................. 1 4-66 14-58 rbca field descriptions ................................................................................................... 14-67 14-59 rxcf field descriptions................................................................................................... . 14-67 14-60 rxpf field descriptions ................................................................................................... . 14-68 14-61 rxuo field descriptions ................................................................................................... 14-68 14-62 raln field descriptions ................................................................................................... 14-69 14-63 rflr field descriptions ................................................................................................... . 14-69 14-64 rcde field descriptions................................................................................................... . 14-70 14-65 rcse field descriptions ................................................................................................... . 14-70 14-66 rund field descriptions ................................................................................................... 14-71 14-67 rovr field descriptions ................................................................................................... 14-71 14-68 rfrg field descriptions................................................................................................... . 14-72 14-69 rjbr field descriptions................................................................................................... .. 14-72 14-70 rdrp field descriptions................................................................................................... . 14-73 14-71 tbyt field descriptions................................................................................................... . 14-73 14-72 tpkt field descriptions ................................................................................................... . 14-74 14-73 tmca field descriptions................................................................................................... 14-74 14-74 tbca field descriptions................................................................................................... . 14-75 14-75 txpf field descriptions ................................................................................................... . 14-75 14-76 tdfr field descriptions ................................................................................................... . 14-76
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 lxxii freescale semiconductor tables table number title page number 14-77 tedf field descriptions ................................................................................................... . 14-76 14-78 tscl field descriptions ................................................................................................... . 14-77 14-79 tmcl field descriptions ................................................................................................... 14-77 14-80 tlcl field descriptions ................................................................................................... . 14-78 14-81 txcl field descriptions................................................................................................... . 14-78 14-82 tncl field descriptions................................................................................................... . 14-79 14-83 tdrp field descriptions ................................................................................................... . 14-79 14-84 tjbr field descriptions ................................................................................................... .. 14-80 14-85 tfcs field descriptions................................................................................................... .. 14-80 14-86 txcf field descriptions ................................................................................................... . 14-81 14-87 tovr field descriptions ................................................................................................... 14-81 14-88 tund field descriptions ................................................................................................... 14-82 14-89 tfrg field descriptions ................................................................................................... . 14-82 14-90 car1 field descriptions ................................................................................................... . 14-83 14-91 car2 field descriptions ................................................................................................... . 14-84 14-92 cam1 field descriptions ................................................................................................... 14-85 14-93 cam2 field descriptions ................................................................................................... 14-87 14-94 iaddr n field description ................................................................................................. 14-88 14-95 gaddr n field description................................................................................................ 14-89 14-96 attr field descriptions ................................................................................................... . 14-89 14-97 attreli field descriptions .............................................................................................. 14 -90 14-98 tbi mii register set...................................................................................................... ..... 14-91 14-99 cr field descriptions ..................................................................................................... .... 14-92 14-100 sr descriptions.......................................................................................................... ......... 14-93 14-101 ana field descriptions................................................................................................... ... 14-94 14-102 pause priority resolution................................................................................................ . 14-96 14-103 anlpbpa field descriptions ............................................................................................ 14- 97 14-104 anex field descriptions .................................................................................................. . 14-98 14-105 annpt field descriptions ................................................................................................. 14-99 14-106 anlpanp field descriptions ............................................................................................ 14- 99 14-107 exst field descriptions .................................................................................................. 14-100 14-108 jd field description ..................................................................................................... .... 14-102 14-109 tbicon field descriptions ............................................................................................. 14- 103 14-110 gmii, mii, and tbi signal multiplexing ......................................................................... 14-108 14-111 rgmii and rtbi signal multiplexing ............................................................................. 14-109 14-112 shared signals........................................................................................................... .........14-111 14-113 steps of minimum register initialization ..........................................................................14-111 14-114 flow control frame structure .......................................................................................... 14- 120 14-115 non-error transmit interrupts .......................................................................................... 14 -121 14-116 non-error receive interrupts............................................................................................ 1 4-121
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor lxxiii tables table number title page number 14-117 interrupt coalescing timing threshold ranges ............................................................... 14-123 14-118 transmission errors ...................................................................................................... .... 14-124 14-119 reception errors ......................................................................................................... ...... 14-124 14-120 transmit data buffer descriptor (txbd) field descriptions .......................................... 14-127 14-121 receive buffer descriptor field descriptions .................................................................. 14-129 14-122 mii interface mode signal configuration ........................................................................ 14-131 14-123 shared mii signals....................................................................................................... ..... 14-132 14-124 mii mode register initialization steps............................................................................. 14-132 14-125 gmii interface mode signal configuration ..................................................................... 14-135 14-126 shared gmii signals...................................................................................................... ... 14-136 14-127 gmii mode register initialization steps.......................................................................... 14-136 14-128 tbi interface mode signal configuration .................. ...................................................... 14-138 14-129 shared tbi signals ....................................................................................................... .... 14-139 14-130 tbi mode register initialization steps ............................................................................ 14-140 14-131 rgmii interface mode signal configuration................................................................... 14-143 14-132 shared rgmii signals ..................................................................................................... . 14-144 14-133 rgmii mode register initialization steps ....................................................................... 14-144 14-134 rtbi interlace mode signal configuration...................................................................... 14-147 14-135 shared rtbi signals ...................................................................................................... ... 14-148 14-136 rtbi mode register initialization steps .......................................................................... 14-148 15-1 relationship of modes and features ..................................................................................... 15-3 15-2 dma mode field descriptions............................................................................................. 15- 3 15-3 dma signals?detailed signal descriptions....................................................................... 15-6 15-4 dma register summary ...................................................................................................... 1 5-7 15-5 mr n field descriptions ...................................................................................................... 15-11 15-6 sr n field descriptions ....................................................................................................... 15-13 15-7 clndar n field descriptions............................................................................................ 15-16 15-8 satr n field descriptions .................................................................................................. 15-17 15-9 sar n field descriptions .................................................................................................... 15-19 15-10 sar n field descriptions .................................................................................................... 15-19 15-11 datr n field descriptions.................................................................................................. 15-20 15-12 dar n field descriptions.................................................................................................... 15-22 15-13 dar n field descriptions.................................................................................................... 15-22 15-14 bcr n field descriptions .................................................................................................... 15-23 15-15 nlndar n field descriptions............................................................................................ 15-23 15-16 clsdar n field descriptions ............................................................................................ 15-24 15-17 nlsdar n field descriptions ............................................................................................ 15-25 15-18 ssr n field descriptions ..................................................................................................... 15-26 15-19 dsr n field descriptions .................................................................................................... 15-26 15-20 dgsr field descriptions................................................................................................... . 15-27
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 lxxiv freescale semiconductor tables table number title page number 15-21 channel state table....................................................................................................... ...... 15-36 15-22 dma list descriptor summary.......................................................................................... 15-38 15-23 dma list descriptor summary.......................................................................................... 15-38 15-24 dma paths................................................................................................................. ......... 15-43 16-1 por parameters for pci/x controller.................................................................................. 16-5 16-2 pci interface signals?detailed signal descriptions .......................................................... 16-8 16-3 pci/x memory-mapped register map............................................................................... 16-15 16-4 pci/x cfg_addr field descriptions.............................................................................. 16-19 16-5 pci/x cfg_data field descriptions ............................................................................... 16-19 16-6 pci/x int_ack field descriptions .................................................................................. 16-20 16-7 potar n field descriptions ............................................................................................... 16-21 16-8 potear n field descriptions............................................................................................. 16-22 16-9 powbar n field descriptions ........................................................................................... 16-22 16-10 powar n field descriptions .............................................................................................. 16-23 16-11 pitar n field descriptions ................................................................................................. 16-25 16-12 piwbar n field descriptions............................................................................................. 16-26 16-13 piwbear n field descriptions .......................................................................................... 16-26 16-14 piwar n field descriptions................................................................................................ 16-27 16-15 err_dr field descriptions ............................................................................................... 16 -30 16-16 err_cap_dr field descriptions ..................................................................................... 16-31 16-17 err_en field descriptions ............................................................................................... 16 -32 16-18 err_attrib field descriptions ...................................................................................... 16-32 16-19 err_addr field descriptions ......................................................................................... 16-33 16-20 err_ext_addr field descriptions ............................................................................... 16-34 16-21 err_dl field description................................................................................................. 1 6-34 16-22 err_dh field description ................................................................................................ 16 -35 16-23 gas_timr field descriptions .......................................................................................... 16-35 16-24 pcix_timr field descriptions ......................................................................................... 16-36 16-25 pci vendor id register field description ......................................................................... 16-38 16-26 pci device id register field description.......................................................................... 16-38 16-27 pci bus command register field descriptions ................................................................. 16-39 16-28 pci bus status register field descriptions........................................................................ 16-40 16-29 pci revision id register field descriptions ..................................................................... 16-41 16-30 pci bus programming interface register field description.............................................. 16-42 16-31 pci subclass code register field description................................................................... 16-42 16-32 pci bus base class code register field description ........................................................ 16-42 16-33 pci bus cache line size register (pclsr) field descriptions ....................................... 16-43 16-34 pci bus latency timer register field descriptions .......................................................... 16-43 16-35 pcsrbar field descriptions ............................................................................................ 16-4 4 16-36 32-bit memory base address register field descriptions ................................................ 16-45
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor lxxv tables table number title page number 16-37 64-bit low memory base address register field descriptions........................................ 16-45 16-38 64-bit high memory base address register field description......................................... 16-46 16-39 pci subsystem vendor id register field description ....................................................... 16-46 16-40 pci subsystem id register field description.................................................................... 16-47 16-41 pci bus capabilities pointer register field description ................................................... 16-47 16-42 pci bus interrupt line register field description............................................................. 16-48 16-43 pci bus interrupt pin register field description............................................................... 16-48 16-44 pci bus minimum grant register field description ......................................................... 16-48 16-45 pci bus maximum latency register field description .................................................... 16-49 16-46 pci bus function register field descriptions ................................................................... 16-49 16-47 pci bus arbiter configuration register field descriptions .............................................. 16-50 16-48 pci-x next capabilities id register field descriptions ................................................... 16-51 16-49 pci-x capability pointer register field description......................................................... 16-52 16-50 pci-x command register field descriptions.................................................................... 16-52 16-51 pci-x status register field descriptions........................................................................... 16-53 16-52 pci bus commands .......................................................................................................... .. 16-58 16-53 supported combinations of pci_ad[1:0].......................................................................... 16-59 16-54 pci configuration space header summary ....................................................................... 16-72 16-55 pci type 0 configuration?device number to ad n translation...................................... 16-75 16-56 special-cycle message encodings ..................................................................................... 16-77 16-57 pci mode error actions .................................................................................................... . 16-80 16-58 pci-x command encodings............................................................................................... 16-8 2 16-59 burst/dword transaction attribute summary ................................................................ 16-84 16-60 split completion transaction address ............................................................................... 16-91 16-61 pci-x split completion transaction attribute summary .................................................. 16-92 16-62 pci-x split completion message summary ...................................................................... 16-93 16-63 pci-x type 0 configuration?device number to ad n translation ................................. 16-95 16-64 pci-x configuration transaction attribute summary ....................................................... 16-96 16-65 pci-x mode error actions ................................................................................................. 1 6-97 16-66 affected configuration register bits for por ................................................................... 16-99 16-67 power-on reset values for affected configuration bits ................................................. 16-100 17-1 rapidio terminology ........................................................................................................ ... 17-4 17-2 crc checking mode .......................................................................................................... .. 17-6 17-3 accept all mode behavior ................................................................................................... 17-6 17-4 rapidio interface signals summary .................................................................................... 17-7 17-5 rapidio interface signals?detailed signal descriptions ................................................... 17-8 17-6 rapidio module memory map ............................................................................................ 17-9 17-7 didcar field descriptions ............................................................................................... 17- 13 17-8 dicar field description ................................................................................................... 1 7-14 17-9 aidcar field descriptions ............................................................................................... 17- 14
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 lxxvi freescale semiconductor tables table number title page number 17-10 aicar field descriptions.................................................................................................. 17-15 17-11 pefcar field descriptions ............................................................................................... 17 -15 17-12 spicar field descriptions ................................................................................................ 1 7-17 17-13 socar field descriptions ................................................................................................. 1 7-18 17-14 docar field descriptions ................................................................................................ 17 -20 17-15 msr field definitions ..................................................................................................... ... 17-22 17-16 pwdcsr field descriptions.............................................................................................. 17- 23 17-17 pellccsr field descriptions .......................................................................................... 17-24 17-18 lcsba1csr field descriptions........................................................................................ 17-25 17-19 bdidcsr field descriptions ............................................................................................. 17- 25 17-20 hbdidlcsr field descriptions........................................................................................ 17-26 17-21 ctcsr field descriptions.................................................................................................. 17-27 17-22 pmbh0csr field descriptions ......................................................................................... 17-27 17-23 pltoccsr field descriptions .......................................................................................... 17-28 17-24 prtoccsr field descriptions .......................................................................................... 17-28 17-25 pgccsr field descriptions ............................................................................................... 17 -29 17-26 plmreqcsr field descriptions ...................................................................................... 17-30 17-27 plmrespcsr field descriptions ..................................................................................... 17-30 17-28 plascsr field descriptions ............................................................................................. 17- 31 17-29 pescsr field descriptions................................................................................................ 1 7-32 17-30 pccsr field descriptions.................................................................................................. 17-33 17-31 cr field descriptions ..................................................................................................... .... 17-35 17-32 pcr field descriptions.................................................................................................... ... 17-35 17-33 peir field descriptions................................................................................................... ... 17-36 17-34 rowtar n standard field descriptions ............................................................................ 17-37 17-35 rowtar n maintenance field descriptions...................................................................... 17-38 17-36 rowbar n field descriptions........................................................................................... 17-39 17-37 rowar n field descriptions.............................................................................................. 17-39 17-38 riwtar n field descriptions............................................................................................. 17-41 17-39 riwbar n field descriptions ............................................................................................ 17-42 17-40 riwar n field descriptions ............................................................................................... 17-42 17-41 pnfedr field descriptions ............................................................................................... 17 -44 17-42 pnfedir field descriptions.............................................................................................. 17 -47 17-43 pnfeier field descriptions .............................................................................................. 17 -50 17-44 pecsr field descriptions .................................................................................................. 17-52 17-45 epcr0 field descriptions .................................................................................................. 17-53 17-46 epcr1 type 1 field descriptions ...................................................................................... 17-54 17-47 epcr1 type 2 field descriptions ...................................................................................... 17-54 17-48 epcr1 type 5 field descriptions ...................................................................................... 17-55 17-49 epcr1 type 6 field descriptions ...................................................................................... 17-55
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor lxxvii tables table number title page number 17-50 epcr1 type 8 request field descriptions ........................................................................ 17-56 17-51 epcr1 type 8 response field descriptions ...................................................................... 17-56 17-52 epcr1 type 10 field descriptions .................................................................................... 17-57 17-53 epcr1 type 11 field descriptions .................................................................................... 17-57 17-54 epcr1 type 13 field descriptions .................................................................................... 17-58 17-55 epcr2 type 1, 2, or 5 field descriptions .......................................................................... 17-59 17-56 epcr2 type 6 field descriptions ...................................................................................... 17-59 17-57 epcr2 type 8 request field descriptions ........................................................................ 17-60 17-58 epcr2 type 8 response field descriptions ...................................................................... 17-60 17-59 epcr2 type 10 field descriptions .................................................................................... 17-61 17-60 epcr2 type 11 or 13 field description............................................................................. 17-61 17-61 predr field descriptions ................................................................................................. 1 7-62 17-62 pertr field descriptions .................................................................................................. 17-64 17-63 prtr field descriptions ................................................................................................... . 17-65 17-64 omr field descriptions .................................................................................................... . 17-66 17-65 osr field descriptions .................................................................................................... .. 17-67 17-66 odqdpar field descriptions ........................................................................................... 17-69 17-67 osar field descriptions................................................................................................... . 17-69 17-68 odpr field descriptions................................................................................................... . 17-70 17-69 odatr field descriptions ................................................................................................. 1 7-70 17-70 odcr field descriptions ................................................................................................... 17-71 17-71 odqepar field descriptions............................................................................................ 17-7 2 17-72 imr field descriptions.................................................................................................... ... 17-73 17-73 isr field descriptions .................................................................................................... .... 17-74 17-74 ifqdpar field descriptions ............................................................................................. 17- 76 17-75 ifqepar field descriptions .............................................................................................. 17 -76 17-76 dmr field descriptions .................................................................................................... . 17-77 17-77 dsr field descriptions .................................................................................................... .. 17-78 17-78 dqdpar field descriptions .............................................................................................. 17- 80 17-79 dqepar field descriptions............................................................................................... 17 -81 17-80 pwmr field descriptions .................................................................................................. 1 7-81 17-81 pwsr field descriptions ................................................................................................... 17-82 17-82 pwqbar field descriptions ............................................................................................. 17-8 3 17-83 rapidio transaction summary........................................................................................... 17-8 4 17-84 rapidio packet format summary (tt = 0b00) ................................................................. 17-86 17-85 control symbol formats .................................................................................................... . 17-88 17-86 general device functionality list ...................................................................................... 17- 90 17-87 general device 8/16 lp-lvds physical layer basic functionality list .......................... 17-91 17-88 general device 8/16 lp-lvds physical layer link maintenance list ............................ 17-93 17-89 general device 8/16 lp-lvds physical layer pack et transmission list ........................ 17-93
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 lxxviii freescale semiconductor tables table number title page number 17-90 general device 8/16 lp-lvds physical layer packet reception list.............................. 17-94 17-91 general device 8/16 lp-lvds physical layer recoverable errors list .......................... 17-96 17-92 general device 8/16 lp-lvds physical layer nonr ecoverable errors list..................... 17-98 17-93 general device common transport layer basic functionality list.................................. 17-99 17-94 general device common transport layer packet transmission list................................ 17-99 17-95 general device common transport layer packet reception list ..................................... 17-99 17-96 general device common transport layer detectable errors list..................................... 17-99 17-97 general device logical layer basic functionality list................................................... 17-100 17-98 general device logical layer target transaction support list ...................................... 17-101 17-99 general device logical layer detectable errors list...................................................... 17-101 17-100 recoverable errors detected by rapidio controller ....................................................... 17-102 17-101 notification errors detected by rapidio controller........................................................ 17-104 17-102 fatal errors detected by rapidio controller ................................................................... 17-105 17-103 outbound message unit descriptor summary ................................................................. 17-116 17-104 target information definition ........................................................................................... 1 7-120 17-105 source information definition .......................................................................................... 17 -120 18-1 external signal summary .................................................................................................... . 18-2 18-2 detailed signal descriptions............................................................................................... .. 18-2 18-3 global utilities block register summary ............................................................................ 18-3 18-4 porpllsr field descriptions ............................................................................................ 18-5 18-5 porbmsr field descriptions ............................................................................................. 18-6 18-6 porimpscr field descriptions.......................................................................................... 18-7 18-7 pordevsr field descriptions ........................................................................................... 18-8 18-8 pordbgmsr field descriptions........................................................................................ 18-9 18-9 gpporcr field descriptions ............................................................................................ 18-10 18-10 gpiocr field descriptions................................................................................................ 1 8-10 18-11 gpoutdr field descriptions ........................................................................................... 18-11 18-12 gpindr field descriptions ............................................................................................... 18 -12 18-13 pmuxcr field descriptions ............................................................................................. 18-1 3 18-14 devdisr field descriptions ............................................................................................. 18- 14 18-15 powmgtcsr field descriptions ..................................................................................... 18-15 18-16 mcpsumr field descriptions .......................................................................................... 18-17 18-17 pvr field descriptions .................................................................................................... .. 18-18 18-18 svr field descriptions .................................................................................................... .. 18-18 18-19 clkocr field descriptions .............................................................................................. 18- 19 18-20 ddrdllcr field descriptions......................................................................................... 18-19 18-21 lbdllcr field descriptions ............................................................................................ 18-2 0 18-22 MPC8540 power management modes?basic description. .............................................. 18-22 18-23 power management entry protocol and initiating functional units .................................. 18-25 19-1 control register memory map ............................................................................................. 19- 4
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor lxxix tables table number title page number 19-2 pmgc0 field descriptions ................................................................................................... 19-5 19-3 pmlca0 field descriptions ................................................................................................ 19 -6 19-4 pmlca1?pmlc8 field descriptions.................................................................................. 19-6 19-5 pmlcb0 field descriptions................................................................................................. 1 9-7 19-6 pmlcb n field descriptions................................................................................................. 19-8 19-7 pmc0 field descriptions.................................................................................................... 19-10 19-8 pmc n field descriptions.................................................................................................... 19-10 19-9 burst definition........................................................................................................... ........ 19-13 19-10 performance monitor events .............................................................................................. 19 -15 19-11 pmgc0 and pmlcan settings .......................................................................................... 19-27 19-12 register settings for counting examples MPC8540.......................................................... 19-28 20-1 por configuration settings and debug modes ................................................................... 20-4 20-2 debug, watchpoint and test signal summary...................................................................... 20-6 20-3 debug signals?detailed signal descriptions ..................................................................... 20-7 20-4 watchpoint and trigger signals?detailed signal descriptions .......................................... 20-8 20-5 jtag test and other signals?detailed signal descriptions .............................................. 20-9 20-6 debug and watchpoint monitor memory map................................................................... 20-10 20-7 wmcr0 field descriptions................................................................................................ 20- 12 20-8 wmcr1 field descriptions................................................................................................ 20- 13 20-9 wmar field descriptions ................................................................................................. 20- 14 20-10 wmamr field descriptions.............................................................................................. 20-1 4 20-11 wmtmr field descriptions .............................................................................................. 20-1 5 20-12 transaction types by interface ........................................................................................... 2 0-15 20-13 wmsr field descriptions .................................................................................................. 2 0-16 20-14 tbcr0 field descriptions.................................................................................................. 20-17 20-15 tbcr1 field descriptions.................................................................................................. 20-19 20-16 tbar field descriptions................................................................................................... . 20-19 20-17 tbamr field descriptions ................................................................................................ 20 -20 20-18 tbtmr field descriptions ................................................................................................ 20 -21 20-19 tbsr field descriptions ................................................................................................... . 20-21 20-20 tbacr field descriptions ................................................................................................. 2 0-22 20-21 tbadhr field descriptions.............................................................................................. 20- 23 20-22 tbadr field descriptions................................................................................................. 2 0-23 20-23 pcidr field descriptions .................................................................................................. 20-24 20-24 ccidr field descriptions .................................................................................................. 20-25 20-25 tosr field descriptions ................................................................................................... . 20-26 20-26 source and target id values ............................................................................................... 20-26 20-27 cmd trace buffer entry field descriptions (tbcr1[ifsel] = 000) .............................. 20-30 20-28 ddr trace buffer entry field descriptions (tbcr1[ifsel] = 001) ............................... 20-31 20-29 pci trace buffer entry field descriptions (tbcr1[ifsel] = 010) ................................. 20-32
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 lxxx freescale semiconductor tables table number title page number 20-30 rapidio trace buffer entry field descriptions (tbcr1[ifsel] = 011).......................... 20-32 21-1 fec signals?detailed signal descriptions......................................................................... 21-8 21-2 module memory map summary......................................................................................... 21-10 21-3 module memory map ......................................................................................................... 2 1-10 21-4 ievent field descriptions................................................................................................ 21 -14 21-5 imask field descriptions ................................................................................................. 21 -17 21-6 edis field descriptions .................................................................................................... . 21-18 21-7 minflr field descriptions ............................................................................................... 21- 19 21-8 ptv field descriptions ..................................................................................................... .. 21-20 21-9 dmactrl field descriptions........................................................................................... 21-20 21-10 fifo_pause_ctrl field descriptions ........................................................................... 21-23 21-11 fifo_tx_thr field descriptions .................................................................................... 21-24 21-12 fifo_tx_starve field descriptions ............................................................................. 21-24 21-13 fifo_tx_starve_shutoff field descriptions.......................................................... 21-25 21-14 tctrl field descriptions.................................................................................................. 21-26 21-15 tstat field descriptions.................................................................................................. . 21-27 21-16 tbdlen field descriptions .............................................................................................. 21- 27 21-17 ctbptr field descriptions ............................................................................................... 21 -28 21-18 tbptr field descriptions .................................................................................................. 21-28 21-19 tbase field descriptions.................................................................................................. 21-29 21-20 ostbd field descriptions ................................................................................................. 2 1-29 21-21 ostbdp field descriptions ............................................................................................... 21 -31 21-22 rctrl field descriptions ................................................................................................. 2 1-32 21-23 rstat field descriptions .................................................................................................. 21-33 21-24 rbdlen field descriptions .............................................................................................. 21- 33 21-25 crbptr field descriptions ............................................................................................... 21 -34 21-26 mrblr field descriptions ................................................................................................ 21 -34 21-27 rbptr field descriptions.................................................................................................. 21-35 21-28 rbase field descriptions ................................................................................................. 2 1-35 21-29 maccfg1 field descriptions ........................................................................................... 21-38 21-30 maccfg2 field descriptions ........................................................................................... 21-40 21-31 ipgifg field descriptions ................................................................................................. 21-41 21-32 hafdup field descriptions .............................................................................................. 21- 42 21-33 maxfrm descriptions...................................................................................................... 2 1-43 21-34 ifstat field descriptions ................................................................................................. 21-43 21-35 macstnaddr1 field descriptions ................................................................................ 21-44 21-36 macstnaddr2 field descriptions ................................................................................ 21-45 21-37 iaddr n field description ................................................................................................. 21-45 21-38 gaddr n field description................................................................................................ 21-46 21-39 attr field descriptions ................................................................................................... . 21-47
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor lxxxi tables table number title page number 21-40 attreli field descriptions .............................................................................................. 21 -48 21-41 mii interface signals ..................................................................................................... ..... 21-49 21-42 steps of minimum register initialization ........................................................................... 21-50 21-43 flow control frame structure ............................................................................................ 21 -59 21-44 non-error transmit interrupts ............................................................................................ 2 1-60 21-45 non-error receive interrupts.............................................................................................. 21-60 21-46 transmission errors ....................................................................................................... ..... 21-61 21-47 reception errors .......................................................................................................... ....... 21-63 21-48 transmit data buffer descriptor (txbd) field descriptions ............................................ 21-65 21-49 receive buffer descriptor field descriptions .................................................................... 21-67 21-50 mii interface mode signal configuration .......................................................................... 21-70 21-51 mii mode register initialization steps............................................................................... 21-71
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 lxxxii freescale semiconductor tables table number title page number
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor lxxxiii about this book the primary objective of this reference manual is to define the functionality of the MPC8540. the MPC8540 integrates a powerpc? processor with system logic required for networking, storage, and general purpose embedded applications. the e500 processor core is a low-power implementation of the family of reduced instruction set computing (risc) embedded processors that implement the book e definition of the powerpc architecture. this book is intended as a companion to the powerpc e500 core complex reference manual . audience it is assumed that the reader understands operating systems, microprocessor system design, and the basic principles of risc processing. organization following is a summary and a brief description of the major parts of this reference manual: part i, ?overview,? describes the many features of the MPC8540 integrated host processor at an overview level. the following chapters are included:  chapter 1, ?overview,? provides a high-level description of features and functionality of the MPC8540 integrated host processor. it describes the MPC8540, its interfaces, and its programming model. the functional operation of the MPC8540 with emphasis on peripheral functions is also described.  chapter 2, ?memory map,? describes the memory map of the MPC8540. an overview of the local address map is followed by a description of how local access windows are used to define the local address map. the inbound and outbound address translation mechanisms used to map to and from external memory spaces are described next. finally, the configuration, control, and status registers are described, including a complete listing of all memory-mapped registers with cross references to the sections detailing descriptions of each.  chapter 3, ?signal descriptions,? provides a listing of all the external signals, cross-references for signals that serve multiple functions, output signal states at reset, and reset configuration signals (and the modes they define).  chapter 4, ?reset, clocking, and initialization,? describes the hard and soft resets, the power-on reset sequence, power-on reset (por) configuration, clocking, and initialization of the MPC8540.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 lxxxiv freescale semiconductor part ii, ?e500 core complex and l2 cache,? describes the many features of the MPC8540 core processor at an overview level and the interaction between the core complex and the l2 cache. the following chapters are included:  chapter 5, ?core complex overview,? provides an overview of the e500 core processor and the l1 caches and mmu that, together with the core, comprise the core complex.  chapter 6, ?core register summary,? provides a listing of the e500 registers in reference form.  chapter 7, ?l2 look-aside cache/sram,? describes the l2 cache of the MPC8540. note that the l2 cache can also be addressed directly as memory-mapped sram. part iii, ?memory and i/o interfaces,? defines the memory and i/o interfaces of the MPC8540 and how these blocks interact with one another and with other blocks on the device. the following chapters are included:  chapter 8, ?e500 coherency module,? defines the e500 coherency module and how it facilitates communication between the e500 core complex, the l2 cache, and the other blocks that comprise the coherent memory domain of the MPC8540. the ecm provides a mechanism for i/o-initiated transactions to snoop the core complex bus (ccb) of the e500 core in order to maintain coherency across cacheable local memory. it also provides a flexible, easily expandable switch-type structure for e500- and i/o-initiated transactions to be routed (dispatched) to target modules on the MPC8540.  chapter 9, ?ddr memory controller,? describes the ddr sdram memory controller of the MPC8540. this fully programmable controller supports most ddr memories available today, including both buffered and unbuffered devices. the built-in error checking and correction (ecc) ensures very low bit-error rates for reliable high-frequency operation. dynamic power management and auto-precharge modes simplify memory system design. a large set of special features like dll software override, crawl mode, and ecc error injection support rapid system debug.  chapter 10, ?programmable interrupt controller,? describes the embedded programmable interrupt controller (pic) of the MPC8540. this controller is an openpic-compliant interrupt controller that provides interrupt management, and is responsible for receiving hardware-generated interrupts from different sources (both internal and external), prioritizing them and delivering them to the cpu for servicing.  chapter 11, ?i 2 c interface,? describes the inter-ic (iic or i 2 c) bus controller of the MPC8540. this synchronous, serial, bidirectional, multi-master bus allows two-wire connection of devices, such as microcontrollers, eeproms, real-time clock devices, a/d converters and lcds. the MPC8540 powers up in boot sequencer mode which allows the i 2 c controller to initialize configuration registers.  chapter 12, ?duart,? describes the (dual) universal asynchronous receiver/transmitters (uarts) which feature a pc16552d-compatible programming model. these independent uarts are provided specifically to support system debugging.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor lxxxv  chapter 13, ?local bus controller,? describes the local bus controller of the MPC8540. the main component of the local bus controller (lbc) is its memory controller which provides a seamless interface to many types of memory devices and peripherals. the memory controller is responsible for controlling eight memory banks shared by a high performance sdram machine, a general-purpose chip-select machine (gpcm), and up to three user-programmable machines (upms). as such, it supports a minimal glue logic interface to synchronous dram (sdram), sram, eprom, flash eprom, burstable ram, regular dram devices, extended data output dram devices, and other peripherals.  chapter 14, ?three-speed ethernet controllers,? describes the 2 three-speed ethernet controllers on the MPC8540. these controllers provide 10/100/1000 mbps ethernet support with a complete set of media-independent interface options including gmii, rgmii, tbi, and rtbi. each controller provides very high throughput using a captive dma channel and direct connection to the MPC8540 memory coherency module.  chapter 15, ?dma controller,? describes the four-channel general-purpose dma controller of the MPC8540. the dma controller transfers blocks of data, independent of the e500 core or external hosts. data movement occurs among rapidio and the local address space. the dma controller has four high-speed channels. both the e500 core and external masters can initiate a dma transfer. all channels are capable of complex data movement and advanced transaction chaining.  chapter 16, ?pci/pci-x bus interface,? describes the pci/pci-x controller of the MPC8540.  chapter 17, ?rapidio interface,? describes the rapidio controller of the MPC8540. part iv, ?global functions and debug,? defines other global blocks of the MPC8540. the following chapters are included:  chapter 18, ?global utilities,? defines the global utilities of the MPC8540. these include power management, i/o device enabling, power-on-reset (por) configuration monitoring, general-purpose i/o signal use, and multiplexing for the interrupt and local bus chip select signals  chapter 19, ?performance monitor,? describes the performance monitor of the MPC8540. note that the MPC8540 performance monitor is similar to but separate from the performance monitor implemented on the e500 core.  chapter 20, ?debug features and watchpoint facility,? describes the debug features and watchpoint monitor of the MPC8540.  chapter 21, ?10/100 fast ethernet controller,? includes information about using the dual-speed ethernet controller of the MPC8540 for debug purposes.  appendix a, ?revision history,? lists the major differences between revisions of the MPC8540 powerquicc iii integrated host processor reference manual .
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 lxxxvi freescale semiconductor  this document also contains the following indexes: ? register index. contains listings of all memory-mapped registers implemented by the integrated logic. it does not include the following: ? e500 core registers. these registers are listed in the general index under e500 core, registers . ? configuration header registers defined by the pci specification. these registers are listed under pci/pci-x controller, register descriptions. ? general index. contains all entries except those for memory-mapped registers.  this reference manual also includes a glossary. suggested reading this section lists additional reading that provides background for the information in this manual as well as general information about the architecture. general information the following documentation, published by morgan-kaufmann publishers, 340 pine street, sixth floor, san francisco, ca, provides useful information about the powerpc architecture and computer architecture in general:  the powerpc architecture: a specification for a new family of risc processors , second edition, by international business machines, inc.  computer architecture: a quantitative approach , third edition, by john l. hennessy and david a. patterson  computer organization and design: the hardware/software interface , second edition, by david a. patterson and john l. hennessy related documentation freescale semiconductor documentation is available from the sources listed on the back cover of this manual; the document order numbers are included in parentheses for ease in ordering:  eref: a reference for freescale semiconductor book e and the e500 core ?this book provides a higher-level view of the programming model as it is defined by book e, the freescale semiconductor book e implementation standards, and the e500 microprocessor.  reference manuals (formerly called user?s manuals)?these books provide details about individual implementations .  addenda/errata to reference or user?s manuals?because some processors have follow-on parts, an addendum is provided that describes the additional features and functionality
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor lxxxvii changes. these addenda are intended for use with the corresponding reference or user?s manuals.  hardware specifications?hardware specifications provide specific data regarding bus timing, signal behavior, and ac, dc, and thermal characteristics, as well as other design considerations.  technical summaries?each device has a technical summary that provides an overview of its features. this document is roughly equivalent to the overview (chapter 1) of an implementation?s reference or user?s manual.  application notes?these short documents address specific design issues useful to programmers and engineers working with freescale semiconductor processors. additional literature is published as new processors become available. for a current list of documentation, refer to http://www.freescale.com. conventions this document uses the following notational conventions: cleared/set when a bit takes the value zero, it is said to be cleared; when it takes a value of one, it is said to be set. mnemonics instruction mnemonics are shown in lowercase bold. italics italics indicate variable command parameters, for example, bcctr x. book titles in text are set in italics internal signals are set in lowercase italics, for example, core int 0x0 prefix to denote hexadecimal number 0b0 prefix to denote binary number r a, r b instruction syntax used to identify a source gpr r d instruction syntax used to identify a destination gpr reg[field] abbreviations for registers are shown in uppercase text. specific bits, fields, or ranges appear in brackets. for example, msr[le] refers to the little-endian mode enable bit in the machine state register. x in some contexts, such as signal encodings, an unitalicized x indicates a don?t care. x an italicized x indicates an alphanumeric variable. n an italicized n indicates a numeric variable. ? not logical operator & and logical operator
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 lxxxviii freescale semiconductor | or logical operator || concatenation, for example tcr[wpext]||tcr[wp] indicates a reserved bit field in an e500 register. although these bits can be written to as ones or zeros, they are always read as zeros. indicates a reserved bit field in a memory-mapped register. although these bits can be written to as ones or zeros, they are always read as zeros. indicates a read-only bit field in a memory-mapped register. indicates a write-only bit field in a memory-mapped register. although these bits can be written to as ones or zeros, they are always read as zeros. signal conventions overbar an overbar indicates that a signal is active-low. lowercase_italics lowercase italics is used to indicate internal signals. lowercase_plaintext lowercase plain text is used to indicate signals that are used for configuration. for more information, see section 3.2, ?configuration signals sampled at reset.? acronyms and abbreviations table i contains acronyms and abbreviations used in this document. table 1. acronyms and abbreviated terms term meaning adb allowable disconnect boundary atm asynchronous transfer mode atmu address translation and mapping unit bd buffer descriptor bist built-in self test bri basic rate interface btb branch target buffer buid bus unit id cam content-addressable memory ccb core complex bus ? r0 w r fieldname w r w fieldname
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor lxxxix ccsr configuration control and status register cept conference des administrations europeanes des postes et telecommunications (european conference of postal and telecommunications administrations). col collision crc cyclic redundancy check crs carrier sense ddr double data rate dma direct memory access dpll digital phase-locked loop dram dynamic random access memory duart dual universal asynchronous receiver/transmitter ea effective address ecc error checking and correction ecm e500 coherency module eest enhanced ethernet serial transceiver ehpi enhanced host port interface eprom erasable programmable read-only memory fcs frame-check sequence gci general circuit interface gmii gigabit media independent interface gpcm general-purpose chip-select machine gpio general-purpose i/o gpr general-purpose register gui graphical user interface hdlc high-level data link control i 2 c inter-integrated circuit idl inter-chip digital link ieee institute of electrical and electronics engineers ipg interpacket gap irda infrared data association isdn integrated services digital network itlb instruction translation lookaside buffer iu integer unit table 1. acronyms and abbreviated terms (continued) term meaning
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xc freescale semiconductor jtag joint test action group lae local access error law local access window lbc local bus controller lifo last-in-first-out lru least recently used lsb least-significant byte lsb least-significant bit lsu load/store unit mac multiply accumulate, media access control mdi medium-dependent interface mesi modified/exclusive/shared/invalid?cache coherency protocol mii media independent interface mmu memory management unit msb most-significant byte msb most-significant bit nmsi nonmultiplexed serial interface no-op no operation ocean on-chip network osi open systems interconnection pci peripheral component interconnect pci/x abbreviation used to describe operation for both the pci and pci-x bus functionality pci-x pci extended pcmcia personal computer memory card international association pcs physical coding sublayer pic programmable interrupt controller pma physical medium attachment pmd physical medium dependent por power-on reset pri primary rate interface rgmii reduced gigabit media independent interface risc reduced instruction set computing table 1. acronyms and abbreviated terms (continued) term meaning
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor xci rio abbreviation occasionally used to refer to the rapidio interface rtos real-time operating system rwitm read with intent to modify rwm read modify write rx receive rxbd receive buffer descriptor scp serial control port sdlc synchronous data link control sdma serial dma sfd start frame delimiter si serial interface siu system interface unit smc serial management controller sna systems network architecture spi serial peripheral interface spr special-purpose register sram static random access memory tap test access port tbi ten-bit interface tdm time-division multiplexed tlb translation lookaside buffer tsa time-slot assigner tsec three-speed ethernet controller tx transmit txbd transmit buffer descriptor uart universal asynchronous receiver/transmitter upm user-programmable machine usb universal serial bus utp unshielded twisted pair va virtual address zbt zero bus turnaround table 1. acronyms and abbreviated terms (continued) term meaning
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 xcii freescale semiconductor
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor i-1 part i overview part i describes the many features of the MPC8540 integrated host processor at an overview level. the following chapters are included:  chapter 1, ?overview?  chapter 2, ?memory map?  chapter 3, ?signal descriptions?  chapter 4, ?reset, clocking, and initialization? chapter 1, ?overview,? provides a high-level description of features and functionality of the MPC8540 integrated host processor. it describes the MPC8540, its interfaces, and its programming model. the functional operation of the MPC8540 with emphasis on peripheral functions is also described. chapter 2, ?memory map,? describes the MPC8540 memory map. an overview of the local address map is followed by a description of how local access windows are used to define the local address map. the inbound and outbound address translation mechanisms used to map to and from external memory spaces are described next. finally, the configuration, control, and status registers are described, including a complete listing of all memory mapped registers with cross references to the sections detailing descriptions of each. chapter 3, ?signal descriptions,? provides a listing of all the external signals, cross-references for signals that serve multiple functions, output signal states at reset, and reset configuration signals (and the modes they define). chapter 4, ?reset, clocking, and initialization,? describes the hard and soft resets, the power-on reset sequence, power-on reset (por) configuration, clocking, and initialization of the MPC8540.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 i-2 freescale semiconductor
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 1-1 chapter 1 overview the MPC8540 integrates a powerpc? processor core with system logic required for networking, storage, and general-purpose embedded applications. the MPC8540 is a member of a growing family of products that combine system-level support for industry standard interfaces to processors that implement the powerpc architecture. this chapter provides a high-level description of the features and functionality of the MPC8540 integrated microprocessor. 1.1 introduction the MPC8540 uses the e500 core and rapidio interconnect technology to balance processor performance with i/o system throughput. the e500 core implements the enhanced book e instruction set architecture and provides unprecedented levels of hardware and software debugging support. in addition, the MPC8540 offers 256 kbytes of l2 cache, 2 integrated 10/100/1gb three-speed ethernet controllers (tsecs), a 10/100 maintenance port, a ddr sdram memory controller, a 64-bit pci/pci-x controller, an 8-bit rapidio port, a programmable interrupt controller (pic), an i 2 c controller, a 4-channel dma controller, a general-purpose i/o port, and a dual universal asynchronous receiver/transmitter (duart). the high level of integration in the MPC8540 simplifies board design and offers significant bandwidth and performance. 1.2 MPC8540 overview the following section provides a high-level overview of the features of the MPC8540. figure 1-1 shows the major functional units in the MPC8540.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 1-2 freescale semiconductor overview figure 1-1. MPC8540 block diagram 1.2.1 key features the following is an overview of the MPC8540 feature set:  high-performance, 32-bit book e?enhanced core that implements the powerpc architecture ? 32-kbyte l1 instruction cache and 32-kbyte l1 data cache with parity protection. caches can be locked entirely or on a per-line basis, with separate locking for instructions and data. ? signal-processing engine (spe) auxiliary processing unit (apu) provides an extensive instruction set for vector (64-bit) integer, single-precision floating-point, and fractional operations. these instructions use both the upper and lower words of the 64-bit gprs as they are defined by the spe apu. ? the single-precision floating-point (spfp) apu provides an instruction set for single-precision (32-bit) floating-point instructions. ? memory management unit (mmu) especially designed for embedded applications ? enhanced hardware and software debug support ? performance monitor facility (similar to but different from the MPC8540 performance monitor described in chapter 19, ?performance monitor.? ) core complex 16 gb/s rapidio-8 133 mhz pci-x 64b 10/100/1gb mii, gmii,tbi, rtbi, rgmii mii, gmii,tbi, rtbi, rgmii mii serial irqs sdram ddr rom, 10/100/1gb sdram, gpio bus i 2 c tsec i2c interface tsec pci/pci-x bus interface e500 coherency module ddr memory controller local bus controller programmable interrupt controller duart e500 core 256-kbyte l2 cache/ sram 4-channel dma controller 10/100 fast ethernet controller 32-kbyte l1 instruction cache 32-kbyte l1 data cache ocean switch fabric rapidio interface
MPC8540 overview MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 1-3 the e500 defines features that are not implemented on the MPC8540. it also generally defines some features that the MPC8540 implements more specifically. an understanding of these differences can be critical to ensure proper operations. these differences are summarized in section 5.14, ?MPC8540 implementation details,? in the MPC8540 integrated processor reference manual . section 1.3.1, ?e500 core overview,? includes a comprehensive list of e500 core features.  256-kbyte l2 cache/sram ? can be configured as follows: ? full cache mode (256-kbyte cache) ? full memory-mapped sram mode (256-kbyte sram mapped as a single 256-kbyte block or two 128-kbyte blocks) ? half sram and half cache mode (128-kbyte cache and 128-kbyte memory-mapped sram) ? full error checking and correction (ecc) support on 64-bit boundary in both cache and sram modes ? cache mode supports instruction caching, data caching, or both ? external masters can force data to be allocated into the cache through programmed memory ranges or special transaction types (stashing). ? eight-way set-associative cache organization (1024 sets of 32-byte cache lines) ? supports locking the entire cache or selected lines. individual line locks are set and cleared through book e instructions or by externally mastered transactions. ? global locking and flash clearing done through writes to l2 configuration registers ? instruction and data locks can be flash cleared separately ? read and write buffering for internal bus accesses ? sram features include the following: ? i/o devices access sram regions by marking transactions as snoopable (global). ? regions can reside at any aligned location in the memory map. ? byte-accessible ecc is protected using read-modify-write transactions accesses for smaller than cache-line accesses  address translation and mapping unit (atmu) ? eight local access windows define mapping within local 32-bit address space ? inbound and outbound atmus map to larger external address spaces ? three inbound windows plus a configuration window on pci/pci-x ? four inbound windows plus a default and configuration window on rapidio ? four outbound windows plus default translation for pci ? eight outbound windows plus default translation for rapidio
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 1-4 freescale semiconductor overview  ddr memory controller ? programmable timing supporting ddr-1 sdram ? 64-bit data interface, up to 333-mhz data rate ? four banks of memory supported, each up to 1 gbyte ? dram chip configurations from 64 mbits to 1 gbit with x8/x16 data ports ? full ecc support ? page mode support (up to 16 simultaneous open pages) ? contiguous or discontiguous memory mapping ? read-modify-write support for rapidio atomic increment, decrement, set, and clear transactions ? sleep mode support for self-refresh sdram ? supports auto refreshing ? on-the-fly power management using cke signal ? registered dimm support ? fast memory access through jtag port ? 2.5-v sstl2 compatible i/o  rapidio interface unit ? 8-bit rapidio i/o and messaging protocols ? source-synchronous double data rate (ddr) interfaces ? supports small type systems (small domain, 8-bit device id) ? supports four priority levels (ordering within a level) ? reordering across priority levels ? maximum data payload of 256 bytes per packet ? packet pacing support at the physical layer ? crc protection for packets ? supports atomic operations increment, decrement, set, and clear ? lvds signaling  rapidio compliant message unit ? one inbound data message structure (inbox) ? one outbound data message structure (outbox) ? supports chaining and direct modes in the outbox ? support of up to 16 packets per message ? support of up to 256 bytes per packet and up to 4 kbytes of data per message ? supports one inbound doorbell message structure
MPC8540 overview MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 1-5  programmable interrupt controller (pic) ? programming model is compliant with the openpic architecture. ? supports 16 programmable interrupt and processor task priority levels ? supports 12 discrete external interrupts ? supports 4 message interrupts with 32-bit messages ? supports connection of an external interrupt controller such as the 8259 programmable interrupt controller ? four global high resolution timers/counters that can generate interrupts ? supports 22 other internal interrupt sources ? supports fully nested interrupt delivery ? interrupts can be routed to external pin for external processing. ? interrupts can be routed to the e500 core?s standard or critical interrupt inputs. ? interrupt summary registers allow fast identification of interrupt source. i 2 c controller ? two-wire interface ? multiple-master support ? master or slave i 2 c mode support ? on-chip digital filtering rejects spikes on the bus  boot sequencer ? optionally loads configuration data from serial rom at reset through the i 2 c interface ? can be used to initialize configuration registers and/or memory ? supports extended i 2 c addressing mode ? data integrity checked with preamble signature and crc  duart ? two 4-wire interfaces (sin, sout, rts , cts ) ? programming model compatible with the original 16450 uart and the pc16550d  10/100 fast ethernet controller (fec) ? operates at 10 to 100 megabits per second (mbps) as a device debug and maintenance port  local bus controller (lbc) ? multiplexed 32-bit address and data operating at up to 166 mhz ? eight chip selects support eight external slaves ? four- and eight-beat burst transfers
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 1-6 freescale semiconductor overview ? the 32-, 16-, and 8-bit port sizes are controlled by an on-chip memory controller. ? three protocol engines available on a per chip select basis: ? general-purpose chip select machine (gpcm) ? three user programmable machines (upms) ? dedicated single data rate sdram controller ? parity support ? default boot rom chip select with configurable bus width (8-,16-, or 32-bit)  two three-speed (10/100/1gb) ethernet controllers (tsecs) ? dual ieee 802.3, 802.3u, 802.3x, 802.3z, 802.3ac, 802.3ab compliant controllers ? support for different ethernet physical interfaces: ? 10/100/1gb ieee 802.3 gmii ? 10/100 mbps ieee 802.3 mii ? 10-mbps ieee 802.3 mii ? 1-gbps ieee 802.3z tbi ? 10/100/1gb rgmii/rtbi ? full- and half-duplex support ? buffer descriptors are backward compatible with mpc8260 and mpc860t 10/100 programming models ? 9.6-kbyte jumbo frame support ? rmon statistics support ? 2-kbyte internal transmit and receive fifos ? mii management interface for control and status ? programmable crc generation and checking ? ability to force allocation of header information and buffer descriptors into l2 cache  ocean switch fabric ? four-port crossbar packet switch ? reorders packets from a source based on priorities ? reorders packets to bypass blocked packets ? implements starvation avoidance algorithms ? supports packets with payloads of up to 256 bytes  integrated dma controller ? four-channel controller ? all channels accessible by both the local and remote masters
MPC8540 overview MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 1-7 ? extended dma functions (advanced chaining and striding capability) ? support for scatter and gather transfers ? misaligned transfer capability ? interrupt on completed segment, link, list, and error ? supports transfers to or from any local memory or i/o port ? selectable hardware-enforced coherency (snoop/no-snoop) ? ability to start and flow control each dma channel from external 3-pin interface ? ability to launch dma from single write transaction  pci/pci-x controller ? pci 2.2 and pci-x 1.0 compatible ? 64- or 32-bit pci port supports at 16 to 66 mhz ? 64-bit pci-x support up to 133 mhz ? host and agent mode support ? 64-bit dual address cycle (dac) support ? pci-x supports multiple split transactions ? supports pci-to-memory and memory-to-pci streaming ? memory prefetching of pci read accesses ? supports posting of processor-to-pci and pci-to-memory writes ? pci 3.3-v compatible ? selectable hardware-enforced coherency  power management ? fully static 1.2-v cmos design with 3.3- and 2.5-v i/o ? supports power saving modes: doze, nap, and sleep ? employs dynamic power management, which automatically minimizes power consumption of blocks when they are idle  system performance monitor ? supports eight 32-bit counters that c ount the occurrence of selected events ? ability to count up to 512 counter-specific events ? supports 64 reference events that can be counted on any of the 8 counters ? supports duration and quantity threshold counting ? burstiness feature that permits counting of burst events with a programmable time between bursts ? triggering and chaining capability ? ability to generate an interrupt on overflow
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 1-8 freescale semiconductor overview  system access port ? uses jtag interface and a tap controller to access entire system memory map ? supports 32-bit accesses to configuration registers ? supports cache-line burst accesses to main memory ? supports large block (4-kbyte) uploads and downloads ? supports continuous bit streaming of entire block for fast upload and download  ieee 1149.1-compliant, jtag boundary scan  783 fc-pbga package 1.3 MPC8540 architecture overview the following sections describe the major functional units of the MPC8540. 1.3.1 e500 core overview the MPC8540 uses the e500 microprocessor core complex. the e500 core has an internal pll that allows independent optimization of the operating frequencies. the core frequencies are derived from either the primary pci clock input or an external oscillator. for information regarding the e500 core refer to the following documents: ? eref: a reference for freescale semiconductor book e and the e500 core  powerpc e500 core complex reference manual  powerpc e500 application binary interface user's guide note the e500 defines features that are not implemented on the MPC8540. it also generally defines some features that the MPC8540 implements more specifically. an understanding of these differences can be critical to ensure proper operation. these differences are summarized in section 5.14, ?MPC8540 implementation details,? in the MPC8540 integrated processor reference manual . the following is a brief list of some of the key features of the e500 core complex:  implements full book e 32-bit architecture  implements additional instructions, registers, and interrupts defined by apus. the spe provides an extensive instruction set for 64-bit vector integer, single-precision floating-point, and fractional operations. the spfp apu provides scalar (32-bit) single-precision, floating-point instructions.
MPC8540 architecture overview MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 1-9 note the spe apu and spfp apu functionality will be implemented in the MPC8540, the mpc8560 and in their derivatives (that is, in all powerquicc iii devices). however, these instructions will not be supported in devices subsequent to powerquicc iii. freescale semiconductor strongly recommends that use of these instructions be confined to libraries and device drivers. customer software that uses spe or spfp apu instructions at the assembly level or that uses spe intrinsics will require rewriting for upward compatibility with next-generation powerquicc devices. freescale semiconductor offers a libmoto_e500 library that uses spe and spfp apu instructions. freescale will also provide future libraries to support next generation powerquicc devices.  l1 cache structure ? 32-kbyte, 32-byte line, eight-way set-associative instruction cache ? 32-kbyte, 32-byte line, eight-way set-associative data cache ? 1.5-cycle cache array access, 3-cycle load-to-use latency ? pseudo-lru replacement algorithm ? copy-back data cache  dual-dispatch superscalar  precise exception handling  seven-stage pipeline control  instruction unit ? twelve-entry instruction queue ? full hardware detection of interlocks ? dispatch up to two instructions per cycle ? dispatch serialization control ? register dependency resolution and renaming  branch unit (bu) ? dynamic branch prediction ? two-entry branch instruction queue (biq) ? executes all branch and cr logical instruction  completion unit ? as many as 14 instructions allowed in 14-entry completion queue ? in-order retirement of up to two instructions per cycle
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 1-10 freescale semiconductor overview ? completion and refetch serialization control ? synchronization for all instruction flow changes?interrupts and mispredicted branches  two simple execution units that perform the following: ? single-cycle add and subtract ? single-cycle shift and rotate ? single-cycle logical operations ? supports integer signal processing operations  multiple-cycle execution unit (mu) ? four-cycle latency for integer and floating-point multiplication (including integer, fractional, and both vector and scalar floating-point multiply instructions). ? variable-latency divide: 4, 11, 19, and 35 cycles for all book e, spe, and spfp divide instructions. note that the mu allows divide instructions to bypass the second two mu pipeline stages, freeing those stages for other mu instructions to execute in parallel. ? four-cycle floating-point multiply ? four-cycle floating-point add and subtract  signal processing engine apu (spe apu). the simd capability provided by the 64-bit execution units (miu, lsu, siu1) is not a separate execution unit. the hardware that executes 32-bit book e instructions also executes the lower half of 64-bit spu instructions. ? single-cycle integer add and subtract ? single-cycle logical operations ? single-cycle shift and rotate ? four-cycle integer pipelined multiplies ? 4-, 11-, 19-, and 35-cycle integer divides ? four-cycle single instruction multiple data (simd) pipelined multiply-accumulate (mac) ? 64-bit accumulator for mac operations ? single-precision floating-point operations  load/store unit (lsu) ? three-cycle load latency ? fully pipelined ? four-entry load queue allows up to four load misses before stalling ? can continue servicing load hits when load queue is full ? six-entry store queue allows full pipelining of stores
MPC8540 architecture overview MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 1-11  cache coherency ? bus support for hardware-enforced coherency (bus snooping)  core complex bus (ccb) ? high-speed, on-chip local bus with data tagging ? 32-bit address bus ? 60x-like address protocol with address pipelining and retry/copyback ? two general-purpose read data, one write data bus ? 128-bit data plus parity/tags (each data bus) ? supports out-of-order reads, in-order writes ? little to no data bus arbitration logic required for native systems ? easily adaptable to 60x-like environments ? supports one-level pipelining of addresses with address-retry responses  extended exception handling ? supports book e interrupt model ? interrupt vector prefix register (ivpr) ? vector offset registers (ivors) 0?15 as defined in book e, plus e500-defined ivors 32?35 ? exception syndrome register (esr) ? book e?defined preempting critical interrupt, including critical interrupt status registers (csrr0 and csrr1) and an rfci instruction ? e500-specific interrupts not defined in book e architecture ? spe apu unavailable exception ? floating-point data exception ? floating-point round exception ? performance monitor  memory management unit (mmu) ? data l1 mmu ? four-entry, fully-associative tlb array for variable-sized pages ? 64-entry, four-way set-associative tlb for 4-kbyte pages ? instruction l1 mmu ? four-entry, fully-associative tlb array for variable-sized pages ? 64-entry, four-way set-associative tlb for 4-kbyte pages
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 1-12 freescale semiconductor overview ? unified l2 mmu ? 16-entry, fully-associative tlb array for variable-sized pages ? 256-entry, two-way set-associative tlb for 4-kbyte pages ? software reload for tlbs ? virtual memory support for as much as 4 gbytes (2 32 ) of virtual memory ? real memory support for as much as 4 gbytes (2 32 ) of physical memory ? support for big-endian and true little-endian memory on a per-page basis  power management ? low power, 1.2-v design ? dynamic power management on the core minimizes power consumption of functional units, such as execution units, caches, and mmus, when they are idle. ? core power-saving modes: core-halted and core-stopped ? nap, doze, and sleep bits in hid0 that can be used to assert nap , doze , and sleep core output signals to initiate power-saving modes at the integrated-device level ? internal clock multipliers of 2x, 2.5x, and 3x from bus clock  testability ? lssd scan design ? jtag interface ? esp support ? abist for arrays ?lbist  reliability and serviceability ? internal code parity ? parity checking on e500 local bus 1.3.2 on-chip memory unit the MPC8540 contains an internal 256-kbyte memory array that can be configured as memory-mapped sram or as a look-aside l2 cache. the array can also be divided into two 128-kbyte arrays, one of which may be used as cache and the other as sram. the memory controller for this array connects to the core complex bus (ccb) and communicates through 128-bit read and write buses to the e500 core and the MPC8540 system logic.
MPC8540 architecture overview MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 1-13 the on-chip memory unit contains:  256 kbytes of on-chip memory ? l2 cache partitioning is configurable ? can act as a 256-kbyte l2 cache ?256-kbyte array organized as 1024 8-way sets of 32-byte cache lines ? array can be partitioned into 128-kbyte l2 cache and 128-kbyte memory mapped sram ? can act as two 128-kbyte memory-mapped sram arrays or a 256-kbyte sram region ? sram operation is byte-accessible ? data ecc on 64-bit boundaries (single-error correction, double-error detection) ? tag parity (1 bit covering all tag bits) ? cache mode supports instruction caching, data caching, or both ? external masters can force data to be allocated into the cache through programmed memory ranges or special transaction types ? separate locking for instructions and data so that locks can be set and cleared separately ? supports locking the entire cache or selected lines ? individual line locks are set and cleared through core-initiated instructions, by external reads or writes, or by accesses to programmed memory ranges ? flash clearing done through writes to l2 configuration registers ? locks for the entire cache may be set and cleared by accesses to memory-mapped control registers 1.3.2.1 on-chip memory as memory-mapped sram when the on-chip memory is configured as an sram, the 256 kbytes of memory can be configured to reside at any aligned location in the memory map. it is byte-accessible and fully ecc-protected, using read-modify-write transactions for sub-cacheline transactions. i/o devices can access the sram by marking transactions global so that they are directed to the ccb. 1.3.2.2 on-chip memory as l2 cache the MPC8540 on-chip memory arrays include a 256-kbyte data array, an address tag array, and a status array. the data array is organized as 1024 sets of 8 cache lines. each cache line size is 32 bytes. the replacement policy in each eight-way set is governed by a pseudo-lru algorithm. the data is protected with ecc, and the tag array is protected by parity.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 1-14 freescale semiconductor overview the l2 cache tags are non-blocking for efficient load/store and snooping operations. the l2 cache can be accessed internally while a load miss is pending (allowing hits under misses). subsequent to a load miss updating the memory, loads or stores can occur to that line on the very next cycle. the l2 status array maintains status bits for each line to determine the status of the line. different combinations of these bits result in different l2 states. note that because the cache is always write-through, there is no modified state. the status bits include the following:  v?valid  il?instruction locked  dl?data locked all accesses to the l2 memory are fully pipelined so back-to-back loads and stores can have single-cycle throughput. the cache can be configured to allocate instructions-only, data-only, or both. it can also be configured to allocate global i/o writes that correspond to a programmable address window or that use a special transaction type (stashing). in this way, dma engines or i/o devices can force data into the cache. line locks can be set in a variety of ways. the book e architecture defines instructions that explicitly set and clear locks in the l2. these instructions are supported by the core complex and the l2 controller. in addition, the l2 controller can be configured to lock all lines that fall into either of two specified address ranges when the line is allocated. finally, the entire cache can be locked by writing to a configuration register in the l2 cache controller. the status array tracks line locks as either instruction locks or data locks for each line, and the status array supports flash clearing of all instruction locks or data locks separately by writes to configuration registers in the l2 controller. 1.3.3 e500 coherency module (ecm) the e500 coherency module (ecm) provides a mechanism for i/o-initiated transactions to snoop the bus between the e500 core and the integrated l2 cache in order to maintain coherency across local cacheable memory. it also provides a flexible switch-type structure for core and i/o-initiated transactions to be routed or dispatched to target modules on the device. 1.3.4 ddr sdram controller the MPC8540 supports ddr-i sdram that operates at up to 166 mhz (333-mhz data rate). the memory interface controls main memory accesses and provides for a maximum of 3.5 gbytes of main memory. the memory controller can be configured to support the various memory sizes through software initialization of on-chip configuration registers.
MPC8540 architecture overview MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 1-15 the MPC8540 supports a variety of sdram configurations. sdram banks can be built using dimms or directly-attached memory devices. fifteen multiplexed address signals provide for device densities of 64 mbits, 128 mbits, 256 mbits, and 512 mbits, and 1 gbit. four chip select signals support up to four banks of memory. the MPC8540 supports bank sizes from 64 mbytes to 1 gbyte. nine column address strobes (mdm[0:8]) are used to provide byte selection for memory bank writes. the MPC8540 can be configured to retain the currently active sdram page for pipelined burst accesses. page mode support of up to 16 simultaneously open pages can dramatically reduce access latencies for page hits. depending on the memory system design and timing parameters, using page mode can save 3 to 4 clock cycles from subsequent burst accesses that hit in an active page. the MPC8540 supports ecc for system memory. using ecc, the MPC8540 detects and corrects all single-bit errors and detects all double-bit errors and all errors within a nibble. the MPC8540 can invoke a level of system power management by asserting the mcke sdram signal on-the-fly to put the memory into a low-power sleep mode. 1.3.5 programmable interrupt controller (pic) the programmable interrupt controller (pic) implements the necessary functions to provide a flexible solution for a general-purpose interrupt control. the interrupt controller unit implements the logic and programming structures of the openpic architecture. the MPC8540 interrupt controller unit supports its processor core and provides for 12 external interrupts (with fully nested interrupt delivery), 4 message interrupts, internal-logic driven interrupts, and 4 global high resolution timers. up to 16 programmable interrupt priority levels are supported. the interrupt controller unit can be bypassed to allow use of an external interrupt controller. inter-processor interrupt (ipi) communication is supported through the external interrupt and core reset signals of different processor cores on the same device. the four ipis are only used for self-interrupt in a single-core device such as the MPC8540. 1.3.6 i 2 c controller the inter-ic (iic or i 2 c) bus is a two-wire, bidirectional serial bus that provides a simple and efficient method of data exchange between devices. the synchronous, multiple-master bus of the i 2 c allows the MPC8540 to exchange data with other i 2 c devices, such as microcontrollers, eeproms, real-time clock devices, a/d converters, and lcds. the two-wire bus (serial data sda and serial clock scl) minimizes the interconnections between devices. the synchronous, multiple-master bus of the i 2 c allows the connection of additional devices to the bus for expansion and system development.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 1-16 freescale semiconductor overview the i 2 c controller is a true multiple-master bus; it includes collision detection and arbitration that prevents data corruption if two or more masters attempt to control the bus simultaneously. this feature allows for complex applications with multiprocessor control. the i 2 c controller consists of a transmitter/receiver unit, a clocking unit, and a control unit. the i 2 c unit supports general broadcast mode, and on-chip filtering rejects spikes on the bus. 1.3.7 boot sequencer the MPC8540 provides a boot sequencer that uses the i 2 c interface to access an external serial rom and loads the data into the MPC8540?s configuration registers. the boot sequencer is enabled by a configuration pin sampled at the negation of the MPC8540 hardware reset signal. if enabled, the boot sequencer holds the MPC8540 processor core in reset until the boot sequence is complete. if the boot sequencer is not enabled, the processor core exits reset and fetches boot code in default configurations. 1.3.8 dual universal asynchronous receiver/transmitter (duart) the MPC8540 includes a duart intended for use in maintenance, bringing-up, and debugging of systems. the MPC8540 provides a standard four-wire handshake (sin, sout, rts , cts ) for each port. the duart is a slave interface. an interrupt is provided to the interrupt controller or optionally steered externally to allow device handshakes. interrupts are generated for transmit, receive, line status, and modem status. the MPC8540 duart supports full-duplex operation. it is compatible with the pc16450 and pc16550 programming models. also, 16-byte fifos are supported for both the transmitter and the receiver. software programmable baud generators divide the system clock to generate a 16x clock. serial interface data formats (data length, parity, 1/1.5/2 stop bit, baud rate) are also software selectable. 1.3.9 10/100 fast ethernet controller the MPC8540 provides a 10/100 fast ethernet controller operating at 10 to 100 mbps as a device debug and maintenance port. the gigabit three-speed ethernet controllers (tsecs) are separate from this 10/100 fast ethernet controller and are defined and described in chapter 14, ?three-speed ethernet controllers.? the 10/100 ethernet standard supports the ieee 802.3 ethernet frame format, backward compatibility for installed media, and the use of full- or half-duplex csma/cd. the ethernet protocol implements the bottom two layers of the open systems interconnection (osi) 7-layer model, that is, the data-link and physical sublayers.
MPC8540 architecture overview MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 1-17 1.3.10 local bus controller (lbc) the MPC8540 local bus controller (lbc) port allows connections with a wide variety of external memories, dsps, and asics. three separate state machines share the same external pins and can be programmed separately to access different types of devices. the general-purpose chip select machine (gpcm) controls accesses to asynchronous devices using a simple handshake protocol. the user programmable machine (upm) can be programmed to interface to synchronous devices or custom asic interfaces. the sdram controller provides access to standard sdram. each chip select can be configured so that the associated chip interface can be controlled by the gpcm, upm, or sdram controller. all may exist in the same system. the gpcm provides a flexible asynchronous interface to sram, eprom, feprom, rom, and other devices such as asynchronous dsp host interfaces and cams. minimal glue logic is required. handshake signals can be configured to transition on fractions of the system clock. the gpcm does not support bursting. the upm allows an extremely flexible interface in which the programmer configures each of a set of general-purpose protocol signals by writing the transition pattern into a memory array. the upm supports synchronous and bursting interfaces. it also supports multiplexed addressing so that a simple dram interface can be implemented. the upm is entirely flexible in order to provide a very high degree of customization with respect to both asynchronous and burst-synchronous interfaces, which permits glueless or almost glueless connection to burst sram, custom asic, and synchronous dsp interfaces. the lbc provides a synchronous dram (sdram) machine that supplies the control functions and signals for glueless connection to jedec-compliant sdram devices. an internal dll (delay-locked loop) for bus clock generation ensures improved data setup margins for board designs. the sdram machine can optimize burst transfers and exploits interleaving to maximize data transfer bandwidth and minimize access latency. programmable row and column address multiplexing allows a variety of sdram configurations and sizes to be supported without hardware changes. 1.3.11 three-speed ethernet controllers (10/100/1gb) the MPC8540 has two on-chip three-speed ethernet controllers (tsecs). the tsecs incorporate a media access control sublayer (mac) that supports 10- and 100-mbps, and 1-gbps ethernet/802.3 networks with mii, gmii, rgmii, rtbi, and tbi physical interfaces. the tsecs include 2-kbyte receive and transmit fifos, and dma functions. the buffer descriptors are based on the mpc8260 and mpc860t 10/100 programming models. the MPC8540 tsecs support programmable crc generation and checking, rmon statistics, and jumbo frames of up to 9.6 kbytes. frame headers and buffer descriptors can be forced into the l2 cache to speed classification or other frame processing.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 1-18 freescale semiconductor overview 1.3.12 integrated dma the MPC8540 dma engine is capable of transferring blocks of data from any legal address range to any other legal address range. therefore, it can perform a dma transfer between any of its i/o or memory ports or even between two devices or locations on the same port. the four-channel dma controller allows chaining (both extended and direct) through local memory-mapped chain descriptors. scattering, gathering, and misaligned transfers are supported. in addition, advanced capabilities such as stride transfers and complex transaction chaining are supported. dma transfers can be initiated by a single write to a configuration register. there is also support for external control of transfers using dma_dreq , dma_dack , and dma_ddone handshake signals. dma descriptors encompass a rich set of attributes that allow dma transfers to bypass outbound address translation and supply external addresses and attributes directly to the rapidio port. local attributes such as snoop and l2-write stashing can be specified by descriptors. interrupts are provided on a completed segment, link, list, chain, or on an error condition. coherency is selectable and hardware enforced (snoop/no snoop). 1.3.13 pci controller the MPC8540 64-bit pci controller is compatible with the pci local bus specification, revision 2.2 and the pci-x addendum, revision 1.0 . the interface can function as a host or agent bridge interface in either pci or pci-x mode. both pci and pci-x modes support 64-bit addressing and 32-bit or 64-bit data buses. as a master, the MPC8540 supports read and write operations to the pci memory space, the pci i/o space, and the pci configuration space. also, the MPC8540 can generate pci special-cycle and interrupt-acknowledge commands. as a target, the MPC8540 supports read and write operations to system memory as well as configuration accesses. pci-x functionality includes split transaction support for four outstanding split transactions. split response data is returned in order without interleaving. as a target, the MPC8540 supports all pci-x sizes. as a master it internally combines transactions up to 256 bytes. an internal arbiter can be used to support up to five external masters. a round robin arbitration algorithm with two priority levels is used. 1.3.14 rapidio controller the rapidio interconnect unit on the MPC8540 is based on the rapidio interconnect specification, revision 1.1 . rapidio is a high-performance, point-to-point, low-pin-count,
MPC8540 architecture overview MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 1-19 packet-switched system-level interconnect that can be used in a variety of applications as an open standard. the rapidio architecture provides a rich variety of features including high data bandwidth, low-latency capability, and support for high-performance i/o devices, as well as providing message-passing and software-managed programming models. the rapidio unit on the MPC8540 supports the i/o and message-passing logical specifications, the common transport specification, and the 8/16 lp-lvds physical layer specification of the rapidio interconnect specification . it does not support the globally shared memory logical specification. highlights of the implementation include: support for four priority levels and ordering within a priority level, crc error management, 32- to 256-byte transactions and 8-bit data width ports. the physical layer of the rapidio unit can operate at up to 500 mhz. because the interface is defined as a source-synchronous, double-data-rate, lvds-signaling interconnect, the theoretical unidirectional peak bandwidth is 8 gbps. receive and transmit ports operate independently, resulting in an aggregate theoretical bandwidth of 16 gbps. 1.3.14.1 rapidio message unit the MPC8540?s rapidio messaging supports one inbox/outbox structure for data and one doorbell structure for messages. both chaining and direct modes are provided for the outbox, and messages can hold up to 16 packets of 256 bytes, or a total of 4 kbytes. 1.3.15 power management in addition to low-voltage operation and dynamic power management in its execution units, the MPC8540 supports four power consumption modes: full-on, doze, nap, and sleep. the three low-power modes: doze, nap, and sleep, can be entered under software control in the e500 core or by external masters accessing a configuration register. doze mode suspends execution of instructions in the e500 core. the core is left in a standby mode in which cache snooping and time base interrupts are still enabled. device logic external to the processor core is fully functional in this mode. nap mode shuts down clocks to all the e500 functional units except the time base, which can be disabled separately. no snooping is performed in nap mode, but the device logic external to the processor core is fully functional. sleep mode shuts down not only the e500 core, but all of the MPC8540 i/o interfaces as well. only the interrupt controller and power management logic remain enabled so that the device can be awakened.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 1-20 freescale semiconductor overview 1.3.16 clocking the MPC8540 takes in the pci_clk/sysclk signal as an input to the device pll and multiplies it by an integer from 1 to 16 to generate the core complex bus clock (the platform clock), which operates at the same frequency as the ddr dram data rate (for example, 266 or 333 mhz). the l2 cache also operates at this frequency. the e500 core uses the ccb clock as an input to its pll, which multiplies it again by 2, 2.5, 3, or 3.5 to generate the core clock. dlls are used in the ddr sdram controller and the local bus memory controller (lbc) to generate memory clocks. six differential clock pairs are generated for ddr sdrams. two clock outputs are generated for the lbc. the rapidio transmit clock may be sourced from one of three locations: the platform clock, the rapidio receive clock, or a special differential clock input. this input is designed to receive inputs from an external clock synthesis device driving a clock with a frequency of up to 500 mhz. 1.3.17 address map the MPC8540 supports a flexible physical address map. conceptually, the address map consists of local space and external address space. the local address map is 4 gbytes. the MPC8540 can be made part of a larger system address space through the mapping of translation windows. this functionality is included in the address translation and mapping units (atmus). both inbound and outbound translation windows are provided. the atmus allows the MPC8540 to be part of larger address maps such as the pci 64-bit address environment and the rapidio environment. 1.3.18 ocean switch fabric in order to reduce the strain on the core interconnects with the addition of new functional blocks in this generation of the powerquicc family, an on-chip non-blocking crossbar switch fabric called ocean (on-chip network) has been integrated to decrease contention, decrease latency, and increase bandwidth. this revolutionary non-blocking crossbar fabric allows for full-duplex port connections at 128 gbps concurrent throughput and independent per-port transaction queuing and flow control. 1.3.19 processing across the on-chip fabric when processing across the on-chip fabric, the atmus at each fabric port are used to determine the flow of data across the MPC8540. the atmus at each fabric port are responsible for generating a fabric port destination id as well as a new local device address. the port id and local
MPC8540 application examples MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 1-21 address are based on the programmed destination of the transaction. the following is a general overview of how the atmus process transactions over the on-chip fabric. (refer to figure 1-2 .) 1. when a transaction on one of the fabric ports begins, the atmu on the origination port translates the programmed destination address into both a destination fabric port id and a local device address. 2. the data is then processed across the on-chip fabric from the origination port to the destination port. 3. if the destination port connects off-chip (for example, to a pci or rapidio device), the local device address is translated by the destination port atmu to an outbound address with respect to the destination port?s memory map, and the data is processed accordingly. figure 1-2. processing transactions across the on-chip fabric 1.3.20 data processing with the e500 coherency module processing through the ecm is similar to processing across the on-chip fabric (in the sense of how data is received and transmitted) with the exception that the transaction passes through the ecm. the purpose of the ecm is to provide a means for any i/o transaction to maintain coherency with the cacheable ddr sdram and the local bus memory. however, simply using the ecm does not make transactions across it coherent. the e500 and l2 cache are snooped to maintain coherency only if the transaction across the ecm is designated as global (gbl bit set). otherwise, the transaction passes through the ecm using the ecm as a simple conduit to get to its destination. in essence, only global transactions across the ecm are coherent transactions; all other transactions (across the on-chip fabric) are non-coherent. 1.4 MPC8540 application examples the following section provides block diagrams of different MPC8540 applications. the MPC8540 is a very flexible device and can be configured to meet many system application needs. in order to build a system, many factors should be considered. 1.4.1 MPC8540 applications the MPC8540 can be used for control processing in applications such as routers, switches, network memory, internet access devices, storage systems, and image display systems (iads). figure 1-3 shows an MPC8540 as a control plane processor in a high-performance communication system using symmetric multiprocessing (smp). 1 2 3 atmu atmu
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 1-22 freescale semiconductor overview figure 1-3. high-performance communication system using smp figure 1-4 shows the MPC8540 as part of a high-end network card used in a system area network that is enabled by pci/pci-x . figure 1-4. high-performance communication system using MPC8540 66-mhz pci MPC8540 processor core complex 256k l2 memory block rapidio pci 2x genet memory control task processor processor core complex 256k l2 memory block local bus asic dual gigabit ethernet 133-mhz pci-x to network forwarding plane to control plane rapidio interface ddr memory asic accelerator hardware ddr memory tundra tsi 400 rapidio switch controller pci-x 133-mhz backplane dual 10/100/1gb ethernet control data gpcm/upm/ processor core complex 256k l2 memory block rapidio pci 2x genet memory control server raid controller ddr memory MPC8540 rtc/nvram rom fpga sdram
MPC8540 application examples MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 1-23 figure 1-5 shows the MPC8540 in a redundant array of independent disks (raid) controller application . figure 1-5. raid controller application using MPC8540 figure 1-6 illustrates the MPC8540 in a virtual private network (vpn) access that is enabled through rapidio and ethernet. figure 1-6. vpn access point enabled by rapidio and ethernet MPC8540 processor core complex 256k l2 memory block rapidio pci 2x genet memory control ddr memory rapidio switch asic xor dma ddr memory pci-x to system descriptor memory disk cache flash scsi control MPC8540 processor core complex 256k l2 memory block rapidio pci 2x genet memory control ddr memory asic xor dma ddr memory pci-x to system descriptor memory disk cach e flash scsi control pci-x 10/100/1g ethernet data in data out data out data in ddr memory security 190 64-bit 66 mhz pci MPC8540 processor core complex 256k l2 memory block rapidio pci 2x genet memory control 64-bit pci interface rapidio high bandwidth aggregators
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 1-24 freescale semiconductor overview figure 1-7 shows the MPC8540 in a serializer/deserializer (serdes) data transfer mode application enabled by ethernet. figure 1-7. MPC8540 with serdes figure 1-8 shows a dsp farm enabled by the MPC8540 using its local bus controller port. figure 1-8. MPC8540 with a dsp farm enabled by general-purpose chip select machine or user programmable machine on the local bus controller port data out using 10-bit interface data in using 10-bit interface serdes MPC8540 processor core complex 256k l2 memory block rapidio pci 2x genet memory control ddr memory serdes interface 10/100/1gb ethernet 10/100/1gb ethernet data out data in ddr memory security 190 64-bit 66-mhz pci core complex unit 256k l2 memory block rapidio pci 2x genet memory control 64-bit pci interface gpcm/upm dsp dsp dsp dsp eprom local bus controller dsp farm local bus controller port
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-1 chapter 2 memory map this chapter describes the MPC8540 memory map. an overview of the local address map is followed by a description of how local access windows are used to define the local address map. the inbound and outbound address translation mechanisms used to map to and from external memory spaces are described next. finally, the configuration, control, and status registers are described, including a complete listing of all memory-mapped registers with cross references to the sections detailing descriptions of each. 2.1 local memory map overview and example the MPC8540 provides an extremely flexible local memory map. the local memory map refers to the 32-bit address space seen by the processor as it accesses memory and i/o space. dma engines also see this same local memory map. all memory accessed by the MPC8540 ddr sdram and local bus memory controllers exists in this memory map, as do all memory-mapped configuration, control, and status registers. the local memory map is defined by a set of eight local access windows. each of these windows map a region of memory to a particular target interface, such as the ddr sdram controller or the pci controller. note that the local access windows do not perform any address translation. the size of each window can be configured from 4 kbytes to 2 gbytes. the target interface is specified using the codes shown in table 2-1 . . table 2-1. target interface codes target interface target code pci/pci-x 0000 local bus 0100 rapidio 1100 ddr sdram 1111
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-2 freescale semiconductor memory map figure 2-1 shows an example memory map. figure 2-1. local memory map example table 2-2 shows one corresponding set of local access window settings. in this example, it is not necessary to use a local access window to specify the location of the boot rom because it is in the default location at the highest 8 mbytes of memory (see section 4.4.3.3, ?boot rom location? ). neither is it required to define a local access window to describe the range of memory used for memory-mapped registers because this is a fixed 1-mbyte space pointed to by ccsrbar. see section 4.3.1.1.2, ?configuration, control, and status base address register table 2-2. local access windows example window base address size target interface 0 0x0000_0000 2 gbytes 0b1111 (ddr sdram) 1 0x8000_0000 1 mbyte 0b0100 (local bus) 2 0xa000_0000 256 mbytes 0b0000 (pci/pci-x) 3 0xb000_0000 256 mbytes 0b1100 (rapidio) 4 0xc000_0000 256 mbytes 0b0100 (local bus) 5?7 unused example local 0 0xffff_ffff 0xa000_000 memory map memory i/o 0xa000_0000 0xb000_0000 pci-x 0xc000_0000 rapidio ccsr boot rom 0x8000_000 local bus sram ddr sdram local bus flash configuration registers local bus dsp
address translation and mapping MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-3 (ccsrbar).? however, note that the e500 core only provides one default tlb entry to access boot code and it allows for accesses within the highest 4 kbytes of memory. in order to access the full 8 mbytes of default boot space (and the 1 mbyte of ccsr space), additional tlb entries must be set up within the e500 core for mapping these regions. 2.2 address translation and mapping four distinct types of translation and mapping operations are performed on transactions in the MPC8540. these are as follows:  mapping a local address to a target interface  assigning attributes to transactions  translating the local 32-bit address to an external address space  translating external addresses to the local 32-bit address space the local access windows perform target mapping for transactions within the local address space. no address translation is performed by the local access windows. outbound atmu windows perform the mapping from the local 32-bit address space to the address spaces of rapidio or pci/pci-x, which may be much larger than the local space. outbound atmu windows also map attributes such as transaction type or priority level. inbound atmu windows perform the address translation from the external address space to the local address space, attach attributes and transaction types to the transaction, and also map the transaction to its target interface. note that in mapping the transaction to the target interface, an inbound atmu window performs a similar function as the local access windows. the target mappings created by an inbound atmu must be consistent with those of the local access windows. that is, if an inbound atmu maps a transaction to a given local address and a given target, a local access window must also map that same local address to the same target. all of the configuration registers that define translation and mapping functions use the concept of translation or mapping windows, and all follow the same register format. table 2-3 summarizes the general format of these window definitions. windows must be a power-of-two size. to perform a translation or mapping function, the address of the transaction is compared with the base address register of each window. the number of bits used in the comparison is dictated by each window?s size attribute. when an address hits a table 2-3. format of atmu window definitions register function translation address high-order address bits defining location of the window in the target address space base address high-order address bits defining location of the window in the initial address space window size/attributes window enable, window size, target interface, and transaction attributes
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-4 freescale semiconductor memory map window, if address translation is being performed, the new translated address is created by concatenating the window offset to the translation address. again, the windows size attribute dictates how many bits are translated. 2.2.1 sram windows the on-chip memory array of the MPC8540 can be configured as a memory-mapped sram of 128 or 256 kbytes. configuration registers in the l2 cache controller set the base addresses and sizes for these windows. when enabled, these windows supersede all other mappings of these addresses for processor and global (snoopable) i/o transactions. therefore, sram windows must never overlap configuration space as defined by ccsrbar. it is possible to have sram windows overlap local access windows, but this is discouraged because processor and snoopable i/o transactions would map to the sram while non-snooped i/o transactions would be mapped by the local access windows. only if all accesses to the sram address range are snoopable can results be consistent if the sram window overlaps a local access window. see section 7.3.1.4, ?l2 memory-mapped sram base address registers 0?1 (l2srbarn),? for information about configuring sram windows. 2.2.2 window into configuration space ccsrbar defines a window used to access all memory-mapped configuration, control, and status registers. no address translation is done, so there are no associated translation address registers. the window is always enabled with a fixed size of 1 mbyte; no other attributes are attached, so there is no associated size/attribute register. this window always takes precedence over all local access windows. see section 4.3.1.1.2, ?configuration, control, and status base address register (ccsrbar),? and section 2.3, ?configuration, control, and status register map.? 2.2.3 local access windows as demonstrated in the address map overview in section 2.1, ?local memory map overview and example,? local access windows associate a range of the local 32-bit address space with a particular target interface. this allows the internal interconnections of the MPC8540 to route a transaction from its source to the proper target. no address translation is performed. the base address defines the high order address bits that give the location of the window in the local address space. the window attributes enable the window, define its size, and specify the target interface. with the exception of configuration space (mapped by ccsrbar), on-chip sram regions (mapped by l2srbar registers), and default boot rom, all addresses used by the system must be mapped by a local access window. this includes addresses that are mapped by inbound atmu windows; target mappings of inbound atmu windows and local access windows must be consistent.
address translation and mapping MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-5 the local access window registers exist as part of the local access block in the general utilities registers. see section 2.3.3, ?general utilities registers.? a detailed description of the local access window registers is given in the following sections. note that the minimum size of a window is 4 kbytes, so the low order 12 bits of the base address cannot be specified. 2.2.3.1 local access register memory map table 2-4 shows the memory map for the local access registers. table 2-4. local access register memory map local memory offset (hex) register access reset section/page 0x0_0c08 lawbar0?local access window 0 base address register r/w 0x0000_0000 2.2.3.2/2-6 0x0_0c10 lawar0?local access window 0 attribute register r/w 0x0000_0000 2.2.3.3/2-6 0x0_0c28 lawbar1?local access window 1 base address register r/w 0x0000_0000 2.2.3.2/2-6 0x0_0c30 lawar1?local access window 1 attribute register r/w 0x0000_0000 2.2.3.3/2-6 0x0_0c48 lawbar2?local access window 2 base address register r/w 0x0000_0000 2.2.3.2/2-6 0x0_0c50 lawar2?local access window 2 attribute register r/w 0x0000_0000 2.2.3.3/2-6 0x0_0c68 lawbar3?local access window 3 base address register r/w 0x0000_0000 2.2.3.2/2-6 0x0_0c70 lawar3?local access window 3 attribute register r/w 0x0000_0000 2.2.3.3/2-6 0x0_0c88 lawbar4?local access window 4 base address register r/w 0x0000_0000 2.2.3.2/2-6 0x0_0c90 lawar4?local access window 4 attribute register r/w 0x0000_0000 2.2.3.3/2-6 0x0_0ca8 lawbar5?local access window 5 base address register r/w 0x0000_0000 2.2.3.2/2-6 0x0_0cb0 lawar5?local access window 5 attribute register r/w 0x0000_0000 2.2.3.3/2-6 0x0_0cc8 lawbar6?local access window 6 base address register r/w 0x0000_0000 2.2.3.2/2-6 0x0_0cd0 lawar6?local access window 6 attribute register r/w 0x0000_0000 2.2.3.3/2-6 0x0_0ce8 lawbar7?local access window 7 base address register r/w 0x0000_0000 2.2.3.2/2-6 0x0_0cf0 lawar7?local access window 7 attribute register r/w 0x0000_0000 2.2.3.3/2-6
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-6 freescale semiconductor memory map 2.2.3.2 local access window n base address registers (lawbar0?lawbar7) figure 2-2 shows the bit fields of the lawbar n registers. figure 2-2. local access window n base address registers (lawbar0?lawbar7) table 2-5 describes lawbar n field descriptions. 2.2.3.3 local access window n attributes registers (lawar0?lawar7) figure 2-3 shows the bit fields of the lawar n registers. figure 2-3. local access window n attributes registers (lawar0?lawar7) table 2-6 describes lawar n field descriptions. 01112 31 r000000000000 base_addr w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xc08, 0xc28, 0xc48, 0xc68, 0xc88, 0xca8, 0xcc8, 0xce8 table 2-5. lawbar n field descriptions bits name description 0?11 ? write reserved, read = 0 12?31 base_addr identifies the 20 most-significant address bits of the base of local access window n . the specified base address should be aligned to the window size, as defined by lawar n [size]. 0 1 7 8 11 12 25 26 31 r e n 0000000 trgt_if 00000000000000 size w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xc10, 0xc30, 0xc50, 0xc70, 0xc90, 0xcb0, 0xcd0, 0xcf0 table 2-6. lawar n field descriptions bits name description 0 en 0 the local access window n (and all other lawar n and lawbar n fields) are disabled. 1 the local access window n is enabled and other lawar n and lawbar n fields combine to identify an address range for this window. 1?7 ? write reserved, read = 0
address translation and mapping MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-7 2.2.3.4 precedence of local access windows if two local access windows overlap, the lower numbered window takes precedence. for instance, if two windows are setup as shown in table 2-7 , local access window 1 governs the mapping of the 1-mbyte region from 0x7ff0_0000 to 0x7fff_fff, even though the window described in local access window 2 also encompasses that memory region. 2.2.3.5 configuring local access windows once a local access window is enabled, it should not be modified while any device in the system may be using the window. neither should a new window be used until the effect of the write to the window is visible to all blocks that use the window. this can be guaranteed by completing a read of the last local access window configuration register before enabling any other devices to use the window. for instance, if local access windows 0?3 are being configured in order during the initialization process, the last write (to lawar3) should be followed by a read of lawar3 8?11 trgt_if identifies the target interface id when a transaction hits in the address range defined by this window. note that configuration registers and sram regions are mapped by the windows defined by ccsrbar and l2srbar. these mappings supersede local access window mappings, so configuration registers and sram do not appear as a target for local access windows. 0000 pci/pci-x 0001?0011reserved 0100 local bus memory controller 0101?1011reserved 1100 rapidio 1101?1110reserved 1111 ddr sdram 12?25 ? write reserved, read = 0 26?31 size identifies the size of the window from the starting address. window size is 2 (size+1) bytes. 000000?001010reserved 001011 4 kbytes 001100 8 kbytes 00110116 kbytes . . . . . . . 2 (size+1) bytes 011110 2 gbytes 011111?111111 reserved table 2-7. overlapping local access windows window base address size target interface 1 0x7ff0_0000 1 mbyte 0b0100 (local bus controller ?lbc) 2 0x0000_0000 2 gbytes 0b 1111 ( ddr sdram) table 2-6. lawar n field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-8 freescale semiconductor memory map before any devices try to use any of these windows. if the configuration is being done by the local e500 processor, the read of lawar3 should be followed by an isync instruction. 2.2.3.6 distinguishing local access windows from other mapping functions it is important to distinguish between the mapping function performed by the local access windows and the additional mapping functions that happen at the target interface. the local access windows define how a transaction is routed through the MPC8540 internal interconnects from the transactions source to its target. after the transaction has arrived at its target interface, that interface controller may perform additional mapping. for instance, the ddr sdram controller has chip select registers that map a memory request to a particular external device. similarly, the local bus controller has base registers that perform a similar function. the rapidio and pci interfaces have outbound address translation and mapping units that map the local address into an external address space. these other mapping functions are configured by programming the configuration, control, and status registers of the individual interfaces. note that there is no need to have a one-to-one correspondence between local access windows and chip select regions or outbound atmu windows. a single local access window can be further decoded to any number of chip selects or to any number or outbound atmu windows at the target interface. 2.2.3.7 illegal interaction between local access windows and ddr sdram chip selects if a local access window maps an address to an interface other than the ddr sdram controller, then there should not be a valid chip select configured for the same address in the ddr sdram controller. because ddr sdram chip selects boundaries are defined by a beginning and ending address, it is easy to define them so that they do not overlap with local access windows that map to other interfaces. 2.2.4 outbound address translation and mapping windows outbound address translation and mapping refers to the translation of addresses from the local 32-bit address space to the external address space and attributes of a particular i/o interface. on the MPC8540, both the rapidio and the pci/pci-x blocks have outbound address translation and mapping units (atmus). the rapidio controller has eight outbound atmu windows plus a default window. if a transaction?s address does not hit any of the eight outbound atmu windows, the translation actions defined by the default window are used. the default window is always enabled. see section 17.3.2.2, ?atmu registers,? for a detailed description of the rapidio outbound atmu windows.
address translation and mapping MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-9 the pci/pci-x controller has four outbound atmu windows plus a default window. the pci/pci-x outbound atmu registers include an extended translation address register so that up to 64 bits of external address space can be supported. see section 16.3.1.2, ?pci/x atmu outbound registers,? for a detailed description of the pci/pci-x outbound atmu windows. 2.2.5 inbound address translation and mapping windows inbound address translation and mapping refers to the translation of an address from the external address space of an i/o interface (such as pci or rapidio address space) to the local address space understood by the internal interfaces of the MPC8540. it also refers to the mapping of transactions to a particular target interface and the assignment of transaction attributes. both the rapidio controller and the pci/pci-x controller have inbound address translation and mapping units (atmus). 2.2.5.1 rapidio inbound atmu the rapidio controller has four inbound atmu windows plus a default. if the inbound transaction?s address does not hit any of the four inbound atmu windows, the translation actions defined by the default window are used. the default window is always enabled. see section 17.3.2.2, ?atmu registers,? for a detailed description of the rapidio inbound atmu windows. 2.2.5.2 pci/pci-x inbound atmu the pci/pci-x controller has three general inbound atmu windows plus a dedicated window for memory mapped configuration accesses (pcsrbar). these windows have a one-to-one correspondence with the base address registers in the pci/pci-x programming model. updating one automatically updates the other. there is no default inbound window; if a pci/pci-x address does not match one of the inbound atmu windows, the MPC8540 does not respond with an assertion of pci_devsel . see section 16.3.1.3, ?pci/x atmu inbound registers,? for a detailed description of the pci/pci-x inbound atmu windows. 2.2.5.3 illegal interaction between inbound atmus and local access windows since both local access windows and inbound atmus map transactions to a target interface, it is essential that they not contradict one another. for instance, it is a programming error to have an inbound atmu map a transaction to the ddr sdram memory controller (target interface 0b1111) if the resu lting translated local address is mapped to pci (target interface 0b0000) by a local access window. such a programming error may result in unpredictable system deadlocks.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-10 freescale semiconductor memory map 2.3 configuration, control, and status register map all of the memory mapped configuration, control, and status registers in the MPC8540 are contained within a 1-mbyte address region. to allow for flexibility, the configuration, control, and status block is relocatable in the local address space. the local address map location of this register block is controlled by the configuration, control, and status registers base address register (ccsrbar), see section 4.3.1.1.2, ?configuration, control, and status base address register (ccsrbar).? the default value for ccsrbar is 4 gbytes?9 mbytes, or 0xff70_0000. note the configuration, control, and status window must not overlap a local access window that maps to the ddr controller. otherwise, undefined behavior occurs. an example of a top-level memory map with the default location of the configuration, control, and status registers is shown in figure 2-4 . figure 2-4. top-level register map example example local 0 4g ccsrbar (4g-9m) 4g-8m shaded area indicates locations not allowed for ccsrbar. only reserved if local boot rom memory map memory i/o 0x0_0000 device-specific pic 0xe_0000 0xf_ffff ccsr register memory block 0x4_0000 0x8_0000 general utilities utilities 0xc_0000 reserved rapidio ccsr
configuration, control, and status register map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-11 2.3.1 accessing ccsr memory from external masters in addition to being accessible by the e500 processor, the configuration, control, and status registers are accessible from external interfaces. this allows external masters on the i/o ports to configure the MPC8540. external masters do not need to know the location of the ccsr memory in the local address map. rather, they access this region of the local memory map through a window defined by a register in the interface?s programming model that is accessible to the external master from its external memory map. the pci base address for accessing the local ccsr memory is selectable through the pci configuration and status register base address register (pcsrbar), at offset 0x10, described in section 16.3.2.11, ?pci base address registers.? an external pci master sets this register by running a pci configuration cycle to the MPC8540. subsequent memory accesses by a pci master to the pci address range indicated by pcsrbar are translated to the local address indicated by the current setting of ccsrbar. the rapidio base address for accessing the local ccsr memory is selectable through the rapidio lcsba1csr, defined in the rapidio programming model, see section 17.3.1.12, ?local configuration space base address 1 command and status register (lcsba1csr).? an external rapidio master can set the value of lcsba1csr with a maintenance packet. then subsequent read and write packets whose rapidio addresses match the window defined by lcsba1csr are translated to the local address range indicated by ccsrbar. 2.3.2 organization of ccsr memory the configuration, control, and status registers of the MPC8540 are grouped according to functional units. most functional blocks are allocated for a 4-kbyte address space for registers. registers that fall into this category are referred to as general utilities registers. these registers occupy the first 256 kbytes of ccsr memory. registers that control functions that are not particular to a functional unit but to the device as a whole occupy the highest 256 kbytes of ccsr memory. these are referred to as device-specific registers. some functional units, such as rapidio and the openpic-based interrupt controller have larger address spaces as defined by their programming models. the registers for these blocks are given their own large regions of ccsr memory.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-12 freescale semiconductor memory map table 2-8. local memory configuration, control, and status register summary offset from ccsrbar register grouping 0x0_0000?0x3_ffff general ut ilities 0x4_0000?0x7_ffff programmable interrupt controller (pic) 0x8_0000?0xb_ffff reserved 0xc_0000?0xd_ffff rapidio 0xe_0000?0xf_ffff device-specific utilities
configuration, control, and status register map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-13 2.3.3 general utilities registers figure 2-5 provides an overview of the general utilities registers. figure 2-5. general utilities registers mapp ing to configuration, control, and status memory block figure 2-5 also shows the organization of registers inside the 4-kbyte register space allocated to an individual functional block. the first 3 kbytes are available for general registers. the next 512 bytes are dedicated to address translation and mapping registers, if applicable to that particular 0x0 0000 0x0 1000 0x0 3000 general utilities registers memory block 0x0 4000 0x0 0000 device-specific pic 0xe 0000 0xf ffff ccsr memory block 0x4 0000 0x8 0000 general 0x0 2000 utilities 0x0 7000 0xn n000 general utility block 0xn nf00 debug 0xn ne00 error mgmt general registers utilities 0x3 ffff l2 cache 0xn nc00 tsec 1 tsec 2 10_100 fec 0x0 5000 0xc 0000 reserved rio 0x0 6000 ecm i2c memory local bus ocean duart local access 0x0 8000 0x2 0000 0x2 1000 0x2 4000 0x2 5000 0x2 6000 dma pci atmu
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-14 freescale semiconductor memory map functional unit (for example, pci). if a unit has error management registers, they are typically placed starting at offset 0xe00 from the beginning of the block?s 4-kbyte space, and any debug registers are typically placed in the final 256 bytes of the unit?s register space starting at offset 0xf00. general utilities registers are accessed as 32-bit quantities except for the duart and i 2 c registers, which are accessed as bytes. note refer to detailed register descriptions for each functional unit for exact locations, sizes, and access requirements. some blocks may have exceptions to the above guidelines. 2.3.4 interrupt controller and ccsr the programmable interrupt controller (pic) registers are at offset 0x4_0000 from ccsrbar, see figure 2-6 . its programming model follows the openpic architecture. the interrupt controller registers should only be accessed with 32-bit accesses. figure 2-6. pic mapping to configuration, control, and status memory block 0x4 0000 processor global cfg timers external irqs 0x4 1100 0x5 1020 0x7 ffff pic registers 0x6 0000 0x5 0000 internal irqs 0x4 1000 0x4 1200 0x0 0000 device-specific pic 0xe 0000 0xf ffff ccsr register memory block 0x4 0000 0x8 0000 general utilities utilities 0xc 0000 rio reserved
configuration, control, and status register map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-15 2.3.5 rapidio and ccsr the rapidio module uses 128 kbytes of ccsr memory; refer to figure 2-7 . all registers are 32-bits wide and should only be accessed with 32-bit accesses. the 4-kbyte rapidio implementation block has the same internal organization as those defined for the general utilities described above. figure 2-7. rapidio mapping to configuration, control, and status memory block 2.3.6 device-specific utilities the device-specific registers consist of power management, performance monitors, and device-wide debug utilities (refer to figure 2-8 ). these registers are accessible with 32-bit accesses only. transactions of other than 32-bit are considered a programming error and operation is undefined. reserved bits in the following register descriptions are not guaranteed to have predictable values. software must preserve the values of reserved bits when writing to a register. also, when reading from a register, software should not rely on the value of any reserved bit remaining consistent. 0xc 0000 0xd 0000 0xd 1000 0xc 4100 0x0 0000 device-specific pic 0xe 0000 0xf ffff ccsr register memory block 0x4 0000 0x8 0000 general utilities utilities 0xc 0000 reserved rio rapidio configuration rapidio rapidio messaging rapidio impl. rapidio arch. extended features
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-16 freescale semiconductor memory map figure 2-8. device-specific register mapping to configuration, control, and status memory block 2.4 complete ccsr map table 2-9 lists the MPC8540 memory-mapped registers. table 2-9. memory map offset register access reset section/page local-access registers?configuration, control, and status registers 0x0_0000 ccsrbar?configuration, control, and status registers base address register r/w 0x000f_f700 4.3.1.1.2/4-5 0x0_0008 altcbar?alternate configuration base address register r/w 0x0000_0000 4.3.1.2.1/4-6 0x0_0010 altcar?alternate configuration attribute register r/w 0x0000_0000 4.3.1.2.2/4-6 0x0_0020 bptr?boot page translation register r/w 0x0000_0000 4.3.1.3.1/4-8 global utilities 0xe 1000 device-specific 0xe 0000 0xe 2000 registers 0xf fffc perf. monitor device-specific utilities 0xf ffff 0xe 0000 0xc 0000 0x8 0000 0x4 0000 0x0 0000 reserved pic general utilities watchpoint/debug rio
complete ccsr map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-17 local-access registers?local-access window base and size registers 0x0_0c08 lawbar0?local access window 0 base address register r/w 0x0000_0000 2.2.3.2/2-6 0x0_0c10 lawar0?local access window 0 attribute register r/w 0x0000_0000 2.2.3.3/2-6 0x0_0c28 lawbar1?local access window 1 base address register r/w 0x0000_0000 2.2.3.2/2-6 0x0_0c30 lawar1?local access window 1 attribute register r/w 0x0000_0000 2.2.3.3/2-6 0x0_0c48 lawbar2?local access window 2 base address register r/w 0x0000_0000 2.2.3.2/2-6 0x0_0c50 lawar2?local access window 2 attribute register r/w 0x0000_0000 2.2.3.3/2-6 0x0_0c68 lawbar3?local access window 3 base address register r/w 0x0000_0000 2.2.3.2/2-6 0x0_0c70 lawar3?local access window 3 attribute register r/w 0x0000_0000 2.2.3.3/2-6 0x0_0c88 lawbar4?local access window 4 base address register r/w 0x0000_0000 2.2.3.2/2-6 0x0_0c90 lawar4?local access window 4 attribute register r/w 0x0000_0000 2.2.3.3/2-6 0x0_0ca8 lawbar5?local access window 5 base address register r/w 0x0000_0000 2.2.3.2/2-6 0x0_0cb0 lawar5?local access window 5 attribute register r/w 0x0000_0000 2.2.3.3/2-6 0x0_0cc8 lawbar6?local access window 6 base address register r/w 0x0000_0000 2.2.3.2/2-6 0x0_0cd0 lawar6?local access window 6 attribute register r/w 0x0000_0000 2.2.3.3/2-6 0x0_0ce8 lawbar7?local access window 7 base address register r/w 0x0000_0000 2.2.3.2/2-6 0x0_0cf0 lawar7?local access window 7 attribute register r/w 0x0000_0000 2.2.3.3/2-6 registers 0x0_1000 eebacr?ecm ccb address configuration register r/w 0x0000_0003 8.2.1.1/8-3 0x0_1010 eebpcr?ecm ccb port configuration register r/w 0x0 n 00_0000 8.2.1.2/8-4 0x0_1e00 eedr?ecm error detect register r/w 0x0000_0000 8.2.1.3/8-5 0x0_1e08 eeer?ecm error enable register r/w 0x0000_0000 8.2.1.4/8-6 0x0_1e0c eeatr?ecm error attributes capture register r 0x0000_0000 8.2.1.5/8-7 0x0_1e10 eeadr?ecm error address capture register r 0x0000_0000 8.2.1.6/8-8 ddr memory controller memory map 0x0_2000 cs0_bnds?chip select 0 memory bounds r/w 0x0000_0000 9.4.1.1/9-10 0x0_2008 cs1_bnds?chip select 1 memory bounds 0x0_2010 cs2_bnds?chip select 2 memory bounds 0x0_2018 cs3_bnds?chip select 3 memory bounds table 2-9. memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-18 freescale semiconductor memory map 0x0_2080 cs0_config?chip select 0 configuration r/w 0x0000_0000 9.4.1.2/9-10 0x0_2084 cs1_config?chip select 1 configuration 0x0_2088 cs2_config?chip select 2 configuration 0x0_208c cs3_config?chip select 3 configuration 0x0_2108 timing_cfg_1?ddr sdram timing configuration 1 r/w 0x0000_0000 9.4.1.3/9-11 0x0_210c timing_cfg_2?ddr sdram timing configuration 2 r/w 0x0000_0000 9.4.1.4/9-13 0x0_2110 ddr_sdram_cfg?ddr sdram control configuration r/w 0x0200_0000 9.4.1.5/9-14 0x0_2118 ddr_sdram_mode?ddr sdram mode configuration r/w 0x0000_0000 9.4.1.6/9-16 0x0_2124 ddr_sdram_interval?ddr sdram interval configuration r/w 0x0000_0000 9.4.1.7/9-16 0x0_2e00 data_err_inject_hi?memory data path error injection mask high r/w 0x0000_0000 9.4.1.8/9-17 0x0_2e04 data_err_inject_lo?memory data path error injection mask low r/w 0x0000_0000 9.4.1.9/9-18 0x0_2e08 ecc_err_inject?memory data path error injection mask ecc r/w 0x0000_0000 9.4.1.10/9-18 0x0_2e20 capture_data_hi?memory data path read capture high r/w 0x0000_0000 9.4.1.11/9-19 0x0_2e24 capture_data_lo?memory data path read capture low r/w 0x0000_0000 9.4.1.12/9-20 0x0_2e28 capture_ecc?memory data path read capture ecc r/w 0x0000_0000 9.4.1.13/9-20 0x0_2e40 err_detect?memory error detect r/w 0x0000_0000 9.4.1.14/9-21 0x0_2e44 err_disable?memory error disable r/w 0x0000_0000 9.4.1.15/9-21 0x0_2e48 err_int_en?memory error interrupt enable r/w 0x0000_0000 9.4.1.16/9-22 0x0_2e4c capture_attributes?memory error attributes capture r/w 0x0000_0000 9.4.1.17/9-23 0x0_2e50 capture_address?memory error address capture r/w 0x0000_0000 9.4.1.18/9-24 0x0_2e58 err_sbe?single-bit ecc memory error management r/w 0x0000_0000 9.4.1.19/9-25 i 2 c 0x0_3000 i2cadr?i 2 c address register r/w 0x00 11.3.1.1/11-5 0x0_3004 i2cfdr?i 2 c frequency divider register r/w 0x00 11.3.1.2/11-5 0x0_3008 i2ccr?i 2 c control register r/w 0x00 11.3.1.3/11-6 0x0_300c i2csr?i 2 c status register r/w 0x81 11.3.1.4/11-7 table 2-9. memory map (continued) offset register access reset section/page
complete ccsr map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-19 0x0_3010 i2cdr?i 2 c data register r/w 0x00 11.3.1.5/11-9 0x0_3014 i2cdfsrr?i 2 c digital filter sampling rate register r/w 0x10 11.3.1.6/11-10 duart registers 0x0_4500 urbr?ulcr[dlab] = 0 uart0 receiver buffer register r0x00 12.3.1.1/12-6 0x0_4500 uthr?ulcr[dlab] = 0 uart0 transmitter holding register w0x00 12.3.1.2/12-6 0x0_4500 udlb?ulcr[dlab] = 1 uart0 divisor least significant byte register r/w 0x00 12.3.1.3/12-7 0x0_4501 uier?ulcr[dlab] = 0 uart0 interrupt enable register r/w 0x00 12.3.1.4/12-9 0x0_4501 udmb?ulcr[dlab] = 1 uart0 divisor most significant byte register r/w 0x00 12.3.1.3/12-7 0x0_4502 uiir?ulcr[dlab] = 0 uart0 interrupt id register r 0x01 12.3.1.5/12-10 0x0_4502 ufcr?ulcr[dlab] = 0 uart0 fifo control register w0x00 12.3.1.6/12-11 0x0_4502 uafr?ulcr[dlab] = 1 uart0 alternate function register r/w 0x00 12.3.1.12/12-17 0x0_4503 ulcr?ulcr[dlab] = x uart0 line control register r/w 0x00 12.3.1.7/12-12 0x0_4504 umcr?ulcr[dlab] = x uart0 modem control register r/w 0x00 12.3.1.8/12-14 0x0_4505 ulsr?ulcr[dlab] = x uart0 line status register r 0x60 12.3.1.9/12-15 0x0_4506 umsr?ulcr[dlab] = x uart0 modem status register r0x00 12.3.1.10/12-16 0x0_4507 uscr?ulcr[dlab] = x uart0 scratch register r/w 0x00 12.3.1.11/12-17 0x0_4510 udsr?ulcr[dlab] = x uart0 dma status register r0x01 12.3.1.13/12-18 0x0_4600 urbr?ulcr[dlab] = 0 uart1 receiver buffer register r0x00 12.3.1.1/12-6 0x0_4600 uthr?ulcr[dlab] = 0 uart1 transmitter holding register w0x00 12.3.1.2/12-6 0x0_4600 udlb?ulcr[dlab] = 1 uart1 divisor least significant byte register r/w 0x00 12.3.1.3/12-7 0x0_4601 uier?ulcr[dlab] = 0 uart1 interrupt enable register r/w 0x00 12.3.1.4/12-9 0x0_4601 udmb_ulcr[dlab] = 1 uart1 divisor most significant byte register r/w 0x00 12.3.1.3/12-7 0x0_4602 uiir?ulcr[dlab] = 0 uart1 interrupt id register r 0x01 12.3.1.5/12-10 0x0_4602 ufcr?ulcr[dlab] = 0 uart1 fifo control register w0x00 12.3.1.6/12-11 table 2-9. memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-20 freescale semiconductor memory map 0x0_4602 uafr?ulcr[dlab] = 1 uart1 alternate function register r/w 0x00 12.3.1.12/12-17 0x0_4603 ulcr?ulcr[dlab] = x uart1 line control register r/w 0x00 12.3.1.7/12-12 0x0_4604 umcr?ulcr[dlab] = x uart1 modem control register r/w 0x00 12.3.1.8/12-14 0x0_4605 ulsr?ulcr[dlab] = x uart1 line status register r 0x60 12.3.1.9/12-15 0x0_4606 umsr?ulcr[dlab] = x uart1 modem status register r0x00 12.3.1.10/12-16 0x0_4607 uscr?ulcr[dlab] = x uart1 scratch register r/w 0x00 12.3.1.11/12-17 0x0_4610 udsr?ulcr[dlab] = x uart1 dma status register r0x01 12.3.1.13/12-18 local bus controller registers 0x0_5000 br0?base register 0 r/w 0x0000_ nn 01 1 13.3.1.1/13-11 0x0_5008 br1?base register 1 0x0000_0000 0x0_5010 br2?base register 2 0x0_5018 br3?base register 3 0x0_5020 br4?base register 4 0x0_5028 br5?base register 5 0x0_5030 br6?base register 6 0x0_5038 br7?base register 7 0x0_5004 or0?options register 0 r/w 0x0000_0ff7 13.3.1.2/13-12 0x0_500c or1?options register 1 0x0000_0000 0x0_5014 or2?options register 2 0x0_501c or3?options register 3 0x0_5024 or4?options register 4 0x0_502c or5?options register 5 0x0_5034 or6?options register 6 0x0_503c or7?options register 7 0x0_5068 mar?upm address register r/w 0x0000_0000 13.3.1.3/13-18 0x0_5070 mamr?upma mode register r/w 0x0000_0000 13.3.1.4/13-19 0x0_5074 mbmr?upmb mode register r/w 0x0000_0000 13.3.1.4/13-19 0x0_5078 mcmr?upmc mode register r/w 0x0000_0000 13.3.1.4/13-19 0x0_5084 mrtpr?memory refresh timer prescaler register r/w 0x0000_0000 13.3.1.5/13-21 0x0_5088 mdr?upm data register r/w 0x0000_0000 13.3.1.6/13-22 0x0_5094 lsdmr?sdram mode register r/w 0x0000_0000 13.3.1.7/13-22 0x0_50a0 lurt?upm refresh timer r/w 0x0000_0000 13.3.1.8/13-24 table 2-9. memory map (continued) offset register access reset section/page
complete ccsr map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-21 0x0_50a4 lsrt?sdram refresh timer r/w 0x0000_0000 13.3.1.9/13-25 0x0_50b0 ltesr?transfer error status register read/ bit-reset 0x0000_0000 13.3.1.10/13-26 0x0_50b4 ltedr?transfer error disable register r/w 0x0000_0000 13.3.1.11/13-27 0x0_50b8 lteir?transfer error interrupt register r/w 0x0000_0000 13.3.1.12/13-28 0x0_50bc lteatr?transfer error attributes register r/w 0x0000_0000 13.3.1.13/13-29 0x0_50c0 ltear?transfer error address register r/w 0x0000_0000 13.3.1.14/13-30 0x0_50d0 lbcr?configuration register r/w 0x0000_0000 13.3.1.15/13-31 0x0_50d4 lcrr?clock ratio register r/w 0x8000_0008 13.3.1.16/13-32 pci/x registers pci/x configuration access registers 0x0_8000 cfg_addr?pci/x configuration address r/w 0x0000_0000 16.3.1.1.1/16-18 0x0_8004 cfg_data?pci/x configuration data r/w 0x0000_0000 16.3.1.1.1/16-18 0x0_8008 int_ack?pci/x interrupt acknowledge r 0x0000_0000 16.3.1.1.3/16-20 0x0_800c? 0x0_8bfc reserved ? ? ? pci/x atmu registers?outbound and inbound 0x0_8c00?0x0_8c3c?outbound window 0 (default) 0x0_8c00 potar0?pci/x outbound window 0 (default) translation address register r/w 0x0000_0000 16.3.1.2.1/16-21 0x0_8c04 potear0?pci/x outbound window 0 (default) translation extended address register r/w 0x0000_0000 16.3.1.2.2/16-21 0x0_8c08 reserved ? ? 0x0_8c0c reserved ? ? 0x0_8c10 powar0?pci/x outbound window 0 (default) attributes register r/w 0x8004_401f 16.3.1.2.4/16-22 0x0_8c14? 0x0_8c1c reserved ? ? 0x0_8c20?0x0_8c3c?outbound window 1 0x0_8c20 potar1?pci/x outbound window 1 translation address register r/w 0x0000_0000 16.3.1.2.1/16-21 0x0_8c24 potear1?pci/x outbound window 1 translation extended address register r/w 0x0000_0000 16.3.1.2.2/16-21 0x0_8c28 powbar1?pci/x outbound window 1 base address register r/w 0x0000_0000 16.3.1.2.3/16-22 0x0_8c2c reserved ? ? 0x0_8c30 powar1?pci/x outbound window 1 attributes register r/w 0x0000_0000 16.3.1.2.4/16-22 table 2-9. memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-22 freescale semiconductor memory map 0x0_8c34? 0x0_8c3c reserved ? ? 0x0_8c40?0x0_8c5c?outbound window 2 0x0_8c40 potar2?pci/x outbound window 2 translation address register r/w 0x0000_0000 16.3.1.2.1/16-21 0x0_8c44 potear2?pci/x outbound window 2 translation extended address register r/w 0x0000_0000 16.3.1.2.2/16-21 0x0_8c48 powbar2?pci/x outbound window 2 base address register r/w 0x0000_0000 16.3.1.2.3/16-22 0x0_8c4c reserved ? ? 0x0_8c50 powar2?pci/x outbound window 2 attributes register r/w 0x0000_0000 16.3.1.2.4/16-22 0x0_8c54? 0x0_8c5c reserved ? ? 0x0_8c60?0x0_8c7c?outbound window 3 0x0_8c60 potar3?pci/x outbound window 3 translation address register r/w 0x0000_0000 16.3.1.2.1/16-21 0x0_8c64 potear3?pci/x outbound window 3 translation extended address register r/w 0x0000_0000 16.3.1.2.2/16-21 0x0_8c68 powbar3?pci/x outbound window 3 base address register r/w 0x0000_0000 16.3.1.2.3/16-22 0x0_8c6c reserved ? ? 0x0_8c70 powar3?pci/x outbound window 3 attributes register r/w 0x0000_0000 16.3.1.2.4/16-22 0x0_8c74? 0x0_8c7c reserved ? ? 0x0_8c80?0x0_8c9c?outbound window 4 0x0_8c80 potar4?pci/x outbound window 4 translation address register r/w 0x0000_0000 16.3.1.2.1/16-21 0x0_8c84 potear4?pci/x outbound window 4 translation extended address register r/w 0x0000_0000 16.3.1.2.2/16-21 0x0_8c88 powbar4?pci/x outbound window 4 base address register r/w 0x0000_0000 16.3.1.2.3/16-22 0x0_8c8c reserved ? ? table 2-9. memory map (continued) offset register access reset section/page
complete ccsr map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-23 0x0_8c90 powar4?pci/x outbound window 4 attributes register r/w 0x0000_0000 16.3.1.2.4/16-22 0x0_8c94? 0x0_8d9c reserved ? ? 0x0_8da0?0x0_8dbc?inbound window 3 0x0_8da0 pitar3?pci/x inbound window 3 translation address register r/w 0x0000_0000 16.3.1.3.1/16-25 0x0_8da4 reserved ? ? 0x0_8da8 piwbar3?pci/x inbound window 3 base address register r/w 0x0000_0000 16.3.1.3.2/16-25 0x0_8dac piwbear3?pci/x inbound window 3 base extended address register r/w 0x0000_0000 16.3.1.3.3/16-26 0x0_8db0 piwar3?pci/x inbound window 3 attributes register r/w 0x0000_0000 16.3.1.3.4/16-26 0x0_8db4? 0x0_8dbc reserved ? ? 0x0_8dc0?0x0_8ddc?inbound window 2 0x0_8dc0 pitar2?pci/x inbound window 2 translation address register r/w 0x0000_0000 16.3.1.3.1/16-25 0x0_8dc4 reserved ? ? 0x0_8dc8 piwbar2?pci/x inbound window 2 base address register r/w 0x0000_0000 16.3.1.3.2/16-25 0x0_8dcc piwbear2?pci/x inbound window 2 base extended address register r/w 0x0000_0000 16.3.1.3.3/16-26 0x0_8dd0 piwar2?pci/x inbound window 2 attributes register r/w 0x0000_0000 16.3.1.3.4/16-26 0x0_8dd4? 0x0_8ddc reserved ? ? 0x0_8de0?0x0_8dfc?inbound window 1 0x0_8de0 pitar1?pci/x inbound window 1 translation address register r/w 0x0000_0000 16.3.1.3.1/16-25 0x0_8de4 reserved ? ? 0x0_8de8 piwbar1?pci/x inbound window 1 base address register r/w 0x0000_0000 16.3.1.3.2/16-25 0x0_8dec reserved ? ? 0x0_8df0 piwar1?pci/x inbound window 1 attributes register r/w 0x0000_0000 16.3.1.3.4/16-26 0x0_8df4? 0x0_8dfc reserved ? ? table 2-9. memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-24 freescale semiconductor memory map pci/x error management registers 0x0_8e00 err_dr?pci/x error detect register special 0x0000_0000 16.3.1.4.1/16-29 0x0_8e04 err_cap_dr?pci/x error capture disabled register r/w 0x0000_0000 16.3.1.4.2/16-30 0x0_8e08 err_en?pci/x error enable register r/w 0x0000_0000 16.3.1.4.3/16-31 0x0_8e0c err_attrib?pci/x error attributes capture register r/w 0x0000_0000 16.3.1.4.4/16-32 0x0_8e10 err_addr?pci/x error address capture register r/w 0x0000_0000 16.3.1.4.5/16-33 0x0_8e14 err_ext_addr?pci/x error extended address capture register r/w 0x0000_0000 16.3.1.4.6/16-34 0x0_8e18 err_dl?pci/x error data low capture register r/w 0x0000_0000 16.3.1.4.7/16-34 0x0_8e1c err_dh?pci/x error data high capture register r/w 0x0000_0000 16.3.1.4.8/16-34 0x0_8e20 gas_timr?pci/x gasket timer register r/w 0x0000_0000 16.3.1.4.9/16-35 0x0_8e24 pcix_timr?pcix split completion timer register r/w 0x0000_0000 16.3.1.4.10/16-36 0x0_8e28? 0x0_8efc reserved ? ? 0x0_8f00? 0x0_8ffc reserved for debug ? ? l2/sram memory-mapped configuration registers 0x2_0000 l2ctl?l2 control register r/w 0x2000_0000 7.3.1.1/7-7 0x2_0010 l2cewar0?l2 cache external write address register 0 r/w 0x0000_0000 7.3.1.2/7-10 0x2_0018 l2cewcr0?l2 cache external write control register 0 r/w 0x0000_0000 7.3.1.3/7-10 0x2_0020 l2cewar1?l2 cache external write address register 1 r/w 0x0000_0000 7.3.1.2/7-10 0x2_0028 l2cewcr1?l2 cache external write control register 1 r/w 0x0000_0000 7.3.1.3/7-10 0x2_0030 l2cewar2?l2 cache external write address register 2 r/w 0x0000_0000 7.3.1.2/7-10 0x2_0038 l2cewcr2?l2 cache external write control register 2 r/w 0x0000_0000 7.3.1.3/7-10 0x2_0040 l2cewar3?l2 cache external write address register 3 r/w 0x0000_0000 7.3.1.2/7-10 0x2_0048 l2cewcr3?l2 cache external write control register 3 r/w 0x0000_0000 7.3.1.3/7-10 0x2_0100 l2srbar0?l2 memory-mapped sram base address register 0 r/w 0x0000_0000 7.3.1.4/7-11 0x2_0108 l2srbar1?l2 memory-mapped sram base address register 1 r/w 0x0000_0000 7.3.1.4/7-11 table 2-9. memory map (continued) offset register access reset section/page
complete ccsr map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-25 0x2_0e00 l2errinjhi?l2 error injection mask high register r/w 0x0000_0000 7.3.1.5.1/7-13 0x2_0e04 l2errinjlo?l2 error injection mask low register r/w 0x0000_0000 7.3.1.5.1/7-13 0x2_0e08 l2errinjctl?l2 error injection tag/ecc control register r/w 0x0000_0000 7.3.1.5.1/7-13 0x2_0e20 l2captdatahi?l2 error data high capture register r 0x0000_0000 7.3.1.5.2/7-15 0x2_0e24 l2captdatalo?l2 error data low capture register r 0x0000_0000 7.3.1.5.2/7-15 0x2_0e28 l2captecc?l2 error syndrome register r 0x0000_0000 7.3.1.5.2/7-15 0x2_0e40 l2errdet?l2 error detect register special 0x0000_0000 7.3.1.5.2/7-15 0x2_0e44 l2errdis?l2 error disable register r/w 0x0000_0000 7.3.1.5.2/7-15 0x2_0e48 l2errinten?l2 error interrupt enable register r/w 0x0000_0000 7.3.1.5.2/7-15 0x2_0e4c l2errattr?l2 error attributes capture register r/w 0x0000_0000 7.3.1.5.2/7-15 0x2_0e50 l2erraddr?l2 error address capture register r 0x0000_0000 7.3.1.5.2/7-15 0x2_0e58 l2errctl?l2 error control register r/w 0x0000_0000 7.3.1.5.2/7-15 dma registers general registers 0x2_1100 mr n ?dma 0 mode register r/w 0x0000_0000 15.3.2.1/15-10 0x2_1104 sr n ?dma 0 status register special 0x0000_0000 15.3.2.2/15-13 0x2_1108 reserved ? ? ? 0x2_110c clndar n ?dma 0 current link descriptor address register r/w 0x0000_0000 15.3.2.3/15-14 0x2_1110 satr n ?dma 0 source attributes register r/w 0x0000_0000 15.3.2.4/15-16 0x2_1114 sar n ?dma 0 source address register r/w 0x0000_0000 15.3.2.5/15-18 0x2_1118 datr n ?dma 0 destination attributes register r/w 0x0000_0000 15.3.2.6/15-19 0x2_111c dar n ?dma 0 destination address register r/w 0x0000_0000 15.3.2.7/15-21 0x2_1120 bcr n ?dma 0 byte count register r/w 0x0000_0000 15.3.2.8/15-23 0x2_1124 reserved ? ? ? 0x2_1128 nlndar n ?dma 0 next link descriptor address register r/w 0x0000_0000 15.3.2.9/15-23 0x2_1130 reserved ? ? ? 0x2_1134 clsdar n ?dma 0 current list alternate base descriptor address register r/w 0x0000_0000 15.3.2.10/15-24 0x2_1138 reserved ? ? ? 0x2_113c nlsdar n ?dma 0 next list descriptor address register r/w 0x0000_0000 15.3.2.11/15-25 0x2_1140 ssr n ?dma 0 source stride register r/w 0x0000_0000 15.3.2.12/15-25 0x2_1144 dsr n ?dma 0 destination stride register r/w 0x0000_0000 15.3.2.13/15-26 table 2-9. memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-26 freescale semiconductor memory map 0x2_1148 ? 0x2_117c reserved ? ? ? 0x2_1180 mr n ?dma 1 mode register r/w 0x0000_0000 15.3.2.1/15-10 0x2_1184 sr n ?dma 1 status register special 0x0000_0000 15.3.2.2/15-13 0x2_1188 reserved ? ? ? 0x2_118c clndar n ?dma 1 current link descriptor address register r/w 0x0000_0000 15.3.2.3/15-14 0x2_1190 satr n ?dma 1 source attributes register r/w 0x0000_0000 15.3.2.4/15-16 0x2_1194 sar n ?dma 1 source address register r/w 0x0000_0000 15.3.2.5/15-18 0x2_1198 datr n ?dma 1 destination attributes register r/w 0x0000_0000 15.3.2.6/15-19 0x2_119c dar n ?dma 1 destination address register r/w 0x0000_0000 15.3.2.7/15-21 0x2_11a0 bcr n ?dma 1 byte count register r/w 0x0000_0000 15.3.2.8/15-23 0x2_11a4 reserved ? ? ? 0x2_11a8 nlndar n ?dma 1 next link descriptor address register r/w 0x0000_0000 15.3.2.9/15-23 0x2_11ac ? 0x2_11b0 reserved ? ? ? 0x2_11b4 clsdar n ?dma 1 current list alternate base descriptor address register r/w 0x0000_0000 15.3.2.10/15-24 0x2_11b8 reserved ? ? ? 0x2_11bc nlsdar n ?dma 1 next list descriptor address register r/w 0x0000_0000 15.3.2.11/15-25 0x2_11c0 ssr n ?dma 1 source stride register r/w 0x0000_0000 15.3.2.12/15-25 0x2_11c4 dsr n ?dma 1 destination stride register r/w 0x0000_0000 15.3.2.13/15-26 0x2_11c8 ? 0x2_11fc reserved ? ? ? 0x2_1200 mr n ?dma 2 mode register r/w 0x0000_0000 15.3.2.1/15-10 0x2_1204 sr n ?dma 2 status register special 0x0000_0000 15.3.2.2/15-13 0x2_1208 reserved ? ? ? 0x2_120c clndar n ?dma 2 current link descriptor address register r/w 0x0000_0000 15.3.2.3/15-14 0x2_1210 satr n ?dma 2 source attributes register r/w 0x0000_0000 15.3.2.4/15-16 0x2_1214 sar n ?dma 2 source address register r/w 0x0000_0000 15.3.2.5/15-18 0x2_1218 datr n ?dma 2 destination attributes register r/w 0x0000_0000 15.3.2.6/15-19 0x2_121c dar n ?dma 2 destination address register r/w 0x0000_0000 15.3.2.7/15-21 0x2_1220 bcr n ?dma 2 byte count register r/w 0x0000_0000 15.3.2.8/15-23 0x2_1224 reserved ? ? ? table 2-9. memory map (continued) offset register access reset section/page
complete ccsr map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-27 0x2_1228 nlndar n ?dma 2 next link descriptor address register r/w 0x0000_0000 15.3.2.9/15-23 0x2_122c ? 0x2_1230 reserved ? ? ? 0x2_1234 clsdar n ?dma 2 current list alternate base descriptor address register r/w 0x0000_0000 15.3.2.10/15-24 0x2_1238 reserved ? ? ? 0x2_123c nlsdar n ?dma 2 next list descriptor address register r/w 0x0000_0000 15.3.2.11/15-25 0x2_1240 ssr n ?dma 2 source stride register r/w 0x0000_0000 15.3.2.12/15-25 0x2_1244 dsr n ?dma 2 destination stride register r/w 0x0000_0000 15.3.2.13/15-26 0x2_1248 ? 0x2_127c reserved ? ? ? 0x2_1280 mr n ?dma 3 mode register r/w 0x0000_0000 15.3.2.1/15-10 0x2_1284 sr n ?dma 3 status register special 0x0000_0000 15.3.2.2/15-13 0x2_1288 reserved ? ? ? 0x2_128c clndar n ?dma 3 current link descriptor address register r/w 0x0000_0000 15.3.2.3/15-14 0x2_1290 satr n ?dma 3 source attributes register r/w 0x0000_0000 15.3.2.4/15-16 0x2_1294 sar n ?dma 3 source address register r/w 0x0000_0000 15.3.2.5/15-18 0x2_1298 datr n ?dma 3 destination attributes register r/w 0x0000_0000 15.3.2.6/15-19 0x2_129c dar n ?dma 3 destination address register r/w 0x0000_0000 15.3.2.7/15-21 0x2_12a0 bcr n ?dma 3 byte count register r/w 0x0000_0000 15.3.2.8/15-23 0x2_12a4 reserved ? ? ? 0x2_12a8 nlndar n ?dma 3 next link descriptor address register r/w 0x0000_0000 15.3.2.9/15-23 0x2_12ac ? 0x2_12b0 reserved ? ? ? 0x2_12b4 clsdar n ?dma 3 current list alternate base descriptor address register r/w 0x0000_0000 15.3.2.10/15-24 0x2_12b8 reserved ? ? ? 0x2_12bc nlsdar n ?dma 3 next list descriptor address register r/w 0x0000_0000 15.3.2.11/15-25 0x2_12c0 ssr n ?dma 3 source stride register r/w 0x0000_0000 15.3.2.12/15-25 0x2_12c4 dsr n ?dma 3 destination stride register r/w 0x0000_0000 15.3.2.13/15-26 0x2_12c8 ? 0x2_12fc reserved ? ? ? 0x2_1300 dgsr?dma general status register read 0x0000_0000 15.3.2.14/15-26 tsec1 general control and status registers table 2-9. memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-28 freescale semiconductor memory map 0x2_4000? 0x2_400c reserved r 0x0000_0000 ? 0x2_4010 ievent?interrupt event register r/w 0x0000_0000 14.5.3.1.1/14-20 0x2_4014 imask?interrupt mask register r/w 0x0000_0000 14.5.3.1.2/14-23 0x2_4018 edis?error disabled register r/w 0x0000_0000 14.5.3.1.3/14-24 0x2_401c reserved r 0x0000_0000 ? 0x2_4020 ecntrl?ethernet control register r/w 0x0000_0000 14.5.3.1.4/14-25 0x2_4024 minflr?minimum frame length register r/w 0x0000_0040 14.5.3.1.5/14-26 0x2_4028 ptv?pause time value register r/w 0x0000_0000 14.5.3.1.6/14-27 0x2_402c dmactrl?dma control register r/w 0x0000_0000 14.5.3.1.7/14-28 0x2_4030 tbipa?tbi phy address register r/w 0x0000_0000 14.5.3.1.8/14-29 0x2_4034? 0x2_4088 reserved r 0x0000_0000 ? tsec1 fifo control and status registers 0x2_404c fifo_pause_ctrl?fifo pause control register r/w 0x0000_0000 14.5.3.2.1/14-30 0x2_4050? 0x2_4088 reserved r 0x0000_0000 ? 0x2_408c fifo_tx_thr?fifo transmit threshold register r/w 0x0000_0100 14.5.3.2.2/14-31 0x2_4090? 0x2_4094 reserved r 0x0000_0000 ? 0x2_4098 fifo_tx_starve?fifo transmit starve register r/w 0x0000_0080 14.5.3.2.3/14-32 0x2_409c fifo_tx_starve_shutoff?fifo transmit starve shutoff register r/w 0x0000_0100 14.5.3.2.4/14-32 0x2_40a0? 0x2_40fc reserved r 0x0000_0000 ? tsec1 transmit control and status registers 0x2_4100 tctrl?transmit control register r/w 0x0000_0000 14.5.3.3.1/14-33 0x2_4104 tstat?transmit status register r/w 0x0000_0000 14.5.3.3.2/14-34 0x2_4108 reserved r 0x0000_0000 ? 0x2_410c tbdlen?txbd data length register r 0x0000_0000 14.5.3.3.3/14-35 0x2_4110 txic?transmit interrupt coalescing configuration register r/w 0x0000_0000 14.5.3.3.4/14-35 0x2_4114? 0x2_4120 reserved r 0x0000_0000 ? 0x2_4124 ctbptr?current txbd pointer register r 0x0000_0000 14.5.3.3.5/14-36 0x2_4128? 0x2_4180 reserved r 0x0000_0000 ? 0x2_4184 tbptr?txbd pointer register r/w 0x0000_0000 14.5.3.3.6/14-37 table 2-9. memory map (continued) offset register access reset section/page
complete ccsr map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-29 0x2_4188? 0x2_4200 reserved r 0x0000_0000 ? 0x2_4204 tbase?txbd base address register r/w 0x0000_0000 14.5.3.3.7/14-37 0x2_4208? 0x2_42ac reserved r 0x0000_0000 ? 0x2_42b0 ostbd?out-of-sequence txbd register r/w 0x0800_0000 14.5.3.3.8/14-38 0x2_42b4 ostbdp?out-of-sequence tx data buffer pointer register r/w 0x0000_0000 14.5.3.3.9/14-40 0x2_42b8? 0x2_42fc reserved r 0x0000_0000 ? tsec1 receive control and status registers 0x2_4300 rctrl?receive control register r/w 0x0000_0000 14.5.3.4.1/14-41 0x2_4304 rstat?receive status register r/w 0x0000_0000 14.5.3.4.2/14-41 0x2_4308 reserved r 0x0000_0000 ? 0x2_430c rbdlen?rxbd data length register r 0x0000_0000 14.5.3.4.3/14-42 0x2_4310 rxic?receive interrupt coalescing configuration register r/w 0x0000_0000 14.5.3.4.4/14-43 0x2_4314? 0x2_4320 reserved r 0x0000_0000 ? 0x2_4324 crbptr?current rxbd pointer register r 0x0000_0000 14.5.3.4.5/14-44 0x2_4328? 0x2_433c reserved r 0x0000_0000 ? 0x2_4340 mrblr?maximum receive buffer length register r/w 0x0000_0000 14.5.3.4.6/14-44 0x2_4344? 0x2_4380 reserved r 0x0000_0000 ? 0x2_4384 rbptr?rxbd pointer register r/w 0x0000_0000 14.5.3.4.7/14-45 0x2_4388? 0x2_4400 reserved r 0x0000_0000 ? 0x2_4404 rbase?rxbd base address register r/w 0x0000_0000 14.5.3.4.8/14-45 0x2_4408? 0x2_44fc reserved r 0x0000_0000 ? tsec1 mac registers 0x2_4500 maccfg1?mac configuration register 1 r/w 0x0000_0000 14.5.3.6.1/14-49 0x2_4504 maccfg2?mac configuration register 2 r/w 0x0000_7000 14.5.3.6.2/14-51 0x2_4508 ipgifg?inter-packet gap/inter-frame gap register r/w 0x4060_5060 14.5.3.6.3/14-52 0x2_450c hafdup?half-duplex register r/w 0x00a1_f037 14.5.3.6.4/14-53 0x2_4510 maxfrm?maximum frame length register r/w 0x0000_0600 14.5.3.6.5/14-54 0x2_4514? 0x2_451c reserved r 0x0000_0000 ? table 2-9. memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-30 freescale semiconductor memory map 0x2_4520 miimcfg?mii management configuration register r/w 0x0000_0000 14.5.3.6.6/14-54 0x2_4524 miimcom?mii management command register r/w 0x0000_0000 14.5.3.6.7/14-55 0x2_4528 miimadd?mii management address register r/w 0x0000_0000 14.5.3.6.8/14-56 0x2_452c miimcon?mii management control register w 0x0000_0000 14.5.3.6.9/14-57 0x2_4530 miimstat?mii management status register r 0x0000_0000 14.5.3.6.10/14-57 0x2_4534 miimind?mii management indicator register r 0x0000_0000 14.5.3.6.11/14-58 0x2_4538 reserved r 0x0000_0000 ? 0x2_453c ifstat?interface status register r/w 0x0000_0000 14.5.3.6.12/14-58 0x2_4540 macstnaddr1?station address register, part 1 r/w 0x0000_0000 14.5.3.6.13/14-59 0x2_4544 macstnaddr2?station address register, part 2 r/w 0x0000_0000 14.5.3.6.14/14-60 0x2_4548? 0x2_467c reserved r 0x0000_0000 ? tsec1 rmon mib registers tsec1 transmit and receive counters 0x2_4680 tr64?transmit and receive 64-byte frame counter register r/w 0x0000_0000 14.5.3.7.1/14-61 0x2_4684 tr127?transmit and receive 65- to 127-byte frame counter register r/w 0x0000_0000 14.5.3.7.2/14-61 0x2_4688 tr255?transmit and receive 128- to 255-byte frame counter register r/w 0x0000_0000 14.5.3.7.3/14-62 0x2_468c tr511?transmit and receive 256- to 511-byte frame counter register r/w 0x0000_0000 14.5.3.7.4/14-62 0x2_4690 tr1k?transmit and receive 512- to 1023-byte frame counter register r/w 0x0000_0000 14.5.3.7.5/14-63 0x2_4694 trmax?transmit and receive 1024- to 1518-byte frame counter register r/w 0x0000_0000 14.5.3.7.6/14-63 0x2_4698 trmgv?transmit and receive 1519- to 1522-byte good vlan frame count register r/w 0x0000_0000 14.5.3.7.7/14-64 tsec1 receive counters 0x2_469c rbyt?receive byte counter register r/w 0x0000_0000 14.5.3.7.8/14-64 0x2_46a0 rpkt?receive packet counter register r/w 0x0000_0000 14.5.3.7.9/14-65 0x2_46a4 rfcs?receive fcs error counter register r/w 0x0000_0000 14.5.3.7.10/14-65 0x2_46a8 rmca?receive multicast packet counter register r/w 0x0000_0000 14.5.3.7.11/14-66 0x2_46ac rbca?receive broadcast packet counter register r/w 0x0000_0000 14.5.3.7.12/14-66 0x2_46b0 rxcf?receive control frame packet counter register r/w 0x0000_0000 14.5.3.7.13/14-67 0x2_46b4 rxpf?receive pause frame packet counter register r/w 0x0000_0000 14.5.3.7.14/14-67 0x2_46b8 rxuo?receive unknown op code counter register r/w 0x0000_0000 14.5.3.7.15/14-68 table 2-9. memory map (continued) offset register access reset section/page
complete ccsr map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-31 0x2_46bc raln?receive alignment error counter register r/w 0x0000_0000 14.5.3.7.16/14-68 0x2_46c0 rflr?receive frame length error counter register r/w 0x0000_0000 14.5.3.7.17/14-69 0x2_46c4 rcde?receive code error counter register r/w 0x0000_0000 14.5.3.7.18/14-69 0x2_46c8 rcse?receive carrier sense error counter register r/w 0x0000_0000 14.5.3.7.19/14-70 0x2_46cc rund?receive undersize packet counter register r/w 0x0000_0000 14.5.3.7.20/14-70 0x2_46d0 rovr?receive oversize packet counter register r/w 0x0000_0000 14.5.3.7.21/14-71 0x2_46d4 rfrg?receive fragments counter register r/w 0x0000_0000 14.5.3.7.22/14-71 0x2_46d8 rjbr?receive jabber counter register r/w 0x0000_0000 14.5.3.7.23/14-72 0x2_46dc rdrp?receive drop register r/w 0x0000_0000 14.5.3.7.24/14-72 tsec1 transmit counters 0x2_46e0 tbyt?transmit byte counter register r/w 0x0000_0000 14.5.3.7.25/14-73 0x2_46e4 tpkt?transmit packet counter register r/w 0x0000_0000 14.5.3.7.26/14-73 0x2_46e8 tmca?transmit multicast packet counter register r/w 0x0000_0000 14.5.3.7.27/14-74 0x2_46ec tbca?transmit broadcast packet counter register r/w 0x0000_0000 14.5.3.7.28/14-74 0x2_46f0 txpf?transmit pause control frame counter register r/w 0x0000_0000 14.5.3.7.29/14-75 0x2_46f4 tdfr?transmit deferral packet counter register r/w 0x0000_0000 14.5.3.7.30/14-75 0x2_46f8 tedf?transmit excessive deferral packet counter register r/w 0x0000_0000 14.5.3.7.31/14-76 0x2_46fc tscl?transmit single collision packet counter register r/w 0x0000_0000 14.5.3.7.32/14-76 0x2_4700 tmcl?transmit multiple collision packet counter register r/w 0x0000_0000 14.5.3.7.33/14-77 0x2_4704 tlcl?transmit late collision packet counter register r/w 0x0000_0000 14.5.3.7.34/14-77 0x2_4708 txcl?transmit excessive collision packet counter register r/w 0x0000_0000 14.5.3.7.35/14-78 0x2_470c tncl?transmit total collision counter register r/w 0x0000_0000 14.5.3.7.36/14-78 0x2_4710 reserved r 0x0000_0000 ? 0x2_4714 tdrp?transmit drop frame counter register r/w 0x0000_0000 14.5.3.7.37/14-79 0x2_4718 tjbr?transmit jabber frame counter register r/w 0x0000_0000 14.5.3.7.38/14-79 0x2_471c tfcs?transmit fcs error counter register r/w 0x0000_0000 14.5.3.7.39/14-80 0x2_4720 txcf?transmit control frame counter register r/w 0x0000_0000 14.5.3.7.40/14-80 0x2_4724 tovr?transmit oversize frame counter register r/w 0x0000_0000 14.5.3.7.41/14-81 0x2_4728 tund?transmit undersize frame counter register r/w 0x0000_0000 14.5.3.7.42/14-81 0x2_472c tfrg?transmit fragments frame counter register r/w 0x0000_0000 14.5.3.7.43/14-82 tsec1 general registers 0x2_4730 car1?carry register one register r/w 0x0000_0000 14.5.3.7.44/14-82 table 2-9. memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-32 freescale semiconductor memory map 0x2_4734 car2?carry register two register r/w 0x0000_0000 14.5.3.7.45/14-84 0x2_4738 cam1?carry register one mask register r/w 0xfe01_ffff 14.5.3.7.46/14-85 0x2_473c cam2?carry register two mask register r/w 0x000f_ffff 14.5.3.7.47/14-86 0x2_4740? 0x2_47fc reserved r 0x0000_0000 ? tsec1 hash function registers 0x2_4800 iaddr0?individual address register 0 r/w 0x0000_0000 14.5.3.8.1/14-88 0x2_4804 iaddr1?individual address register 1 r/w 0x0000_0000 0x2_4808 iaddr2?individual address register 2 r/w 0x0000_0000 0x2_480c iaddr3?individual address register 3 r/w 0x0000_0000 0x2_4810 iaddr4?individual address register 4 r/w 0x0000_0000 0x2_4814 iaddr5?individual address register 5 r/w 0x0000_0000 0x2_4818 iaddr6?individual address register 6 r/w 0x0000_0000 0x2_481c iaddr7?individual address register 7 r/w 0x0000_0000 0x2_4820? 0x2_487c reserved r 0x0000_0000 ? 0x2_4880 gaddr0?group address register 0 r/w 0x0000_0000 14.5.3.8.2/14-88 0x2_4884 gaddr1?group address register 1 r/w 0x0000_0000 0x2_4888 gaddr2?group address register 2 r/w 0x0000_0000 0x2_488c gaddr3?group address register 3 r/w 0x0000_0000 0x2_4890 gaddr4?group address register 4 r/w 0x0000_0000 0x2_4894 gaddr5?group address register 5 r/w 0x0000_0000 0x2_4898 gaddr6?group address register 6 r/w 0x0000_0000 0x2_489c gaddr7?group address register 7 r/w 0x0000_0000 0x2_48a0? 0x2_4bf4 reserved r 0x0000_0000 ? tsec1 attribute registers 0x2_4bf8 attr?attribute register r/w 0x0000_0000 14.5.3.9.1/14-89 0x2_4bfc attreli?attribute el & ei register r/w 0x0000_0000 14.5.3.9.2/14-90 0x2_48a0? 0x2_4afc reserved r 0x0000_0000 ? tsec1 future expansion space 0x2_4c00? 0x2_4ffc reserved r 0x0000_0000 ? 0x2_5000? 0x2_5ffc tsec2 registers 2 fec general control and status registers table 2-9. memory map (continued) offset register access reset section/page
complete ccsr map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-33 0x2_6000? 0x2_600c reserved r 0x0000_0000 ? 0x2_6010 ievent?interrupt event register r 0x0000_0000 21.5.3.1.1/21-13 0x2_6014 imask?interrupt mask register r/w 0x0000_0000 21.5.3.1.2/21-16 0x2_6018 edis?error disabled register r/w 0x0000_0000 21.5.3.1.3/21-18 0x2_601c? 0x2_6020 reserved r 0x0000_0000 ? 0x2_6024 minflr?minimum frame length register r/w 0x0000_0040 21.5.3.1.4/21-18 0x2_6028 ptv?pause time value register r/w 0x0000_0000 21.5.3.1.5/21-19 0x2_602c dmactrl?dma control register r/w 0x0000_0000 21.5.3.1.6/21-20 0x2_6030? 0x2_6088 reserved r 0x0000_0000 ? fec fifo control and status registers 0x2_604c fifo_pause_ctrl?fifo pause control register r/w 0x0000_0000 21.5.3.2.1/21-22 0x2_6050? 0x2_6088 reserved r 0x0000_0000 ? 0x2_608c fifo_tx_thr?fifo transmit threshold register r/w 0x0000_0080 21.5.3.2.2/21-23 0x2_6090? 0x2_6094 reserved r 0x0000_0000 ? 0x2_6098 fifo_tx_starve?fifo transmit starve register r/w 0x0000_0020 21.5.3.3.4/21-27 0x2_609c fifo_tx_starve_shutoff?fifo transmit starve shutoff register r/w 0x0000_0080 21.5.3.3.5/21-28 0x2_60a0? 0x2_60fc reserved r 0x0000_0000 ? fec transmit control and status registers 0x2_6100 tctrl?transmit control register r/w 0x0000_0000 21.5.3.3.1/21-25 0x2_6104 tstat?transmit status register r/w 0x0000_0000 21.5.3.3.2/21-26 0x2_6108 reserved r 0x0000_0000 ? 0x2_610c tbdlen?txbd data length r 0x0000_0000 21.5.3.3.3/21-27 0x2_6110? 0x2_6120 reserved r 0x0000_0000 ? 0x2_6124 ctbptr?current txbd pointer register r 0x0000_0000 21.5.3.3.4/21-27 0x2_6128? 0x2_6180 reserved r 0x0000_0000 ? 0x2_6184 tbptr?txbd pointer register r/w 0x0000_0000 21.5.3.3.5/21-28 0x2_6188? 0x2_6200 reserved r 0x0000_0000 ? 0x2_6204 tbase?txbd base address register r/w 0x0000_0000 21.5.3.3.6/21-28 table 2-9. memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-34 freescale semiconductor memory map 0x2_6208? 0x2_62ac reserved r 0x0000_0000 ? 0x2_62b0 ostbd?out-of-sequence txbd register r/w 0x0000_0000 21.5.3.3.7/21-29 0x2_62b4 ostbdp?out-of-sequence txbd pointer register r/w 0x0000_0000 21.5.3.3.8/21-31 0x2_62b8? 0x2_62fc reserved r 0x0000_0000 ? fec receive control and status registers 0x2_6300 rctrl?receive control register r/w 0x0000_0000 21.5.3.4.1/21-31 0x2_6304 rstat?receive status register r/w 0x0000_0000 21.5.3.4.2/21-32 0x2_6308 reserved r 0x0000_0000 ? 0x2_630c rbdlen?rxbd data length register r 0x0000_0000 21.5.3.4.3/21-33 0x2_6310? 0x2_6320 reserved r 0x0000_0000 ? 0x2_6324 crbptr?current rxbd pointer register r 0x0000_0000 21.5.3.4.4/21-33 0x2_6328? 0x2_633c reserved r 0x0000_0000 ? 0x2_6340 mrblr?maximum receive buffer length register r/w 0x0000_0000 21.5.3.4.5/21-34 0x2_6344? 0x2_6380 reserved r 0x0000_0000 ? 0x2_6384 rbptr?rxbd pointer register r/w 0x0000_0000 21.5.3.4.6/21-35 0x2_6388? 0x2_6400 reserved r 0x0000_0000 ? 0x2_6404 rbase?rxbd base address register r/w 0x0000_0000 21.5.3.4.7/21-35 0x2_6408? 0x2_64fc reserved r 0x0000_0000 ? fec mac registers 0x2_6500 maccfg1?mac configuration register #1 r/w 0x0000_0000 21.5.3.6.1/21-38 0x2_6504 maccfg2?mac configuration register #2 r/w 0x0000_7000 21.5.3.6.2/21-40 0x2_6508 ipgifg?inter-packet gap/inter-frame gap register r/w 0x4060_5060 21.5.3.6.3/21-41 0x2_650c hafdup?half-duplex register r/w 0x00a0_f037 21.5.3.6.4/21-41 0x2_6510 maxfrm?maximum frame length register r/w 0x0000_0600 21.5.3.6.5/21-42 0x2_6514? 0x2_6538 reserved r 0x0000_0000 ? 0x2_653c ifstat?interface status register r 0x0000_0000 21.5.3.6.6/21-43 0x2_6540 macstnaddr1?station address register, part 1 r/w 0x0000_0000 21.5.3.6.7/21-43 0x2_6544 macstnaddr2?station address register, part 2 r/w 0x0000_0000 21.5.3.6.8/21-44 0x2_6548? 0x2_67fc reserved r 0x0000_0000 ? table 2-9. memory map (continued) offset register access reset section/page
complete ccsr map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-35 fec hash function registers 0x2_6800 iaddr0?individual address register 0 r/w 0x0000_0000 21.5.3.7.1/21-45 0x2_6804 iaddr1?individual address register 1 r/w 0x0000_0000 0x2_6808 iaddr2?individual address register 2 r/w 0x0000_0000 0x2_680c iaddr3?individual address register 3 r/w 0x0000_0000 0x2_6810 iaddr4?individual address register 4 r/w 0x0000_0000 0x2_6814 iaddr5?individual address register 5 r/w 0x0000_0000 0x2_6818 iaddr6?individual address register 6 r/w 0x0000_0000 0x2_681c iaddr7?individual address register 7 r/w 0x0000_0000 0x2_6820? 0x2_687c reserved r 0x0000_0000 ? 0x2_6880 gaddr0?group address register 0 r/w 0x0000_0000 21.5.3.7.2/21-46 0x2_6884 gaddr1?group address register 1 r/w 0x0000_0000 0x2_6888 gaddr2?group address register 2 r/w 0x0000_0000 0x2_688c gaddr3?group address register 3 r/w 0x0000_0000 0x2_6890 gaddr4?group address register 4 r/w 0x0000_0000 0x2_6894 gaddr5?group address register 5 r/w 0x0000_0000 0x2_6898 gaddr6?group address register 6 r/w 0x0000_0000 0x2_689c gaddr7?group address register 7 r/w 0x0000_0000 0x2_68a0? 0x2_6bf4 reserved r 0x0000_0000 ? fec attribute registers 0x2_6bf8 attr?attribute register r/w 0x0000_0000 21.5.3.8.1/21-46 0x2_6bfc attreli?attribute el & ei register r/w 0x0000_0000 21.5.3.8.2/21-47 fec future expansion space 0x2_6c00? 0x2_6ffc reserved r 0x0000_0000 ? pic register address map?global registers 0x4_0000? 0x4_0030 reserved ? ? ? 0x4_0040 ipidr0?interprocessor interrupt 0 (ipi 0) dispatch register w 0x0000_0000 10.3.7.1/10-39 0x4_0050 ipidr1?ipi 1 dispatch register 0x4_0060 ipidr2?ipi 2 dispatch register 0x4_0070 ipidr3?ipi 3 dispatch register 0x4_0080 ctpr?current task priority register r/w 0x0000_000f 10.3.7.2/10-40 table 2-9. memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-36 freescale semiconductor memory map 0x4_0090 whoami?who am i register r 0x0000_0000 10.3.7.3/10-41 0x4_00a0 iack?interrupt acknowledge register r 0x0000_0000 10.3.7.4/10-41 0x4_00b0 eoi?end of interrupt register w 0x0000_0000 10.3.7.5/10-42 0x4_00c0? 0x4_0ff0 reserved ? ? ? 0x4_1000 frr?feature reporting register r 0x0037_0002 10.3.1.1/10-16 0x4_1010 reserved ? ? ? 0x4_1020 gcr?global configuration register r/w 0x0000_0000 10.3.1.2/10-17 0x4_1030 reserved ? ? ? 0x4_1040? 0x4_1070 vendor reserved ? ? ? 0x4_1080 vir?vendor identification register r 0x0000_0000 10.3.1.3/10-17 0x4_1090 pir?processor initialization register r/w 0x0000_0000 10.3.1.4/10-18 0x4_10a0 ipivpr0?ipi 0 vector/priority register r/w 0x8000_0000 10.3.1.5/10-19 0x4_10b0 ipivpr1?ipi 1 vector/priority register 0x4_10c0 ipivpr2?ipi 2 vector/priority register 0x4_10d0 ipivpr3?ipi 3 vector/priority register 0x4_10e0 svr?spurious vector register r/w 0x0000_ffff 10.3.1.6/10-19 0x4_10f0 tfrr?timer frequency reporting register r/w 0x0000_0000 10.3.2.1/10-20 0x4_1100 gtccr0?global timer 0 current count register r 0x0000_0000 10.3.2.2/10-21 0x4_1110 gtbcr0?global timer 0 base count register r/w 0x8000_0000 10.3.2.3/10-21 0x4_1120 gtvpr0?global timer 0 vector/priority register r/w 0x8000_0000 10.3.2.4/10-22 0x4_1130 gtdr0?global timer 0 destination register r/w 0x0000_0001 10.3.2.5/10-23 0x4_1140 gtccr1?global timer 1 current count register r 0x0000_0000 10.3.2.2/10-21 0x4_1150 gtbcr1?global timer 1 base count register r/w 0x8000_0000 10.3.2.3/10-21 0x4_1160 gtvpr1?global timer 1 vector/priority register r/w 0x8000_0000 10.3.2.4/10-22 0x4_1170 gtdr1?global timer 1 destination register r/w 0x0000_0001 10.3.2.5/10-23 0x4_1180 gtccr2?global timer 2 current count register r 0x0000_0000 10.3.2.2/10-21 0x4_1190 gtbcr2?global timer 2 base count register r/w 0x8000_0000 10.3.2.3/10-21 0x4_11a0 gtvpr2?global timer 2 vector/priority register r/w 0x8000_0000 10.3.2.4/10-22 0x4_11b0 gtdr2?global timer 2 destination register r/w 0x0000_0001 10.3.2.5/10-23 0x4_11c0 gtccr3?global timer 3 current count register r 0x0000_0000 10.3.2.2/10-21 0x4_11d0 gtbcr3?global timer 3 base count register r/w 0x8000_0000 10.3.2.3/10-21 0x4_11e0 gtvpr3?global timer 3 vector/priority register r/w 0x8000_0000 10.3.2.4/10-22 0x4_11f0 gtdr3?global timer 3 destination register r/w 0x0000_0001 10.3.2.5/10-23 table 2-9. memory map (continued) offset register access reset section/page
complete ccsr map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-37 0x4_1200? 0x4_12f0 reserved ? ? ? 0x4_1300 tcr?timer control register r/w 0x0000_0000 10.3.2.6/10-24 0x4_1310 irqsr0?irq_out summary register 0 r 0x0000_0000 10.3.3.1/10-26 0x4_1320 irqsr1?irq_out summary register 1 r 0x0000_0000 10.3.3.2/10-27 0x4_1330 cisr0?critical interrupt summary register 0 r 0x0000_0000 10.3.3.3/10-27 0x4_1340 cisr1?critical interrupt summary register 1 r 0x0000_0000 10.3.3.4/10-28 0x4_1350 pm0mr0?performance monitor 0 mask register 0 r/w 0x00ff_ffff 10.3.4.1/10-29 0x4_1360 pm0mr1?performance monitor 0 mask register 1 r/w 0xffff_ffff 10.3.4.2/10-30 0x4_1370 pm1mr0?performance monitor 1 mask register 0 r/w 0x00ff_ffff 10.3.4.1/10-29 0x4_1380 pm1mr1?performance monitor 1 mask register 1 r/w 0xffff_ffff 10.3.4.2/10-30 0x4_1390 pm2mr0?performance monitor 2 mask register 0 r/w 0x00ff_ffff 10.3.4.1/10-29 0x4_13a0 pm2mr1?performance monitor 2 mask register 1 r/w 0xffff_ffff 10.3.4.2/10-30 0x4_13b0 pm3mr0?performance monitor 3 mask register 0 r/w 0x00ff_ffff 10.3.4.1/10-29 0x4_13c0 pm3mr1?performance monitor 3 mask register 1 r/w 0xffff_ffff 10.3.4.2/10-30 0x4_13d0? 0x4_13f0 reserved ? ? ? 0x4_1400 msgr0?message register 0 r/w 0x0000_0000 10.3.5.1/10-30 0x4_1410 msgr1?message register 1 0x4_1420 msgr2?message register 2 0x4_1430 msgr3?message register 3 0x4_1440? 0x4_14f0 reserved ? ? ? 0x4_1500 mer?message enable register r/w 0x0000_0000 10.3.5.2/10-31 0x4_1510 msr?message status register r/w 0x0000_0000 10.3.5.3/10-31 0x4_1520? 0x4_fff0 reserved ? ? ? pic register address map?interrupt source configuration registers 0x5_0000 eivpr0?external interrupt 0 (irq0) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_0010 eidr0?external interrupt 0 (irq0) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_0020 eivpr1?external interrupt 1 (irq1) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_0030 eidr1?external interrupt 1 (irq1) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_0040 eivpr2?external interrupt 2 (irq2) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 table 2-9. memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-38 freescale semiconductor memory map 0x5_0050 eidr2?external interrupt 2 (irq2) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_0060 eivpr3?external interrupt 3 (irq3) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_0070 eidr3?external interrupt 3 (irq3) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_0080 eivpr4?external interrupt 4 (irq4) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_0090 eidr4?external interrupt 4 (irq4) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_00a0 eivpr5?external interrupt 5 (irq5) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_00b0 eidr5?external interrupt 5 (irq5) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_00c0 eivpr6?external interrupt 6 (irq6) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_00d0 eidr6?external interrupt 6 (irq6) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_00e0 eivpr7?external interrupt 7 (irq7) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_00f0 eidr7?external interrupt 7 (irq7) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_0100 eivpr8?external interrupt 8 (irq8) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_0110 eidr8?external interrupt 8 (irq8) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_0120 eivpr9?external interrupt 9 (irq9) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_0130 eidr9?external interrupt 9 (irq9) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_0140 eivpr10?external interrupt 10 (irq10) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_0150 eidr10?external interrupt 10 (irq10) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_0160 eivpr11?external interrupt 11 (irq11) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_0170 eidr11?external interrupt 11 (irq11) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_0180? 0x5_01f0 reserved ? ? ? 0x5_0200 iivpr0?internal interrupt 0 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0210 iidr0?internal interrupt 0 destination register r/w 0x0000_0001 10.3.6.4/10-35 table 2-9. memory map (continued) offset register access reset section/page
complete ccsr map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-39 0x5_0220 iivpr1?internal interrupt 1 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0230 iidr1?internal interrupt 1 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0240 iivpr2?internal interrupt 2 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0250 iidr2?internal interrupt 2 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0260 iivpr3?internal interrupt 3 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0270 iidr3?internal interrupt 3 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0280 iivpr4?internal interrupt 4 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0290 iidr4?internal interrupt 4 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_02a0 iivpr5?internal interrupt 5 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_02b0 iidr5?internal interrupt 5 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_02c0 iivpr6?internal interrupt 6 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_02d0 iidr6?internal interrupt 6 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_02e0 iivpr7?internal interrupt 7 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_02f0 iidr7?internal interrupt 7 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0300 iivpr8?internal interrupt 8 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0310 iidr8?internal interrupt 8 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0320 iivpr9?internal interrupt 9 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0330 iidr9?internal interrupt 9 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0340 iivpr10?internal interrupt 10 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0350 iidr10?internal interrupt 10 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0360 iivpr11?internal interrupt 11 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0370 iidr11?internal interrupt 11 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0380 iivpr12?internal interrupt 12 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0390 iidr12?internal interrupt 12 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_03a0 iivpr13?internal interrupt 13 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_03b0 iidr13?internal interrupt 13 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_03c0 iivpr14?internal interrupt 14 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_03d0 iidr14?internal interrupt 14 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_03e0 iivpr15?internal interrupt 15 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_03f0 iidr15?internal interrupt 15 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0400 iivpr16?internal interrupt 16 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0410 iidr16?internal interrupt 16 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0420 iivpr17?internal interrupt 17 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0430 iidr17?internal interrupt 17 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0440 iivpr18?internal interrupt 18 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 table 2-9. memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-40 freescale semiconductor memory map 0x5_0450 iidr18?internal interrupt 18 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0460 iivpr19?internal interrupt 19 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0470 iidr19?internal interrupt 19 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0480 iivpr20?internal interrupt 20 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0490 iidr20?internal interrupt 20 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_04a0 iivpr21?internal interrupt 21 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_04b0 iidr21?internal interrupt 21 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_04c0 iivpr22?internal interrupt 22 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_04d0 iidr22?internal interrupt 22 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_04e0 iivpr23?internal interrupt 23 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_04f0 iidr23?internal interrupt 23 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0500 iivpr24?internal interrupt 24 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0510 iidr24?internal interrupt 24 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0520 iivpr25?internal interrupt 25 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0530 iidr25?internal interrupt 25 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0540 iivpr26?internal interrupt 26 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0550 iidr126?internal interrupt 26 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0560 iivpr27?internal interrupt 27 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0570 iidr27?internal interrupt 27 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0580 iivpr28?internal interrupt 28 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0590 iidr28?internal interrupt 28 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_05a0 iivpr29?internal interrupt 29 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_05b0 iidr29?internal interrupt 29 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_05c0 iivpr30?internal interrupt 30 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_05d0 iidr30?internal interrupt 30 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_05e0 iivpr31?internal interrupt 31 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_05f0 iidr31?internal interrupt 31 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0600? 0x5_15f0 reserved ? ? ? 0x5_1600 mivpr0?messaging interrupt 0 (msg 0) vector/priority register r/w 0x8000_0000 10.3.6.5/10-36 0x5_1610 midr0?messaging interrupt 0 (msg 0) destination register r/w 0x0000_0001 10.3.6.6/10-37 0x5_1620 mivpr1?messaging interrupt 1 (msg 1) vector/priority register r/w 0x8000_0000 10.3.6.5/10-36 0x5_1630 midr1?messaging interrupt 1 (msg 1) destination register r/w 0x0000_0001 10.3.6.6/10-37 table 2-9. memory map (continued) offset register access reset section/page
complete ccsr map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-41 0x5_1640 mivpr2?messaging interrupt 2 (msg 2) vector/priority register r/w 0x8000_0000 10.3.6.5/10-36 0x5_1650 midr2?messaging interrupt 2 (msg 2) destination register r/w 0x0000_0001 10.3.6.6/10-37 0x5_1660 mivpr3?messaging interrupt 3 (msg 3) vector/priority register r/w 0x8000_0000 10.3.6.5/10-36 0x5_1670 midr3?messaging interrupt 3 (msg 3) destination register r/w 0x0000_0001 10.3.6.6/10-37 0x5_1680? 0x5_fff0 reserved ? ? ? pic register address map?per-cpu registers 0x6_0000? 0x6_0030 reserved ? ? ? 0x6_0040 ipidr0?p0 ipi 0 dispatch register w all zeros 10.3.7.1/10-39 0x6_0050 ipidr1?p0 ipi 1 dispatch register 0x6_0060 ipidr2?p0 ipi 2 dispatch register 0x6_0070 ipidr3?p0 ipi 3 dispatch register 0x6_0080 ctpr0?p0 current task priority register r/w 0x0000_000f 10.3.7.2/10-40 0x6_0090 whoami0?p0 who am i register r all zeros 10.3.7.3/10-41 0x6_00a0 iack0?p0 interrupt acknowledge register r all zeros 10.3.7.4/10-41 0x6_00b0 eoi0?p0 end of interrupt register w all zeros 10.3.7.5/10-42 table 2-9. memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-42 freescale semiconductor memory map rapidio registers rapidio architectural registers 0xc_0000 didcar?device identity capab ility register r 0x 0002_0002 17.3.1.1/17-13 0xc_0004 dicar?device information capability register r 0x8030_0020 17.3.1.2/17-14 0xc_0008 aidcar?assembly identity capability register r/w 0x0000_0000 17.3.1.3/17-14 0xc_000c aicar?assembly information capability register r/w 0x0000_0100 17.3.1.4/17-15 0xc_0010 pefcar?processing element features capability register r 0xe088_0009 17.3.1.5/17-15 0xc_0014 spicar?switch port information capability register r 0x0000_0100 17.3.1.6/17-17 0xc_0018 socar?source operations capab ility register r 0x 0600_fcf0 17.3.1.7/17-17 0xc_001c docar?destination operations capability register r 0x0600_fcf4 17.3.1.8/17-19 0xc_0040 msr?mailbox command and status register r 0x0000_0000 17.3.1.9/17-22 0xc_0044 pwdcsr?port-write and doorbell command and status register r 0x0000_0020 17.3.1.10/17-22 0xc_004c pellccsr?processing element logical layer control command and status register r 0x0000_0001 17.3.1.11/17-24 0xc_0058 reserved r 0x0000_0000 ? 0xc_005c lcsba1csr?local configuration space base address 1 command and status register r/w 0x0000_0000 17.3.1.12/17-24 0xc_0060 bdidcsr?base device id command and status register r/w 0x00[cfg]_0000 17.3.1.13/17-25 0xc_0068 hbdidlcsr?host base device id lock command and status register special 0x0000_ffff 17.3.1.14/17-26 0xc_006c ctcsr?component tag command and status register r/w 0x0000_0000 17.3.1.15/17-26 0xc_0100 pmbh0csr?8/16 lp-lvds port maintenance block header 0 command and status register r 0x0000_0002 17.3.1.16/17-27 0xc_0120 pltoccsr?port link time-out control command and status register r/w 0xffff_ff00 17.3.1.17/17-27 0xc_0124 prtoccsr?port response time-out control command and status register r/w 0xffff_ff00 17.3.1.18/17-28 0xc_013c pgccsr?port general control command and status register r/w 0x[cfg]000_0000 17.3.1.19/17-29 0xc_0140 plmreqcsr?port link maintenance request command and status register r/w 0x0000_0000 17.3.1.20/17-29 0xc_0144 plmrespcsr?port link maintenance response command and status register r 0x0000_0000 17.3.1.21/17-30 0xc_0148 plascsr?port local ackid status command and status register r/w 0x0000_0000 17.3.1.22/17-31 table 2-9. memory map (continued) offset register access reset section/page
complete ccsr map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-43 0xc_0158 pescsr?port error and status command and status register r/w 0x0000_0000 17.3.1.23/17-31 0xc_015c pccsr?port control command and status register r/w 0x4400_0000 17.3.1.24/17-33 implementation registers 0xd_0000 cr?configuration register r/w 0x0000_0001 17.3.2.1.1/17-34 0xd_0010 pcr?port configuration register r/w 0x0000_0010 17.3.2.1.2/17-35 0xd_0014 peir?port error injection register r/w 0x0000_0000 17.3.2.1.3/17-35 atmu registers 0xd_0c00 rowtar0?rapidio outbound window translation address register 0 r/w 0x0000_0000 17.3.2.2.1/17-37 0xd_0c10 rowar0?rapidio outbound window attributes register 0 r/w 0x8004_401f 17.3.2.2.3/17-39 0xd_0c20 rowtar1?rapidio outbound window translation address register 1 r/w 0x0000_0000 17.3.2.2.1/17-37 0xd_0c28 rowbar1?rapidio outbound window base address register 1 r/w 0x0000_0000 17.3.2.2.2/17-38 0xd_0c30 rowar1?rapidio outbound window attributes register 1 r/w 0x0004_401f 17.3.2.2.3/17-39 0xd_0c40 rowtar2?rapidio outbound window translation address register 2 r/w 0x0000_0000 17.3.2.2.1/17-37 0xd_0c48 rowbar2?rapidio outbound window base address register 2 r/w 0x0000_0000 17.3.2.2.2/17-38 0xd_0c50 rowar2?rapidio outbound window attributes register 2 r/w 0x0004_401f 17.3.2.2.3/17-39 0xd_0c60 rowtar3?rapidio outbound window translation address register 3 r/w 0x0000_0000 17.3.2.2.1/17-37 0xd_0c68 rowbar3?rapidio outbound window base address register 3 r/w 0x0000_0000 17.3.2.2.2/17-38 0xd_0c70 rowar3?rapidio outbound window attributes register 3 r/w 0x0004_401f 17.3.2.2.3/17-39 0xd_0c80 rowtar4?rapidio outbound window translation address register 4 r/w 0x0000_0000 17.3.2.2.1/17-37 0xd_0c88 rowbar4?rapidio outbound window base address register 4 r/w 0x0000_0000 17.3.2.2.2/17-38 0xd_0c90 rowar4?rapidio outbound window attributes register 4 r/w 0x0004_401f 17.3.2.2.3/17-39 0xd_0ca0 rowtar5?rapidio outbound window translation address register 5 r/w 0x0000_0000 17.3.2.2.1/17-37 0xd_0ca8 rowbar5?rapidio outbound window base address register 5 r/w 0x0000_0000 17.3.2.2.2/17-38 table 2-9. memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-44 freescale semiconductor memory map 0xd_0cb0 rowar5?rapidio outbound window attributes register 5 r/w 0x0004_401f 17.3.2.2.3/17-39 0xd_0cc0 rowtar6?rapidio outbound window translation address register 6 r/w 0x0000_0000 17.3.2.2.1/17-37 0xd_0cc8 rowbar6?rapidio outbound window base address register 6 r/w 0x0000_0000 17.3.2.2.2/17-38 0xd_0cd0 rowar6?rapidio outbound window attributes register 6 r/w 0x0004_401f 17.3.2.2.3/17-39 0xd_0ce0 rowtar7?rapidio outbound window translation address register 7 r/w 0x0000_0000 17.3.2.2.1/17-37 0xd_0ce8 rowbar7?rapidio outbound window base address register 7 r/w 0x0000_0000 17.3.2.2.2/17-38 0xd_0cf0 rowar7?rapidio outbound window attributes register 7 r/w 0x0004_401f 17.3.2.2.3/17-39 0xd_0d00 rowtar8?rapidio outbound window translation address register 8 r/w 0x0000_0000 17.3.2.2.1/17-37 0xd_0d08 rowbar8?rapidio outbound window base address register 8 r/w 0x0000_0000 17.3.2.2.2/17-38 0xd_0d10 rowar8?rapidio outbound window attributes register 8 r/w 0x0004_401f 17.3.2.2.3/17-39 0xd_0d60 riwtar4?rapidio inbound window translation address register 4 r/w 0x0000_0000 17.3.2.2.4/17-40 0xd_0d68 riwbar4?rapidio inbound window base address register 4 r/w 0x0000_0000 17.3.2.2.5/17-41 0xd_0d70 riwar4?rapidio inbound window attributes register 4 r/w 0x0004_401f 17.3.2.2.6/17-42 0xd_0d80 riwtar3?rapidio inbound window translation address register 3 r/w 0x0000_0000 17.3.2.2.4/17-40 0xd_0d88 riwbar3?rapidio inbound window base address register 3 r/w 0x0000_0000 17.3.2.2.5/17-41 0xd_0d90 riwar3?rapidio inbound window attributes register 3 r/w 0x0004_401f 17.3.2.2.6/17-42 0xd_0da0 riwtar2?rapidio inbound window translation address register 2 r/w 0x0000_0000 17.3.2.2.4/17-40 0xd_0da8 riwbar2?rapidio inbound window base address register 2 r/w 0x0000_0000 17.3.2.2.5/17-41 0xd_0db0 riwar2?rapidio inbound window attributes register 2 r/w 0x0004_401f 17.3.2.2.6/17-42 0xd_0dc0 riwtar1?rapidio inbound window translation address register 1 r/w 0x0000_0000 17.3.2.2.4/17-40 0xd_0dc8 riwbar1?rapidio inbound window base address register 1 r/w 0x0000_0000 17.3.2.2.5/17-41 table 2-9. memory map (continued) offset register access reset section/page
complete ccsr map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-45 0xd_0dd0 riwar1?rapidio inbound window attributes register 1 r/w 0x0004_401f 17.3.2.2.6/17-42 0xd_0de0 riwtar0?rapidio inbound window translation address register 0 r/w 0x0000_0000 17.3.2.2.4/17-40 0xd_0df0 riwar0?rapidio inbound window attributes register 0 r/w 0x8004_401f 17.3.2.2.6/17-42 error management registers 0xd_0e00 pnfedr?port notification/fatal error detect register r/w 0x0000_0000 17.3.2.3.1/17-44 0xd_0e04 pnfedir?port notification/fatal error detect disable register r/w 0x0000_0000 17.3.2.3.2/17-47 0xd_0e08 pnfeier?port notification/fatal error interrupt enable register r/w 0x0000_0000 17.3.2.3.3/17-49 0xd_0e0c pecsr?port error capture status register r/w 0x0000_0000 17.3.2.3.4/17-52 0xd_0e10 epcr0?error packet capture register 0 r/w 0x0000_0000 17.3.2.3.5/17-52 0xd_0e14 epcr1?error packet capture register 1 r/w 0x0000_0000 17.3.2.3.6/17-53 0xd_0e18 epcr2?error packet capture register 2 r/w 0x0000_0000 17.3.2.3.16/17-58 0xd_0e20 predr?port recoverable error detect register r/w 0x0000_0000 17.3.2.3.23/17-61 0xd_0e28 pertr?port error recovery threshold register r/w 0x00ff_0000 17.3.2.3.24/17-64 0xd_0e2c prtr?port retry threshold register r/w 0x00ff_0000 17.3.2.3.25/17-64 rapidio message unit rapidio outbound message registers 0xd_1000 omr?outbound mode register r/w 0x0000_0000 17.3.3.1.1/17-65 0xd_1004 osr?outbound status register r/w 0x0000_0000 17.3.3.1.2/17-67 0xd_100c odqdpar?outbound descriptor queue dequeue pointer address register r/w 0x0000_0000 17.3.3.1.3/17-68 0xd_1014 osar?outbound source address register r/w 0x0000_0000 17.3.3.1.4/17-69 0xd_1018 odpr?outbound destination port register r/w 0x0000_0000 17.3.3.1.5/17-70 0xd_101c odatr?outbound destination attributes register r/w 0x0006_0000 17.3.3.1.6/17-70 0xd_1020 odcr?outbound double-word count register r/w 0x0000_0000 17.3.3.1.7/17-71 0xd_1028 odqepar?outbound descriptor queue enqueue pointer address register r/w 0x0000_0000 17.3.3.1.8/17-72 rapidio inbound message registers 0xd_1060 imr?inbound mailbox mode register r/w 0x0000_0000 17.3.3.2.1/17-72 0xd_1064 isr?inbound mailbox status register r/w 0x0000_0000 17.3.3.2.2/17-74 0xd_106c ifqdpar?inbound frame queue dequeue pointer address register r/w 0x0000_0000 17.3.3.2.3/17-75 0xd_1074 ifqepar?inbound frame queue enqueue pointer address register r/w 0x0000_0000 17.3.3.2.4/17-76 table 2-9. memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-46 freescale semiconductor memory map rapidio doorbell registers 0xd_1460 dmr?doorbell mode register r/w 0x0000_0000 17.3.3.3.1/17-77 0xd_1464 dsr?doorbell status register r/w 0x0000_0000 17.3.3.3.2/17-78 0xd_146c dqdpar?doorbell queue dequeue pointer address register r/w 0x0000_0000 17.3.3.3.3/17-79 0xd_1474 dqepar?doorbell queue enqueue pointer address register r/w 0x0000_0000 17.3.3.3.4/17-80 rapidio port-write registers 0xd_14e0 pwmr?port-write mode register r/w 0x0000_0000 17.3.3.4.1/17-81 0xd_14e4 pwsr?port-write status register r/w 0x0000_0000 17.3.3.4.2/17-82 0xd_14ec pwqbar?port-write queue base address register r/w 0x0000_0000 17.3.3.4.3/17-83 global utilities registers power-on reset configuration values 0xe_0000 porpllsr?por pll ratio status register r 0x00 nn _00 nn 18.4.1.1/18-4 0xe_0004 porbmsr?por boot mode status register r 0x nnnn _0000 18.4.1.2/18-5 0xe_0008 porimpscr?por i/o impedance status and control register r/w 0x000 n _007f 18.4.1.3/18-6 0xe_000c pordevsr?por i/o device status register r see ref. 18.4.1.4/18-7 0xe_0010 pordbgmsr?por debug mode status register r see ref. 18.4.1.5/18-9 0xe_0020 gpporcr?general-purpose por configuration register rsee ref. 18.4.1.6/18-9 signal multiplexing and gpio controls 0xe_0030 gpiocr?gpio control register r/w 0x0000_0000 18.4.1.7/18-10 0xe_0040 gpoutdr?general-purpose output data register r/w 0x0000_0000 18.4.1.8/18-11 0xe_0050 gpindr?general-purpose input data register r 0x nnnn _0000 18.4.1.9/18-12 0xe_0060 pmuxcr?alternate function signal multiplex control r/w 0x0000_0000 18.4.1.9/18-12 device disables 0xe_0070 devdisr?device disable control r/w 0x0000_0000 18.4.1.11/18-13 power management registers 0xe_0080 powmgtcsr?power management status and control register r/w 0x0000_0000 18.4.1.12/18-15 interrupt reporting 0xe_0090 mcpsumr?machine check summary register read/ clear 0x0000_0000 18.4.1.13/18-16 table 2-9. memory map (continued) offset register access reset section/page
complete ccsr map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-47 version registers 0xe_00a0 pvr?processor version register r e500 processor version 18.4.1.14/18-17 0xe_00a4 svr?system version register r MPC8540 system version 18.4.1.15/18-18 debug control 0xe_0e00 clkocr?clock out select register r/w 0x0000_0000 18.4.1.16/18-18 0xe_0e10 ddrdllcr?ddr dll control register r/w 0x0000_0000 18.4.1.17/18-19 0xe_0e20 lbdllcr?lbc dll control register r/w 0x0000_0000 18.4.1.18/18-20 performance monitor control registers 0xe_1000 pmgc0?performance monitor global control register r/w 0x0000_0000 19.3.2.1/19-5 0xe_1010 pmlca0?performance monitor local control register a0 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1014 pmlcb0?performance monitor local control register b0 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1018 pmc0 (upper)?performance monitor counter 0 upper r/w 0x0000_0000 19.3.3.1/19-9 0xe_101c pmc0 (lower)?performance monitor counter 0 lower r/w 0x0000_0000 19.3.3.1/19-9 0xe_1020 pmlca1?performance monitor local control register a1 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1024 pmlcb1?performance monitor local control register b1 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1028 pmc1?performance monitor counter 1 r/w 0x0000_0000 19.3.3.1/19-9 0xe_1030 pmlca2?performance monitor local control register a2 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1034 pmlcb2?performance monitor local control register b 2 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1038 pmc2?performance monitor counter 2 r/w 0x0000_0000 19.3.3.1/19-9 0xe_1040 pmlca3?performance monitor local control register a3 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1044 pmlcb3?performance monitor local control register b3 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1048 pmc3?performance monitor counter 3 r/w 0x0000_0000 19.3.3.1/19-9 0xe_1050 pmlca4?performance monitor local control register a4 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1054 pmlcb4?performance monitor local control register b4 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1058 pmc4?performance monitor counter 4 r/w 0x0000_0000 19.3.3.1/19-9 0xe_1060 pmlca5?performance monitor local control register a5 r/w 0x0000_0000 19.3.2.2/19-5 table 2-9. memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-48 freescale semiconductor memory map 0xe_1064 pmlcb5?performance monitor local control register b 5 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1068 pmc5?performance monitor counter 5 r/w 0x0000_0000 19.3.3.1/19-9 0xe_1070 pmlca6?performance monitor local control register a6 r/w 0x0000_0000 19.3.3.1/19-9 0xe_1074 pmlcb6?performance monitor local control register b6 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1078 pmc6?performance monitor counter 6 r/w 0x0000_0000 19.3.3.1/19-9 0xe_1080 pmlca7?performance monitor local control register a7 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1084 pmlcb7?performance monitor local control register b7 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1088 pmc7?performance monitor counter 7 r/w 0x0000_0000 19.3.3.1/19-9 0xe_1090 pmlca8?performance monitor local control register a8 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1094 pmlcb8?performance monitor local control register b8 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1098 pmc8?performance monitor counter 8 r/w 0x0000_0000 19.3.3.1/19-9 debug and watchpoint monitor registers watchpoint monitor registers 0xe_2000 wmcr0?watchpoint monitor control register 0 r/w 0x0000_0000 20.3.1.1/20-11 0xe_2004 wmcr1?watchpoint monitor control register 1 r/w 0x0000_0000 20.3.1.1/20-11 0xe_200c wmar?watchpoint monitor address register r/w 0x0000_0000 20.3.1.2/20-13 0xe_2014 wmamr?watchpoint monitor address mask register r/w 0x0000_0000 20.3.1.3/20-14 0xe_2018 wmtmr?watchpoint monitor transaction mask register r/w 0x0000_0000 20.3.1.4/20-14 0xe_201c wmsr?watchpoint monitor status register r/w 0x0000_0000 20.3.1.5/20-16 trace buffer registers 0xe_2040 tbcr0?trace buffer control register r/w 0x0000_0000 20.3.2.1/20-16 0xe_2044 tbcr1?trace buffer control register r/w 0x0000_0000 20.3.2.1/20-16 0xe_204c tbar?trace buffer address register r/w 0x0000_0000 20.3.2.2/20-19 0xe_2054 tbamr?trace buffer address mask register r/w 0x0000_0000 20.3.2.3/20-19 0xe_2058 tbtmr?trace buffer transaction mask register r/w 0x0000_0000 20.3.2.4/20-20 0xe_205c tbsr?trace buffer status register r/w 0x0000_0000 20.3.2.5/20-21 0xe_2060 tbacr?trace buffer access control register r/w 0x0000_0000 20.3.2.6/20-22 0xe_2064 tbadhr?trace buffer access data high register r/w 0x0000_0000 20.3.2.7/20-22 0xe_2068 tbadr?trace buffer access data register r/w 0x0000_0000 20.3.2.8/20-23 table 2-9. memory map (continued) offset register access reset section/page
complete ccsr map MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 2-49 context id registers 0xe_20a0 pcidr?programmed context id register r/w 0x0000_0000 20.3.3.1/20-24 0xe_20a4 ccidr?current context id register r/w 0x0000_0000 20.3.3.2/20-24 other registers 0xe_20b0 tosr?trigger output source register r/w 0x0000_0000 20.3.4.1/20-25 1 port size for br0 is configured from external pins during reset, hence ? nn ? is either 0x08, 0x10, or 0x18. 2 tsec2 has the same memory-mapped registers that are described for tsec1 from 0x 2_4000 to 0x2_4fff except that the offsets are from 0x 2_5000 to 0x2_5fff. table 2-9. memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 2-50 freescale semiconductor memory map
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 3-1 chapter 3 signal descriptions this chapter describes the MPC8540 external signals. it is organized into the following sections:  overview of signals and cross-references for signals that serve multiple functions, including two lists: one by functional block and one alphabetical  list of reset configuration signals  list of output signal states at reset note a bar over a signal name indicates that the signal is active low, such as irq_out (interrupt out). active-low signals are referred to as asserted (active) when they are low and negated when they are high. signals that are not active low, such as irq (interrupt input), are referred to as asserted when they are high and negated when they are low. internal signals throughout this document are shown as lower case and in italics. for example, sys_logic_clk is an internal signal. these are referenced only as necessary for understanding of the external functionality of the device. 3.1 signals overview the MPC8540 signals are grouped as follows:  ddr memory interface signals  rapidio interface signals  pci/pci-x interface signals  ethernet management interface signals  tsec1 interface signals  tsec2 interface signals  fec10/100 interface signals  local bus interface signals  dma interface signals  pic interface signals
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 3-2 freescale semiconductor signal descriptions  duart interface signals i 2 c interface signals  system control, power management, and debug signals  test, jtag, and configuration signals  clock signals figure 3-1 illustrates the external signals of the MPC8540, showing how the signals are grouped. refer to the MPC8540 integrated processor hardware specifications for a pinout diagram showing pin numbers and a listing of all the electrical and mechanical specifications. note that individual chapters of this document provide details for each signal, describing each signal?s behavior when the signal is asserted or negated and when the signal is an input or an output.
signals overview MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 3-3 figure 3-1. MPC8540 signal groupings MPC8540 1 mdq[0:63] mecc[0:7] mdm[0:7] mdqs[0:7] mdm[8] mdqs[8] mba[0:1] ma[0:14] 64 8 8 1 8 1 2 15 mwe mras mcas mcs [0:3] 1 1 1 4 mcke[0:1] 2 rio_rclk, rio_rclk rio_rd[0:7], rio_rd [0:7] 2 16 rio_rframe, rio_rframe rio_tclk, rio_tclk 2 2 rio_td[0:7], rio_td [0:7] rio_tframe, rio_tframe 16 2 pci_req 0 pci_req [4:1] pci_gnt 0 pci_gnt [4:1] ec_mdc ec_mdio 1 4 1 4 1 1 tsec1_tx_en tsec1_tx_er tsec1_tx_clk 8 1 1 1 tsec1_gtx_clk tsec1_crs 1 1 tsec1_col tsec1_rxd[7:0] 1 8 tsec1_rx_dv tsec1_rx_er 1 1 tsec1_rx_clk 1 32 4 1 4 4 4 4 1 local bus interface 1 1 1 1 1 1 1 1 9 3 1 1 1 power management 1 1 1 1 1 1 1 5 1 1 1 1 67 signals 1 signal pci_ad[63:0] 64 pci_c/be [7:0] pci_par, pci_par64 pci_frame pci_trdy 8 2 1 1 pci_irdy pci_stop 1 1 pci_devsel pci_idsel 1 1 pci_req64 pci_ack64 1 1 pci_perr pci_serr 1 1 te s t 6 signals 8 1 1 1 1 1 1 8 1 1 1 lwe [0:3]/lsddqm[0:3]/lbs [0:3] lbctl lale lgpl0/lsda10 lgpl1/lsdwe lgpl2/loe /lsdras lgpl3/lsdcas lgpl4/lgta /lupwait/lpbse lgpl5 lad[0:31] ldp[0:3] la27 la[28:31] lcs [0:3] lcs [4:7] asleep lssd_mode l1_tstclk l2_tstclk mcp ude irq[0:8] irq[9:11] irq_out iic_sda iic_scl hreset hreset_req sreset ckstp_in ckstp_out trig_in trig_out msrcid[0:4] mdval tsec1_txd[7:0] ec_gtx_clk125 1 1 pic interface 15 signals system control 6 signals debug 8 signals pci/pci-x interface 94 signals dma_dreq [0:1],dma_dreq [2:3] dma_dack [0:1],dma_dack [2:3] dma_ddone [0:1],dma_ddone [2:3] 4 4 4 i 2 c interface 2 signals ethernet interface 3 signals tsec1 ethernet interface 25 signals dma interface 12 signals tsec2 ethernet interface 25 signals tsec2_tx_en tsec2_tx_er tsec2_tx_clk tsec2_gtx_clk tsec2_crs tsec2_col tsec2_rxd[7:0] tsec2_rx_dv tsec2_rx_er tsec2_rx_clk tsec2_txd[7:0] rapidio interface 42 signals memory interface 1 30 signals mck[0:5], mck [0:5] 12 msync_in, msync_out 2 rio_tx_clk_in, rio_tx_clk_in 2 1 lcke 3 lclk[0:2] 2 lsync_in, lsync_out clock 1 1 3 signals sysclk rtc 1 test_sel 1 1 jtag 5 signals 1 1 1 tck tdi tdo tms trst 2 2 2 uart_sin[0:1] uart_sout[0:1] uart_cts [0:1] uart_rts [0:1] 2 dual uart interface 8 signals 4 1 1 1 1 1 4 1 1 1 10/100 ethernet interface 16 signals fec_tx_en fec_tx_er fec_tx_clk fec_crs fec_col fec_rxd[3:0] fec_rx_dv fec_rx_er fec_rx_clk fec_txd[3:0] 1 clk_out 1 ready 2 therm[0:1]
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 3-4 freescale semiconductor signal descriptions the following tables provide summaries of signal functions. table 3-1 provides a summary of the signals grouped by function, and table 3-2 provides the summary list of the signals grouped alphabetically. these tables detail the signal name, interface, alternate functions, number of signals, and whether the signal is an input, output, or bidirectional. the direction of the multiplexed signals applies for the primary signal function listed in the left-most column of the table for that row (and does not apply for the state of the reset configuration signals). finally, the table provides a pointer to the table where the signal function is described. table 3-1. MPC8540 signal reference by functional block name description functional block alternate function(s) no. of signals i/o table/ page mdq[0:63] ddr data ddr memory ? 64 i/o 9-3/9-5 mecc[0:7] ddr error correcting code ddr memory ? 8 i/o 9-3/9-5 mdm[0:7] ddr data mask ddr memory ? 8 o 9-3/9-5 mdm8 ddr ecc data mask ddr memory ? 1 o 9-3/9-5 mdqs[0:7] ddr data strobe ddr memory ? 8 i/o 9-3/9-5 mdqs8 ddr ecc data strobe ddr memory ? 1 i/o 9-3/9-5 mba[0:1] ddr bank select ddr memory ? 2 o 9-3/9-5 ma[0:14] ddr address ddr memory ? 15 o 9-3/9-5 mwe ddr write enable ddr memory ? 1 o 9-3/9-5 mras ddr row address strobe ddr memory ? 1 o 9-3/9-5 mcas ddr column address strobe ddr memory ? 1 o 9-3/9-5 mcs [0:3] ddr chip select (2/dimm) ddr memory ? 4 o 9-3/9-5 mcke[0:1] ddr clock enable ddr memory ? 2 o 9-4/9-8 mck[0:5], mck [0:5] ddr differential clocks (3 pairs/dimm) ddr memory ? 12 o 9-4/9-8 msync_in, msync_out ddr dll synchronization in/out ddr memory ? 2 i/o 9-4/9-8 rio_rclk, rio_rclk rapidio receive clocks rapidio ? 2 i 17-5/17-8 rio_rd[0:7], rio_rd[ 0:7] rapidio receive data rapidio ? 16 i 17-5/17-8 rio_rframe, rio_rframe rapidio receive frame rapidio ? 2 i 17-5/17-8 rio_tclk, rio_tclk rapidio transmit clock rapidio ? 2 o 17-5/17-8
signals overview MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 3-5 rio_td[0:7], rio_td [0:7] rapidio transmit data rapidio ? 16 o 17-5/17-8 rio_tframe, rio_tframe rapidio transmit frame rapidio ? 2 o 17-5/17-8 rio_tx_clk_in rio_tx_clk_in rapidio transmit clock in rapidio ? 2 i 17-5/17-8 pci_ad[63:0] pci address/data pci/x ? 64 i/o 16-2/16-8 pci_c/be [7:0] pci command/byte enable pci/x ? 8 i/o 16-2/16-8 pci_par pci parity pci/x ? 1 i/o 16-2/16-8 pci_par64 pci parity 64 pci/x ? 1 i/o 16-2/16-8 pci_frame pci frame pci/x ? 1 i/o 16-2/16-8 pci_trdy pci target ready pci/x ? 1 i/o 16-2/16-8 pci_irdy pci initiator ready pci/x ? 1 i/o 16-2/16-8 pci_stop pci stop pci/x ? 1 i/o 16-2/16-8 pci_devsel pci device select pci/x ? 1 i/o 16-2/16-8 pci_idsel pci initial device select pci/x ? 1 i 16-2/16-8 pci_req64 pci request 64 pci/x cfg_pci_width 1 i/o 16-2/16-8 pci_ack64 pci acknowledge 64 pci/x ? 1 i/o 16-2/16-8 pci_perr pci parity error pci/x ? 1 i/o 16-2/16-8 pci_serr pci system error pci/x ? 1 i/o 16-2/16-8 pci_req0 pci request 0 pci/x ? 1 i/o 16-2/16-8 pci_req [4:1] pci request 4?1 pci/x ? 4 i 16-2/16-8 pci_gnt0 pci grant 0 pci/x ? 1 i/o 16-2/16-8 pci_gnt [4:1] pci grant 4?1 pci/x cfg_pci_mode cfg_pci_debug cfg_pci_arbiter cfg_pci_impd 4o 16-2/16-8 ec_gtx_clk125 gigabit reference clock gigabit clock ? 1 i 14-3/14-14 ec_mdc ethernet management data clock ethernet management cfg_tsec_reduce 1 o 14-3/14-14 ec_mdio ethernet management data in/out ethernet management ?1i/o 14-3/14-14 tsec1_txd7 tsec1 transmit data 7 tsec1 cfg_tsec1 1 o 14-3/14-14 tsec1_txd[6:4] tsec1 transmit data 6?4 tsec1 cfg_rom_loc[0:2] 3 o 14-3/14-14 table 3-1. MPC8540 signal reference by functional block (continued) name description functional block alternate function(s) no. of signals i/o table/ page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 3-6 freescale semiconductor signal descriptions tsec1_txd3 tsec1 transmit data 3 tsec1 ? 1 o 14-3/14-14 tsec1_txd2 tsec1 transmit data 2 tsec1 ? 1 o 14-3/14-14 tsec1_txd1 tsec1 transmit data 1 tsec1 ? 1 o 14-3/14-14 tsec1_txd0 tsec1 transmit data 0 tsec1 ? 1 o 14-3/14-14 tsec1_tx_en tsec1 transmit enable tsec1 ? 1 o 14-3/14-14 tsec1_tx_er tsec1 transmit error tsec1 ? 1 o 14-3/14-14 tsec1_tx_clk tsec1 transmit clock in tsec1 ? 1 i 14-3/14-14 tsec1_gtx_clk tsec1 transmit clock out tsec1 ? 1o 14-3/14-14 tsec1_crs tsec1 carrier sense tsec1 ? 1 i 14-3/14-14 tsec1_col tsec1 collision detect tsec1 ? 1 i 14-3/14-14 tsec1_rxd[7:0] tsec1 receive data tsec1 ? 8 i 14-3/14-14 tsec1_rx_dv tsec1 receive data valid tsec1 ? 1 i 14-3/14-14 tsec1_rx_er tsec1 receiver error tsec1 ? 1 i 14-3/14-14 tsec1_rx_clk tsec1 receive clock tsec1 ? 1 i 14-3/14-14 tsec2_txd7 tsec2 transmit data 7 tsec2 cfg_tsec2 1 o 14-3/14-14 tsec2_txd[6:5] tsec2 transmit data 6?5 tsec2 cfg_lb_hold[0:1] 2 o 14-3/14-14 tsec2_txd[4:2] tsec2 transmit data 4?2 tsec2 cfg_dev_id[7:5] 3 o 14-3/14-14 tsec2_txd1 tsec2 transmit data 1 tsec2 ? 1 o 14-3/14-14 tsec2_txd0 tsec2 transmit data 0 tsec2 ? 1 o 14-3/14-14 tsec2_tx_en tsec2 transmit enable tsec2 ? 1 o 14-3/14-14 tsec2_tx_er tsec2 transmit error tsec2 ? 1 o 14-3/14-14 tsec2_tx_clk tsec2 transmit clock in tsec2 ? 1 i 14-3/14-14 tsec2_gtx_clk tsec2 transmit clock out tsec2 ? 1 o 14-3/14-14 tsec2_crs tsec2 carrier sense tsec2 ? 1 i 14-3/14-14 tsec2_col tsec2 collision detect tsec2 ? 1 i 14-3/14-14 tsec2_rxd[0:7] tsec2 receive data tsec2 ? 8 i 14-3/14-14 tsec2_rx_dv tsec2 receive data valid tsec2 ? 1 i 14-3/14-14 tsec2_rx_er tsec2 receiver error tsec2 ? 1 i 14-3/14-14 tsec2_rx_clk tsec2 receive clock tsec2 ? 1 i 14-3/14-14 fec_txd[0:3] fec transmit data 10/100 ? 4 o 21-1/21-8 fec_tx_en fec transmit enable 10/100 ? 1 o 21-1/21-8 fec_tx_er fec transmit error 10/100 ? 1 o 21-1/21-8 table 3-1. MPC8540 signal reference by functional block (continued) name description functional block alternate function(s) no. of signals i/o table/ page
signals overview MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 3-7 fec_tx_clk fec transmit clock in 10/100 ? 1 i 21-1/21-8 fec_crs fec carrier sense 10/100 ? 1 i 21-1/21-8 fec_col fec collision detect 10/100 ? 1 i 21-1/21-8 fec_rxd[0:3] fec receive data 10/100 ? 4 i 21-1/21-8 fec_rx_dv fec receive data valid 10/100 ? 1 i 21-1/21-8 fec_rx_er fec receiver error 10/100 ? 1 i 21-1/21-8 fec_rx_clk fec receive clock 10/100 ? 1 i 21-1/21-8 lad[0:31] lbc address/data lbc cfg_gpporcr 32 i/o 13-1/13-5 ldp[0:3] lbc data parity lbc ? 4 i/o 13-1/13-5 la27 lbc burst address lbc cfg_cpu_boot 1 o 13-1/13-5 la[28:31] lbc port address lbc cfg_sys_pll0 cfg_sys_pll1 cfg_sys_pll2 cfg_sys_pll3 4o 13-1/13-5 lcs [0:4] lbc chip select 0?4 lbc ? 5 o 13-1/13-5 lcs5 lbc chip select 5 lbc dma_dreq2 1o 13-1/13-5 lcs6 lbc chip select 6 lbc dma_dack2 1o 13-1/13-5 lcs7 lbc chip select 7 lbc dma_ddone2 1o 13-1/13-5 lwe [0:1]/ lsddqm[0:1]/ lbs [0:1] lbc write enable/byte lane data mask/byte select 0?1 lbc cfg_pci_hold[0:1] 2 o 13-1/13-5 lwe [2:3]/ lsddqm[2:3]/ lbs [2:3] lbc write enable/byte lane data mask/byte select 2?3 lbc cfg_host_agt0 cfg_host_agt1 2o 13-1/13-5 lbctl lbc data buffer control lbc ? 1 o 13-1/13-5 lale lbc address latch enable lbc cfg_core_pll0 1 o 13-1/13-5 lgpl0/lsda10 lbc upm general purpose line 0/sdram address bit 10 lbc cfg_rio_clk0 1 o 13-1/13-5 lgpl1/lsdwe lbc gp line 1/sdram write enable lbc cfg_rio_clk1 1 o 13-1/13-5 lgpl2/loe / lsdras lbc gp line 2/output enable/sdram ras lbc cfg_core_pll1 1 o 13-1/13-5 lgpl3/lsdcas lbc gp line 3/sdram cas lbc cfg_boot_seq0 1 o 13-1/13-5 table 3-1. MPC8540 signal reference by functional block (continued) name description functional block alternate function(s) no. of signals i/o table/ page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 3-8 freescale semiconductor signal descriptions lgpl4/lgta / lupwait/lpbse lbc gp line 4/gpcm terminate access/upm wait/parity byte select lbc ? 1 i/o 13-1/13-5 lgpl5 lbc gp line 5 address lbc cfg_boot_seq1 1 o 13-1/13-5 lcke lbc clock enable lbc ? 1 o 13-1/13-5 lclk[0:2] lbc clock lbc ? 3 o 13-1/13-5 lsync_in, lsync_out lbc dll synchronization lbc ? 2 i/o 13-1/13-5 dma_dreq [0:1] dma request 0?1 dma ? 2 i 15-3/15-6 dma_dreq2 dma request 2 dma lcs 5 1i 15-3/15-6 dma_dreq3 dma request 3 dma irq9 1 i 15-3/15-6 dma_dack [0:1] dma acknowledge 0?1 dma ? 2 o 15-3/15-6 dma_dack2 dma acknowledge 2 dma lcs 6 1o 15-3/15-6 dma_dack3 dma acknowledge 3 dma irq10 1 o 15-3/15-6 dma_ddone [0:1] dma done 0?1 dma ? 2 o 15-3/15-6 dma_ddone2 dma done 2 dma lcs 7 1o 15-3/15-6 dma_ddone3 dma done 3 dma irq11 1 o 15-3/15-6 mcp machine check processor pic ? 1 i 10-6/10-8 ude unconditional debug event pic ? 1 i 10-6/10-8 irq[0:8] external interrupt 0?8 pic ? 9 i 10-6/10-8 irq9 external interrupt 9 pic dma_dreq3 1i 10-6/10-8 irq10 external interrupt 10 pic dma_dack3 1i 10-6/10-8 irq11 external interrupt 11 pic dma_ddone3 1i 10-6/10-8 irq_out interrupt output pic ? 1 o 10-6/10-8 uart_sin[0:1] duart serial data in dual uart ? 2 i 12-2/12-4 uart_sout[0:1] duart serial data out dual uart ? 2 o 12-2/12-4 uart_cts [0:1] duart clear to send dual uart ? 2 i 12-2/12-4 uart_rts [0:1] duart ready to send dual uart ? 2 o 12-2/12-4 iic_sda i 2 c serial data i 2 c?1i/o 11-2/11-4 iic_scl i 2 c serial clock i 2 c?1i/o 11-2/11-4 hreset hard reset system control ? 1 i 4-2/4-2 hreset_req hard reset request system control ? 1 o 4-2/4-2 table 3-1. MPC8540 signal reference by functional block (continued) name description functional block alternate function(s) no. of signals i/o table/ page
signals overview MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 3-9 sreset soft reset system control ? 1 i 4-2/4-2 ckstp_in checkstop in system control ? 1 i 18.2/18-1 ckstp_out checkstop out system control ? 1 o 18.2/18-1 ready device ready system control trig_out 1 o 4-2/4-2 trig_in watchpoint trigger in debug ? 1 i 20-2/20-6 trig_out watchpoint trigger out debug ready 1 o 20-2/20-6 msrcid[0:1] memory debug source port id 0?1 debug cfg_mem_debug cfg_ddr_debug 2o 9-6/9-10 msrcid[2:4] memory debug source port id 2?4 debug ? 3 o 20-2/20-6 mdval memory debug data valid debug ? 1 o 20-2/20-6 asleep asleep power mgmt ? 1 o 18.2/18-1 sysclk system clock/pci clock clock ? 1 i 4-3/4-3 rtc real time clock clock ? 1 i 4-3/4-3 clk_out clock out clock ? 1 o 18.2/18-1 lssd_mode lssd mode test ? 1 i 20-2/20-6 l1_tstclk l1 test clock test ? 1 i 20-2/20-6 l2_tstclk l2 test clock test ? 1 i 20-2/20-6 test_sel test select test ? 1 i 20-2/20-6 therm[0:1] thermal resistor access test ? 2 i 20-2/20-6 tck test clock jtag ? 1 i 20-2/20-6 tdi test data in jtag ? 1 i 20-2/20-6 tdo test data out jtag ? 1 o 20-2/20-6 tms test mode select jtag ? 1 i 20-2/20-6 trst te s t r e se t j ta g ? 1 i 20-2/20-6 table 3-2. MPC8540 alphabetical signal reference name description functional block alternate function(s) no. of signals i/o table/ page asleep asleep power mgmt ? 1 o 18.2/18-1 ckstp_in checkstop in system control ? 1 i 18.2/18-1 ckstp_out checkstop out system control ? 1 o 18.2/18-1 clk_out clock out clock ? 1 o 18.2/18-1 table 3-1. MPC8540 signal reference by functional block (continued) name description functional block alternate function(s) no. of signals i/o table/ page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 3-10 freescale semiconductor signal descriptions dma_dack2 dma acknowledge 2 dma lcs 6 1o 15-3/15-6 dma_dack3 dma acknowledge 3 dma irq10 1 o 15-3/15-6 dma_dack [0:1] dma acknowledge 0?1 dma ? 2 o 15-3/15-6 dma_ddone2 dma done 2 dma lcs 7 1o 15-3/15-6 dma_ddone3 dma done 3 dma irq11 1 o 15-3/15-6 dma_ddone [0:1] dma done 0?1 dma ? 2 o 15-3/15-6 dma_dreq2 dma request 2 dma lcs 5 1i 15-3/15-6 dma_dreq3 dma request 3 dma irq9 1 i 15-3/15-6 dma_dreq [0:1] dma request 0?1 dma ? 2 i 15-3/15-6 ec_gtx_clk125 gigabit reference clock gigabit clock ? 1 i 14-3/14-14 ec_mdc ethernet management data clock ethernet management cfg_tsec_reduce 1 o 14-3/14-14 ec_mdio ethernet management data in/out ethernet management ?1i/o 14-3/14-14 fec_col fec collision detect 10/100 ? 1 i 21-1/21-8 fec_crs fec carrier sense 10/100 ? 1 i 21-1/21-8 fec_rxd[0:3] fec receive data 10/100 ? 4 i 21-1/21-8 fec_rx_clk fec receive clock 10/100 ? 1 i 21-1/21-8 fec_rx_dv fec receive data valid 10/100 ? 1 i 21-1/21-8 fec_rx_er fec receiver error 10/100 ? 1 i 21-1/21-8 fec_txd[0:3] fec transmit data 10/100 ? 4 o 21-1/21-8 fec_tx_clk fec transmit clock in 10/100 ? 1 i 21-1/21-8 fec_tx_en fec transmit enable 10/100 ? 1 o 21-1/21-8 fec_tx_er fec transmit error 10/100 ? 1 o 21-1/21-8 hreset hard reset system control ? 1 i 4-2/4-2 hreset_req hard reset request system control ? 1 o 4-2/4-2 iic_scl i 2 c serial clock i 2 c?1i/o 11-2/11-4 iic_sda i 2 c serial data i 2 c?1i/o 11-2/11-4 irq[0:8] external interrupt 0?8 pic ? 9 i 10-6/10-8 irq10 external interrupt 10 pic dma_dack3 1i 10-6/10-8 irq11 external interrupt 11 pic dma_ddone3 1i 10-6/10-8 irq9 external interrupt 9 pic dma_dreq3 1i 10-6/10-8 table 3-2. MPC8540 alphabetical signal reference (continued) name description functional block alternate function(s) no. of signals i/o table/ page
signals overview MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 3-11 irq_out interrupt output pic ? 1 o 10-6/10-8 l1_tstclk l1 test clock test ? 1 i 20-2/20-6 l2_tstclk l2 test clock test ? 1 i 20-2/20-6 la27 lbc burst address lbc cfg_cpu_boot 1 o 13-1/13-5 lad[0:31] lbc address/data lbc cfg_gpporcr 32 i/o 13-1/13-5 lale lbc address latch enable lbc cfg_core_pll0 1 o 13-1/13-5 la[28:31] lbc port address lbc cfg_sys_pll0 cfg_sys_pll1 cfg_sys_pll2 cfg_sys_pll3 4o 13-1/13-5 lbctl lbc data buffer control lbc ? 1 o 13-1/13-5 lcke lbc clock enable lbc ? 1 o 13-1/13-5 lclk[0:2] lbc clock lbc ? 3 o 13-1/13-5 lcs5 lbc chip select 5 lbc dma_dreq2 1o 13-1/13-5 lcs6 lbc chip select 6 lbc dma_dack2 1o 13-1/13-5 lcs7 lbc chip select 7 lbc dma_ddone2 1o 13-1/13-5 lcs [0:4] lbc chip select 0?4 lbc ? 5 o 13-1/13-5 ldp[0:3] lbc data parity lbc ? 4 i/o 13-1/13-5 lgpl0/lsda10 lbc upm general purpose line 0/sdram address bit 10 lbc cfg_rio_clk0 1 o 13-1/13-5 lgpl1/lsdwe lbc gp line 1/sdram write enable lbc cfg_rio_clk1 1 o 13-1/13-5 lgpl2/loe / lsdras lbc gp line 2/output enable/sdram ras lbc cfg_core_pll1 1 o 13-1/13-5 lgpl3/lsdcas lbc gp line 3/sdram cas lbc cfg_boot_seq0 1 o 13-1/13-5 lgpl4/lgta / lupwait/lpbse lbc gp line 4/gpcm terminate access/upm wait/parity byte select lbc ? 1 i/o 13-1/13-5 lgpl5 lbc gp line 5 address lbc cfg_boot_seq1 1 o 13-1/13-5 lssd_mode lssd mode test ? 1 i 20-2/20-6 lsync_in, lsync_out lbc dll synchronization lbc ? 2 i/o 13-1/13-5 lwe [0:1]/ lsddqm[0:1]/ lbs [0:1] lbc write enable/byte lane data mask/byte select 0?1 lbc cfg_pci_hold[0:1] 2 o 13-1/13-5 table 3-2. MPC8540 alphabetical signal reference (continued) name description functional block alternate function(s) no. of signals i/o table/ page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 3-12 freescale semiconductor signal descriptions lwe [2:3]/ lsddqm[2:3]/ lbs [2:3] lbc write enable/byte lane data mask/byte select 2?3 lbc cfg_host_agt0 cfg_host_agt1 2o 13-1/13-5 ma[0:14] ddr address ddr memory ? 15 o 9-3/9-5 mba[0:1] ddr bank select ddr memory ? 2 o 9-3/9-5 mcas ddr column address strobe ddr memory ? 1 o 9-3/9-5 mcke[0:1] ddr clock enable ddr memory ? 2 o 9-4/9-8 mck[0:5], mck [0:5] ddr differential clocks (3 pairs/dimm) ddr memory ? 12 o 9-4/9-8 mcp machine check processor pic ? 1 i 10-6/10-8 mcs [0:3] ddr chip select (2/dimm) ddr memory ? 4 o 9-3/9-5 mdm8 ddr ecc data mask ddr memory ? 1 o 9-3/9-5 mdm[0:7] ddr data mask ddr memory ? 8 o 9-3/9-5 mdqs8 ddr ecc data strobe ddr memory ? 1 i/o 9-3/9-5 mdqs[0:7] ddr data strobe ddr memory ? 8 i/o 9-3/9-5 mdq[0:63] ddr data ddr memory ? 64 i/o 9-3/9-5 mdval memory debug data valid debug ? 1 o 20-2/20-6 mecc[0:7] ddr error correcting code ddr memory ? 8 i/o 9-3/9-5 mras ddr row address strobe ddr memory ? 1 o 9-3/9-5 msrcid[0:1] memory debug source port id 0?1 debug cfg_mem_debug cfg_ddr_debug 2o 9-6/9-10 msrcid[2:4] memory debug source port id 2?4 debug ? 3 o 20-2/20-6 msync_in, msync_out ddr dll synchronization in/out ddr memory ? 2 i/o 9-4/9-8 mwe ddr write enable ddr memory ? 1 o 9-3/9-5 pci_ack64 pci acknowledge 64 pci/x ? 1 i/o 16-2/16-8 pci_ad[63:0] pci address/data pci/x ? 64 i/o 16-2/16-8 pci_c/be [7:0] pci command/byte enable pci/x ? 8 i/o 16-2/16-8 pci_devsel pci device select pci/x ? 1 i/o 16-2/16-8 pci_frame pci frame pci/x ? 1 i/o 16-2/16-8 pci_gnt0 pci grant 0 pci/x ? 1 i/o 16-2/16-8 table 3-2. MPC8540 alphabetical signal reference (continued) name description functional block alternate function(s) no. of signals i/o table/ page
signals overview MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 3-13 pci_gnt [4:1] pci grant 4?1 pci/x cfg_pci_mode cfg_pci_debug cfg_pci_arbiter cfg_pci_impd 4o 16-2/16-8 pci_idsel pci initial device select pci/x ? 1 i 16-2/16-8 pci_irdy pci initiator ready pci/x ? 1 i/o 16-2/16-8 pci_par pci parity pci/x ? 1 i/o 16-2/16-8 pci_par64 pci parity 64 pci/x ? 1 i/o 16-2/16-8 pci_perr pci parity error pci/x ? 1 i/o 16-2/16-8 pci_req0 pci request 0 pci/x ? 1 i/o 16-2/16-8 pci_req64 pci request 64 pci/x cfg_pci_width 1 i/o 16-2/16-8 pci_req [4:1] pci request 4?1 pci/x ? 4 i 16-2/16-8 pci_serr pci system error pci/x ? 1 i/o 16-2/16-8 pci_stop pci stop pci/x ? 1 i/o 16-2/16-8 pci_trdy pci target ready pci/x ? 1 i/o 16-2/16-8 ready device ready system control trig_out 1 o 4-2/4-2 rio_rclk, rio_rclk rapidio receive clocks rapidio ? 2 i 17-5/17-8 rio_rd[0:7], rio_rd[ 0:7] rapidio receive data rapidio ? 16 i 17-5/17-8 rio_rframe, rio_rframe rapidio receive frame rapidio ? 2 i 17-5/17-8 rio_tclk, rio_tclk rapidio transmit clock rapidio ? 2 o 17-5/17-8 rio_td[0:7], rio_td [0:7] rapidio transmit data rapidio ? 16 o 17-5/17-8 rio_tframe, rio_tframe rapidio transmit frame rapidio ? 2 o 17-5/17-8 rio_tx_clk_in rio_tx_clk_in rapidio transmit clock in rapidio ? 2 i 17-5/17-8 rtc real time clock clock ? 1 i 4-3/4-3 sreset soft reset system control ? 1 i 4-2/4-2 sysclk system clock/pci clock clock ? 1 i 4-3/4-3 tck test clock jtag ? 1 i 20-2/20-6 tdi test data in jtag ? 1 i 20-2/20-6 tdo test data out jtag ? 1 o 20-2/20-6 table 3-2. MPC8540 alphabetical signal reference (continued) name description functional block alternate function(s) no. of signals i/o table/ page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 3-14 freescale semiconductor signal descriptions test_sel test select test ? 1 i 20-2/20-6 therm[0:1] thermal resistor access test ? 2 i 20-2/20-6 tms test mode select jtag ? 1 i 20-2/20-6 trig_in watchpoint trigger in debug ? 1 i 20-2/20-6 trig_out watchpoint trigger out debug ready 1 o 20-2/20-6 trst te s t r e se t j ta g ? 1 i 20-2/20-6 tsec1_col tsec1 collision detect tsec1 ? 1 i 14-3/14-14 tsec1_crs tsec1 carrier sense tsec1 ? 1 i 14-3/14-14 tsec1_gtx_clk tsec1 transmit clock out tsec1 ? 1 o 14-3/14-14 tsec1_rxd[7:0] tsec1 receive data tsec1 ? 8 i 14-3/14-14 tsec1_rx_clk tsec1 receive clock tsec1 ? 1 i 14-3/14-14 tsec1_rx_dv tsec1 receive data valid tsec1 ? 1 i 14-3/14-14 tsec1_rx_er tsec1 receiver error tsec1 ? 1 i 14-3/14-14 tsec1_txd0 tsec1 transmit data 0 tsec1 ? 1 o 14-3/14-14 tsec1_txd1 tsec1 transmit data 1 tsec1 ? 1 o 14-3/14-14 tsec1_txd2 tsec1 transmit data 2 tsec1 ? 1 o 14-3/14-14 tsec1_txd3 tsec1 transmit data 3 tsec1 ? 1 o 14-3/14-14 tsec1_txd[6:4] tsec1 transmit data 6?4 tsec1 cfg_rom_loc[0:2] 3 o 14-3/14-14 tsec1_txd7 tsec1 transmit data 7 tsec1 cfg_tsec1 1 o 14-3/14-14 tsec1_tx_clk tsec1 transmit clock in tsec1 ? 1 i 14-3/14-14 tsec1_tx_en tsec1 transmit enable tsec1 ? 1 o 14-3/14-14 tsec1_tx_er tsec1 transmit error tsec1 ? 1 o 14-3/14-14 tsec2_col tsec2 collision detect tsec2 ? 1 i 14-3/14-14 tsec2_crs tsec2 carrier sense tsec2 ? 1 i 14-3/14-14 tsec2_gtx_clk tsec2 transmit clock out tsec2 ? 1 o 14-3/14-14 tsec2_rxd[0:7] tsec2 receive data tsec2 ? 8 i 14-3/14-14 tsec2_rx_clk tsec2 receive clock tsec2 ? 1 i 14-3/14-14 tsec2_rx_dv tsec2 receive data valid tsec2 ? 1 i 14-3/14-14 tsec2_rx_er tsec2 receiver error tsec2 ? 1 i 14-3/14-14 tsec2_txd0 tsec2 transmit data 0 tsec2 ? 1 o 14-3/14-14 tsec2_txd1 tsec2 transmit data 1 tsec2 ? 1 o 14-3/14-14 tsec2_txd[4:2] tsec2 transmit data 4?2 tsec2 cfg_dev_id[7:5] 3 o 14-3/14-14 table 3-2. MPC8540 alphabetical signal reference (continued) name description functional block alternate function(s) no. of signals i/o table/ page
configuration signals sampled at reset MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 3-15 3.2 configuration signals sampled at reset the signals that serve alternate functions as configuration input signals during system reset are summarized in table 3-3 . the detailed interpretation of their voltage levels during reset is described in chapter 4, ?reset, clocking, and initialization.? note that throughout this document, the reset configuration signals are described as being sampled at the negation of hreset . however, there is a setup and hold time for these signals relative to the rising edge of hreset , as described in the MPC8540 integrated processor hardware specifications . note that the pll configuration signals have different setup and hold time requirements than the other reset configuration signals. the reset configuration signals are multiplexed with other functional signals. the values on these signals during reset are interpreted to be logic one or zero, regardless of whether the functional signal name is defined as active-low. most of the reset configuration signals have internal pull-up resistors so that if the signals are not driven, the default value is high (a one), as shown in the table. some signals do not have pull-up resistors and must be driven high or low during the reset period. for details about all the signals that require external pull-up resistors, see the MPC8540 integrated processor hardware specifications . note that the multiplexing of various signals on the MPC8540 is controlled by the pmuxcr register described in chapter 18, ?global utilities.? tsec2_txd[6:5] tsec2 transmit data 6?5 tsec2 cfg_lb_hold[0:1] 2 o 14-3/14-14 tsec2_txd7 tsec2 transmit data 7 tsec2 cfg_tsec2 1 o 14-3/14-14 tsec2_tx_clk tsec2 transmit clock in tsec2 ? 1 i 14-3/14-14 tsec2_tx_en tsec2 transmit enable tsec2 ? 1 o 14-3/14-14 tsec2_tx_er tsec2 transmit error tsec2 ? 1 o 14-3/14-14 uart_cts [0:1] duart clear to send dual uart ? 2 i 12-2/12-4 uart_rts [0:1] duart ready to send dual uart ? 2 o 12-2/12-4 uart_sin[0:1] duart serial data in dual uart ? 2 i 12-2/12-4 uart_sout[0:1] duart serial data out dual uart ? 2 o 12-2/12-4 ude unconditional debug event pic ? 1 i 10-6/10-8 table 3-2. MPC8540 alphabetical signal reference (continued) name description functional block alternate function(s) no. of signals i/o table/ page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 3-16 freescale semiconductor signal descriptions 3.3 output signal states during reset when a system reset is recognized (hreset is asserted), the MPC8540 aborts all current internal and external transactions and releases all bidirectional i/o signals to a high-impedance state. see chapter 4, ?reset, clocking, and initialization,? for a complete description of the reset functionality. table 3-3. MPC8540 reset configuration signals functional interface functional signal name reset configuration name default pci pci_req64 cfg_pci_width 1 pci_gnt 4 cfg_pci_mode 1 pci_gnt 3 cfg_pci_debug 1 pci_gnt 2 cfg_pci_arbiter 1 pci_gnt 1 cfg_pci_impd 1 ethernet management ec_mdc cfg_tsec_reduce 1 tsec1 tsec1_txd7 cfg_tsec1 1 tsec1_txd[6:4] cfg_rom_loc[0:2] 111 tsec2 tsec2_txd7 cfg_tsec2 1 tsec2_txd[6:5] cfg_lb_hold[0:1] 11 tsec2_txd[4:2] cfg_dev_id[7:5] 111 lbc la27 cfg_cpu_boot 1 la[28:31] cfg_sys_pll[0:3] must be driven lwe [0:1]/lbs [0:1] cfg_pci_hold[0:1] 11 lwe [2:3]/lbs [2:3] cfg_host_agt0 cfg_host_agt1 11 lale cfg_core_pll0 must be driven lgpl0/lsda10 cfg_rio_clk0 1 lgpl1/lsdwe cfg_rio_clk1 1 lgpl2/loe /lsdras cfg_core_pll1 must be driven lgpl3/lsdcas cfg_boot_seq0 1 lgpl5/lsdamux cfg_boot_seq1 1 lad[0:31] cfg_gpporcr indeterminate if not driven (no default) debug msrcid0 cfg_mem_debug 1 msrcid1 cfg_ddr_debug 1
output signal states during reset MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 3-17 during reset, the MPC8540 ignores most input signals (except for the reset configuration signals) and drives most of the output-only signals to an inactive state. table 3-4 shows the states of the output-only signals (that is, the signals that are not multiplexed with other inputs, or are not used as reset configuration signals during system reset). table 3-4. output signal states during system reset interface signal state during reset ddr memory mdm[0:8] high-z ddr memory mba[0:1] high-z ddr memory ma[0:14] high-z ddr memory mwe high-z ddr memory mras high-z ddr memory mcas high-z ddr memory mcs [0:3] high-z ddr memory mcke[0:1] driven low ddr memory mck[0:5], mck [0:5] high-z rapidio rio_tclk, rio_tclk driven (toggling) rapidio rio_td[0:7], rio_td [0:7] high-z rapidio rio_tframe, rio_tframe high-z tsec1 tsec1_txd[3:0] input?reset config (test only) tsec1 tsec1_tx_en driven low tsec1 tsec1_tx_er high-z tsec1 tsec1_gtx_clk high-z tsec2 tsec2_txd[1:0] high-z tsec2 tsec2_tx_en driven low tsec2 tsec2_tx_er high-z tsec2 tsec2_gtx_clk high-z fec fec_txd[0:3] high-z fec fec_tx_en driven low fec fec_tx_er high-z lbc lclk[0:2] high-z lbc lcs [0:5] high-z lbc dma_dack2 /lcs6 dma_ddone2 /lcs7 high-z lbc lbctl input?reset config (test only) dma dma_dack [0:1] high-z
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 3-18 freescale semiconductor signal descriptions dma dma_dack2 /lcs6 dma_ddone2 /lcs7 high-z dma dma_ddone0 high-z dma dma_ddone1 driven (test only) pic irq8 driven (test only) pic irq_out high-z dual uart uart_sout[0:1] high-z dual uart uart_rts [0:1] high-z system control hreset_req high-z system control ckstp_out high-z debug trig_out/ready input?reset config (test only) debug msrcid[2:4] high-z debug mdval high-z power mgmt asleep input?reset config (test only) clock clk_out high-z table 3-4. output signal states during system reset (continued) interface signal state during reset
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 4-1 chapter 4 reset, clocking, and initialization this chapter describes the reset, clocking, and some overall initialization of the MPC8540, including a definition of the reset configurations signals and the options they select. additionally, the configuration, control, and status registers are described. note that chapters in this book describe specific initialization aspects for individual blocks. 4.1 overview the reset, clocking, and control signals provide many options for the operation of the MPC8540. additionally, many modes are selected with reset configuration signals during the assertion of a hard reset (assertion of hreset ). 4.2 external signal descriptions table 4-1 summarizes the external signals described in this chapter. table 4-2 and table 4-3 have detailed signal descriptions, but table 4-1 contains references to additional sections that contain more information. the following sections describe the reset and clock signals in detail. table 4-1. signal summary signal i/o description references (section/page) hreset i hard reset input. causes a power-on reset (por) sequence 4.4.1.2/4-9 hreset_req o hard reset request output. an internal block requests that hreset be asserted ? sreset i soft reset input. causes mcp assertion to the core 4.4.1.1/4-9 ready o the MPC8540 has completed the reset operation and is not in a power-down (nap, doze or sleep) or debug state. 4.4.2/4-9 sysclk i primary clock input to the MPC8540 4.4.4.1/4-23 rtc i real time clock input 4.4.4.4/4-25
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 4-2 freescale semiconductor reset, clocking, and initialization 4.2.1 system control signals table 4-2 describes some of the system control signals of the MPC8540. section 4.4.3, ?power-on reset configuration,? describes the signals that also function as reset configuration signals. note that the ckstp_in and ckstp_out signals are described in chapter 18, ?global utilities.? table 4-2. system control signals?detailed signal descriptions signal i/ o description hreset i hard reset. causes the MPC8540 to abort all current internal and external transactions and set all registers to their default values. hreset may be asserted completely asynchronously with respect to all other signals. state meanin g asserted/negated?see chapter 3, ?signal descriptions,? and section 4.4.3, ?power-on reset configuration,? for more information on the interpretation of the other MPC8540 signals during reset. timing assertion/negation?the MPC8540 integrated processor hardware specifications gives specific timing information for this signal and the reset configuration signals. hreset_re q o hard reset request. indicates to the board (system in which the MPC8540 is embedded) that a condition requiring the assertion of hreset has been detected. state meanin g asserted?a watchdog timer, a rapidio command, or a boot sequencer failure (see section 11.4.5, ?boot sequencer mode? ) has triggered a request for hard reset. negated?indicates no reset request timing assertion/negation?may occur anytime, synchronous to the core complex bus clock. once asserted, hreset_req does not negate until hreset is asserted. sreset i soft reset. causes a machine check interrupt to the e500 core. note that if the e500 core is not configured to process machine check interrupts, the assertion of sreset causes a core checkstop. sreset need not be asserted during a hard reset. state meanin g asserted?asserting sreset causes a machine check interrupt (edge sensitive) to the e500 core. sreset has no effect while hreset is asserted. however, the por sequence is paused if sreset is asserted during por. timing assertion?may occur at any time, asynchronous to any clock negation?must be asserted for at least two ccb_clk cycles ready o ready. multiplexed with trig_out. see chapter 20, ?debug features and watchpoint facility,? for more information on tosr and trig_out. state meanin g asserted?indicates that the MPC8540 has completed the reset operation and is not in a power-down state (nap, doze or sleep) when tosr[sel] equals 0b000. see section 4.4.2, ?power-on reset sequence,? for more information. timing assertion/negation?initial assertion of ready after reset is synchronous with sysclk. subsequent assertion/negation due to power down modes occurs asynchronously.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 4-3 4.2.2 clock signals table 4-3 describes the overall clock signals of the MPC8540. note that some clock signals are specific to blocks within the MPC8540, and although some of their functionality is described in section 4.4.4, ?clocking,? they are defined in detail in their respective chapters. note that there is also a clk_out signal in the MPC8540; the signal driven on the clk_out pin is selectable and described in section 18.4.1.16, ?clock out control register (clkocr).? 4.3 memory map/register definition this section describes the configuration and control registers that control access to the configuration space and to the boot code as well as guidelines for accessing these regions. it also contains a brief description of the boot sequencer which may be used to initialize configuration registers or memory before the cpu is released to boot. 4.3.1 local configuration control table 4-4 shows the memory map for the configuration, control, and status registers. table 4-3. clock signals?detailed signal descriptions signal i/ o description syscl k i system clock/pci clock (sysclk/pci_clk). sysclk is the primary clock input to the MPC8540. it is the clock source for the e500 core and for all devices and interfaces that operate synchronously with the core. multiplied up with a phased-lock loop (pll) to create the core complex bus (ccb) clock (also called the platform clock) which is used by virtually all of the synchronous system logic, include the l2 cache, the ddr sdram and local bus memory controllers, and other internal blocks such as the dma and interrupt controllers. the ccb clock, in turn, feeds the pll in the e500 core and the dlls that create the ddr sdram and local bus memory clocks. when the pci/pci-x interface is used, sysclk also functions as the pci_clk signal. note that this is true whether the MPC8540 is in agent or host mode. the MPC8540 does not provide a separate pci_clk output in host mode. timing assertion/negation?see the MPC8540 integrated processor hardware specifications for specific timing information for this signal. rtc i real time clock. may be used (optionally) to clock the time base of the e500 core. the maximum input frequency should not exceed 1/8th the core frequency. see section 4.4.4.4, ?real time clock.? this signal can also be used (optionally) to clock the global timers in the programmable interrupt controller (pic). timing assertion/negation?see the MPC8540 integrated processor hardware specifications for specific timing information for this signal.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 4-4 freescale semiconductor reset, clocking, and initialization 4.3.1.1 accessing configuration, control, and status registers the configuration, control, and status registers are memory mapped. the set of configuration, control, and status registers occupies a 1-mbyte region of memory. their location is programmable using the ccsr base address register (ccsrbar). the default base address for the configuration, control, and status registers is 0xff70_0000 (ccsrbar = 0x000f_f700). ccsrbar itself is part of the local access block of ccsr memory, which begins at offset 0x0 from ccsrbar. because ccsrbar is at offset 0x0 from the beginning of the local access registers, ccsrbar always points to itself. the contents of ccsrbar are broadcast internally in the MPC8540 to all functional units that need to be able to identify or create configuration transactions. 4.3.1.1.1 updating ccsrbar updates to ccsrbar that relocate the entire 1-mbyte region of configuration, control, and status registers, requires special treatment. the effect of the update must be guaranteed to be visible by the mapping logic before an access to the new location is seen. to make sure this happens, these guidelines should be followed:  ccsrbar should be updated during initial configuration of the device when only one host or controller has access to the device. ? if the boot sequencer is being used to initialize, it is recommended that the boot sequencer set ccsrbar to its desired final location. ? if an external host on pci or rapidio is configuring the device, it should set ccsrbar to the desired final location before the e500 core is released to boot. ? if the e500 core is initializing the device, it should set ccsrbar to the desired final location before enabling other i/o devices to access the device.  when the e500 core is writing to ccsrbar, it should use the following sequence: ? read the current value of ccsrbar using a load word instruction followed by an isync . this forces all accesses to configuration space to complete. ? write the new value to ccsrbar. table 4-4. local configuration control register map local memory offset (hex) register access reset section/page 0x0_0000 ccsrbar?configuration, control, and status registers base address register r/w 0x000f_f700 4.3.1.1.2/4-5 0x0_0008 altcbar?alternate configuration base address register r/w 0x0000_0000 4.3.1.2.1/4-6 0x0_0010 altcar?alternate configuration attribute register r/w 0x0000_0000 4.3.1.2.2/4-6 0x0_0020 bptr?boot page translation register r/w 0x0000_0000 4.3.1.3.1/4-8
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 4-5 ? perform a load of an address that does not access configuration space or the on-chip sram, but has an address mapping already in effect (for example, boot rom). follow this load with an isync . ? read the contents of ccsrbar from its new location, followed by another isync instruction. 4.3.1.1.2 configuration, control, and status base address register (ccsrbar) figure 4-1 shows the fields of ccsrbar. figure 4-1. configuration, control, and status register base address register (ccsrbar) table 4-5 defines the bit fields of ccsrbar. 4.3.1.2 accessing alternate configuration space an alternate configuration space can be accessed by configuring the altcbar and altcar registers. these are intended to be used with the boot sequencer to allow the boot sequencer to access an alternate 1-mbyte region of configuration space. by loading the proper boot sequencer command in the serial rom the base address in the altcbar can be combined with the 20 bits of address offset supplied from the serial rom to generate a 32-bit address that is mapped to the target specified in altcar. thus, by configuring these registers, the boot sequencer has access to the entire memory map, one 1-mbyte block at a time. see section 11.4.5, ?boot sequencer mode,? for more information. 0 1 2 3 4 5 6 7 8 9 101112 232425262728293031 r000000000000 base_addr 00000000 w reset 0000_0000_0000_ 1111_1111_011 1_0000_0000 offset 0x000 table 4-5. ccsrbar field descriptions bits name description 0?11 ? write reserved, read = 0 12?23 base_addr identifies the12 most-significant address bits of the window used for configuration accesses. the base address is aligned on a 1-mbyte boundary. 24?31 ? write reserved, read = 0
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 4-6 freescale semiconductor reset, clocking, and initialization note the enable bit in the altcar register should be cleared either by the boot sequencer or by the boot code that executes after the boot sequencer has completed its configuration operations. this prevents problems with incorrect mappings if subsequent configuration of the local access windows uses a different target mapping for the address specified in altcbar. 4.3.1.2.1 alternate configuration base address register (altcbar) figure 4-2 shows the fields of altcbar. figure 4-2. alternate configuration base address register (altcbar) table 4-6 defines the bit fields of altcbar. 4.3.1.2.2 alternate configuration attribute register (altcar) figure 4-3 shows the fields of altcar. figure 4-3. alternate configuration attribute register (altcar) 0 1112 2324 31 r000000000000 base_addr 00000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x008 table 4-6. altcbar field descriptions bits name description 0?11 ? write reserved, read = 0 12?23 base_addr identifies the12 most-significant address bits of an alternate window used for configuration accesses. 24?31 ? write reserved, read = 0 0 1234567 8 11 12 30 31 r en 0000000 trgt_id 00000000000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x010
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 4-7 table 4-7 defines altcar fields. 4.3.1.3 boot page translation when the e500 core comes out of reset, its mmu has one 4-kbyte page defined at 0xffff_f nnn . the first instruction executed by the e500 core is always address 0xffff_fffc, which must be a branch to an address within the 4-kbyte boot page. for systems in which the boot code resides at a different address, the MPC8540 provides boot page translation capability. boot page translation is controlled by the boot page translation register (bptr). if enabled, this translation affects cpu accesses to address range 0xffff_f nnn . the boot sequencer can enable boot page translation, or the boot page translation can be enabled by an external host when the MPC8540 is configured to be in boot holdoff mode. if translation is performed to a page outside of the default boot rom address range defined in the MPC8540 (8 mbytes at 0xff80_0000 to 0xffff_ffff as defined in section 4.4.3.3, ?boot rom location? ), the external host or boot sequencer must also set up a local access window to define the routing of the boot code fetch to the target interface that contains the boot code because the bptr defines only the address translation, not the target interface. see section 2.1, ?local memory map overview and example,? and section 11.4.5, ?boot sequencer mode,? for more information. table 4-7. altcar field descriptions bits name description 0 en enable for a second configuration window. like ccsrbar, it has a fixed size of 1 mbyte. 0 second configuration window is disabled 1 second configuration window is enabled 1?7 ? write reserved, read = 0 8?11 trgt_id identifies the device id to target when a transaction hits in the 1-mbyte address range defined by the second configuration window. 0000 pci/pci-x interface 0001 reserved 0010 reserved 0011 reserved 0100 local bus controller 0101?0111reserved 1000 configuration, control, and status registers 1001?1011reserved 1100 rapidio 1101 reserved 1110 reserved 1111 local memory ?ddr sdram and on-chip sram 12?31 ? write reserved, read = 0
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 4-8 freescale semiconductor reset, clocking, and initialization 4.3.1.3.1 boot page translation register (bptr) figure 4-4 shows the fields of bptr. figure 4-4. boot page translation register (bptr) table 4-8 describes bptr field descriptions. 4.3.2 boot sequencer the boot sequencer is a dma engine that accesses a serial rom on the i 2 c interface and writes data to ccsr memory or the memory space pointed to by the alternate configuration base address register (altcbar). see section 4.3.1.2, ?accessing alternate configuration space.? the boot sequencer is enabled by reset configuration pins as described in section 4.4.3.6, ?boot sequencer configuration.? if the boot sequencer is enabled, the e500 core is held in reset until the boot sequencer has completed its operation. for more details, see section 11.4.5, ?boot sequencer mode,? in the i 2 c chapter. 4.4 functional description this section describes the various ways to reset the MPC8540 device, the por configurations, and the clocking on the MPC8540. 4.4.1 reset operations the MPC8540 has reset input signals for hard and soft reset operation. 01 1112 31 r en 00000000000 boot_page w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x020 table 4-8. bptr field descriptions bits name description 0 en boot page translation enable 0 boot page is not translated 1 boot page is translated as defined in the bptr[boot_page] parameter 1?11 ? write reserved, read = 0 12?31 boot_page translation for boot page. if enabled, the high-order 20 bits of accesses to 0xffff_f nnn are replaced with this value.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 4-9 4.4.1.1 soft reset assertion of sreset causes a machine check interrupt to the e500 core. when this occurs, the soft reset flag is recorded in the machine check summary register (mcpsumr) in the global utilities block so that software can identify the machine check as a soft reset condition. see the powerpc? e500 core complex reference manual for more information on the machine check interrupt, and section 18.4.1.13, ?machine check summary register (mcpsumr),? for more information on the setting of the soft reset flag. note that if sreset is asserted before the e500 core is configured to handle a machine check interrupt, a core checkstop condition occurs, which causes ckstp_out to assert. 4.4.1.2 hard reset the MPC8540 can be completely reset by the assertion of the hreset input. the assertion of this signal by external logic is the equivalent of a por and causes the sequence of events described in section 4.4.2, ?power-on reset sequence.? refer to the MPC8540 integrated processor hardware specifications for the timing requirements for hreset assertion and negation. the MPC8540 hard reset request output signal (hreset_req ) indicates to external logic that a hard reset is being requested by hardware or a rapidio device. hardware causes this signal to assert for a boot sequencer failure (see section 11.4.5, ?boot sequencer mode,? and section 11.4.5.2, ?eeprom data format,? ) or when the e500 watchdog timer is configured to cause a reset request when it expires. a rapidio device causes this signal to assert if it sends four consecutive rapidio link maintenance reset commands without any other intervening packets or control symbols, except idle control symbols (see section 17.4.1, ?rapidio transaction, packet, and control symbol summary,? for details of rapidio transaction types). 4.4.2 power-on reset sequence the por sequence for the MPC8540 is as follows: 1. power is applied to meet the specifications in the MPC8540 integrated processor hardware specifications . 2. system asserts hreset and trst causing all registers to be initialized to their default states and most i/o drivers to be three-stated (some clock, clock enabled, and system control signals are active). 3. system applies a stable sysclk signal and stable pll configuration inputs, and the device pll begins locking to sysclk. 4. system negates hreset after its required hold time and after por configuration inputs have been valid for at least 4 sysclk cycles.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 4-10 freescale semiconductor reset, clocking, and initialization note if the jtag signals are not used, trst may be tied inactive; however it is recommended that trst not remain asserted after the negation of hreset . trst may be connected directly to hreset . there is no need to assert the sreset signal when hreset is asserted. if sreset is asserted upon negation of hreset , the por sequence will be paused until sreset is negated. 5. the MPC8540 enables i/o drivers. 6. the MPC8540 pci/pci-x interface can assert devsel in response to configuration cycles. 7. the e500 pll configuration inputs are applied, allowing the e500 pll to begin locking to the device clock (the ccb clock). 8. the ccb clock is cycled for approximately 50 s to lock the e500 pll. 9. the internal hard reset to the e500 core is negated and soft resets are negated to the dlls and other remaining i/o blocks. the dlls begin to lock. 10. when dll locking is completed, the boot sequencer is released, causing it to load configuration data from serial roms, if enabled, as described in section 4.4.3.6, ?boot sequencer configuration.? 11. when the boot sequencer completes, the rapidio interface begins training, the pci interface is released to accept external requests, and the boot vector fetch by the e500 core is allowed to proceed unless processor booting is further held off by por configuration inputs as described in section 4.4.3.5, ?cpu boot configuration.? the MPC8540 is now in its ready state. 12. the asleep signal negates synchronized to a rising edge of sysclk, indicating the ready state. the ready state is also indicated by the assertion of ready/trig_out if tosr[sel] = 000. in this case, ready is asserted with the same rising edge of sysclk, to indicate that the device has reached its ready state. see section 20.3.4.1, ?trigger out source register (tosr),? for more information on this register. asserting ready allows external system monitors to know basic device status. for example, exactly when it emerges from reset, or if the device is in a low-power mode. for more information on the debug functions of trig_out, see section 20.3.4, ?trigger out function.? for more information about power management states, see section 18.4.1, ?register descriptions.?
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 4-11 figure 4-5 shows a timing diagram of the por sequence. figure 4-5. power-on reset sequence 4.4.3 power-on reset configuration various device functions are initialized by sampling certain signals during the assertion of hreset . the values of all these signals are sampled into registers while hreset is asserted. these inputs are to be pulled high or low by external resistors. during hreset , all other signal drivers connected to these signals must be in the high-impedance state. most por configuration signals have internal pull-up resistors so that if the desired setting is high, there is no need for a pull-up resistor on the board. other por configuration signals do not use pull-ups and, therefore, must be pulled high or low. refer to the MPC8540integrated processor hardware specifications for proper resistor values to be used for pulling por configuration signals high or low. this section describes the functions and modes configured by por configuration signals. note that many reset configuration settings are accessible to software through the following read-only memory-mapped registers described in chapter 18, ?global utilities.? sysclk hreset treset sreset (high impedance) hreset_req por configs pll configs ready 1 asleep (high impedance) (high impedance) 1 multiplexed with trig_out.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 4-12 freescale semiconductor reset, clocking, and initialization  por pll status register (porpllsr)  por boot mode status register (porbmsr)  por i/o impedance status and control register (porimpscr)  por device status register (pordevsr)  por debug mode status register (pordbgmsr)  general-purpose por configuration register (gpporcr)?reports the value on lad[0:31] during por (can be used to external system configuration) note in the following tables, the binary value 0b0 represents a signal pulled down to gnd and a value of 0b1 represents a signal pulled up to vdd, regardless of the sense of the functional signal name on the signal. 4.4.3.1 system pll ratio the system pll inputs, shown in table 4-9 , establish the clock ratio between the pci_clk/sysclk input and the platform clock used by the MPC8540. the platform clock, also called the ccb clock, drives the l2 cache, the ddr sdram data rate, and the e500 core complex bus (ccb). there is no default value for this pll ratio; these signals must be pulled to the desired values. note that the values latched on these signals during por are accessible in the porpllsr (por pll status register), as described in section 18.4.1.1, ?por pll status register (porpllsr).?
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 4-13 4.4.3.2 e500 core pll ratio table 4-10 describes the e500 core clock pll inputs that program the core pll and establish the ratio between the e500 core clock and the e500 core complex bus (ccb) clock. there is no default value for this pll ratio; these signals must be pulled to the desired values. note that the values latched on these signals during por are accessible through the memory-mapped porpllsr, as described in section 18.4.1.1, ?por pll status register (porpllsr),? and also in the e500 core hid1 register, as described in section 6.10.2, ?hardware implementation-dependent register 1 (hid1).? table 4-9. ccb clock pll ratio functional signals reset configuration name value (binary) ccb clock : sysclk ratio la[28:31] no default cfg_sys_pll[0:3] 0000 16 : 1 0001 reserved 0010 2 : 1 0011 3 : 1 0100 4 : 1 0101 5 : 1 0110 6 : 1 0111 reserved 1000 8 : 1 1001 9 : 1 1010 10 : 1 1011 reserved 1100 12 : 1 1101 reserved 1110 reserved 1111 reserved table 4-10. e500 core clock pll ratios functional signals reset configuration name value (binary) e500 core: ccb clockratio lale, lgpl2 no default cfg_core_pll[0:1] 00 2 : 1 01 5 : 2 (2.5:1) 10 3 : 1 11 7 : 2 (3.5:1)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 4-14 freescale semiconductor reset, clocking, and initialization 4.4.3.3 boot rom location the first instruction executed by the e500 core is always address 0xffff_fffc, which must be a branch to an address within the 4-kbyte boot page. the MPC8540 defines the default boot rom address range to be 8 mbytes at address 0xff80_0000 to 0xffff_ffff. however, which on-chip peripheral handles these boot rom accesses can be selected at power up. the boot rom location inputs, shown in table 4-11 , establish the location of boot rom. accesses to the boot vector and the default boot rom region of the local address map are directed to the interface specified by these inputs. note that the values latched on these signals during por are accessible through the memory-mapped porbmsr (por boot mode status register) described in section 18.4.1.2, ?por boot mode status register (porbmsr).? see section 2.1, ?local memory map overview and example,? for an example memory map that relies on the default boot rom values. also, see section 4.3.1.3.1, ?boot page translation register (bptr),? for information on translation of the boot page. if enabled, this translation only affects cpu accesses to 0xfff_f nnn . 4.4.3.4 host/agent configuration the host/agent reset configuration inputs, shown in table 4-12 , configure the MPC8540 to act as a host or as an agent of a master on another interface. in host mode, the MPC8540 is immediately enabled to master transactions to the rapidio and pci interfaces. if the MPC8540 is an agent on the rapidio or the pci interfaces, then the MPC8540 is disabled from mastering transactions on that interface until the external host enables it to do so. the external host does this by setting the control registers of the MPC8540?s interfaces appropriately. see details in the pci and rapidio programming models described in chapter 16, ?pci/pci-x bus interface,? and chapter 17, ?rapidio interface,? respectively. table 4-11. boot rom location functional signals reset configuration name value (binary) meaning tsec1_txd[6:4] d efault (111) cfg_rom_loc[0:2] 000 pci/pci-x 001 ddr sdram 010 reserved 011 rapidio 100 reserved 101 local bus gpcm?8-bit rom 110 local bus gpcm?16-bit rom 111 local bus gpcm?32-bit rom (default)
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 4-15 note that the values latched on these signals during por are accessible through the memory-mapped porbmsr (por boot mode status register) described in section 18.4.1.2, ?por boot mode status register (porbmsr).? s note if the MPC8540 is an agent on a particular interface, and the cpu is not in holdoff mode (as described in section 4.4.3.5, ?cpu boot configuration? ) then the boot rom should not be located on the interface where the external host exists, because the MPC8540 is not enabled to master reads onto that interface. 4.4.3.5 cpu boot configuration the cpu boot configuration input, shown in table 4-13 , specifies the boot configuration mode. if la27 is sampled low at reset, the e500 core is prevented from fetching boot code until configuration by an external master is complete. the external master frees the cpu to boot by setting eebpcr[cpu_en] in the ecm ccb port configuration register (eebpcr). see section 8.2.1.2, ?ecm ccb port configuration register (eebpcr),? for more information. note that the values latched on these signals during por are accessible through the memory-mapped porbmsr (por boot mode status register) described in section 18.4.1.2, ?por boot mode status register (porbmsr).? table 4-12. host/agent configuration functional signals reset configuration name value (binary) meaning lwe [2:3] default (11) cfg_host_agt[0:1] 00 MPC8540 acts as an agent of both a pci/pci-x and a rapidio device. 01 MPC8540 acts as an agent of a rapidio host. 10 MPC8540 acts as an agent of a pci/pci-x host. 11 MPC8540 acts as the host processor (default). table 4-13. cpu boot configuration functiona l signal reset configuration name value (binary) meaning la27 default (1) cfg_cpu_boot 0 cpu boot holdoff mode. the e500 core is prevented from booting until configured by an external master. 1 the e500 core is allowed to boot without waiting for configuration by an external master (default).
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 4-16 freescale semiconductor reset, clocking, and initialization 4.4.3.6 boot sequencer configuration the boot sequencer configuration options, shown in table 4-14 , allow the boot sequencer to load configuration data from the serial rom located on the i 2 c port before the host tries to configure the MPC8540. these options also specify normal or extended i 2 c addressing modes. see section 11.4.5, ?boot sequencer mode,? for more information on the boot sequencer. note that the values latched on these signals during por are accessible through the memory-mapped porbmsr (por boot mode status register) described in section 18.4.1.2, ?por boot mode status register (porbmsr).? note when the boot sequencer is enabled, the processor core will be held in reset and thus prevented from fetching boot code until the boot sequencer has completed its task, regardless of the state of the cpu boot configuration signal described in section 4.4.3.5, ?cpu boot configuration.? 4.4.3.7 tsec width the tsec width input, shown in table 4-15 , selects standard versus reduced width for both of the three-speed ethernet controller interfaces. note that the value latched on this signal during por is accessible through the memory-mapped pordevsr (por device status register) described in section 18.4.1.4, ?por device status register (pordevsr).? table 4-14. boot sequencer configuration functiona l signals reset configuration name value (binary ) meaning lgpl3, lgpl5 default (11) cfg_boot_seq[0:1] 00 reserved 01 normal i 2 c addressing mode is used. boot sequencer is enabled and loads configuration information from a rom on the i 2 c interface. a valid rom must be present. 10 extended i 2 c addressing mode is used. boot sequencer is enabled and loads configuration information from a rom on the i 2 c interface. a valid rom must be present. 11 boot sequencer is disabled. no i 2 c rom is accessed (default).
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 4-17 note while the width of both interfaces is controlled by this one configuration input, the protocol (tbi or gmii) used by each is separately controlled with other configuration inputs described in section 4.4.3.8, ?tsec1 protocol,? and section 4.4.3.9, ?tsec2 protocol.? 4.4.3.8 tsec1 protocol the tsec1 protocol input, shown in table 4-16 , selects the protocol (gmii or tbi) used by the tsec1 controller. note that the value latched on this signal during por is accessible through the memory-mapped pordevsr (por device status register) described in section 18.4.1.4, ?por device status register (pordevsr).? 4.4.3.9 tsec2 protocol the tsec2 protocol input, shown in table 4-17 , selects the protocol (gmii or tbi) used by the tsec2 controller. note that the value latched on this signal during por is accessible through the memory-mapped pordevsr (por device status register) described in section 18.4.1.4, ?por device status register (pordevsr).? table 4-15. tsec width configuration functiona l signal reset configuration name value (binary) meaning ec_mdc default (1) cfg_tsec_reduce 0 ethernet interfaces operate in reduced mode, either rtbi or rgmii, using only four transmit data signals and four receive data signals. 1 ethernet interfaces operate in their standard tbi or gmii modes using eight transmit data signals and eight receive data signals (default). table 4-16. tsec1 protocol configuration functional signal reset configuration name value (binary ) meaning tsec1_txd 7 default (1) cfg_tsec1 0 the tsec1 controller operates using the gmii protocol (or rgmii if configured in reduced mode as described in section 4.4.3.7, ?tsec width? ). 1 the tsec1 controller operates using the tbi protocol (or rtbi if configured in reduced mode as described in section 4.4.3.7, ?tsec width? ) (default).
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 4-18 freescale semiconductor reset, clocking, and initialization 4.4.3.10 rapidio transmit clock source the rapidio transmit clock source inputs, shown in table 4-18 , specify the source for the rapidio transmit clock. see section 4.4.4.2, ?rapidio clocks,? for more information. note that the value latched on this signal during por is accessible through the memory-mapped pordevsr (por device status register) described in section 18.4.1.4, ?por device status register (pordevsr).? 4.4.3.11 rapidio device id the rapidio device id inputs, shown in table 4-19 , specify the 3 lower-order bits of the device id of the MPC8540 as used by rapidio hosts. note that the 5 high-order rapidio device id bits cannot be set via por configuration inputs. they may be initialized via the boot sequencer or by the processor from boot rom or by the rapidio discovery process. if configured as a rapidio host, the upper order device id bits default to zeros. if configured as a rapidio agent, the upper order device id bits default to ones. unconnected cfg_dev_id n inputs default to 1s regardless of the host/agent mode configuration. note that the value latched on this signal at por is accessible through the memory-mapped pordevsr described in section 18.4.1.4, ?por device status register (pordevsr).? table 4-17. tsec2 protocol configuration functional signal reset configuration name value (binary ) meaning tsec2_txd 7 default (1) cfg_tsec2 0 the tsec2 controller operates using the gmii protocol (or rgmii if configured in reduced mode as described in section 4.4.3.7, ?tsec width? ). 1 the tsec2 controller operates using the tbi protocol (or rtbi if configured in reduced mode as described in section 4.4.3.7, ?tsec width? ) (default). table 4-18. rapidio transmit clock source functional signals reset configuration name value (binary ) meaning lgpl0, lgpl1 default (11) cfg_rio_clk[0:1] 00 reserved 01 the rapidio receive clock is the source of the transmit clock. 10 the rapidio transmit clock inputs (rio_tx_clk_in and rio_tx_clk ) are the source of the transmit clock. 11 the ccb clock is the source of the transmit clock (default).
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 4-19 4.4.3.12 pci width configuration the pci width configuration input, shown in table 4-20 , configures the pci/pci-x interface to 32- or 64-bit extended mode of operation. note that the value latched on this signal during por is accessible through the pordevsr described in section 18.4.1.4, ?por device status register (pordevsr).? 4.4.3.13 pci i/o impedance the pci i/o impedance input, shown in table 4-21 , selects the impedance of the pci i/o drivers. note that the values latched on these signals during por are accessible through porimpscr, described in section 18.4.1.3, ?por i/o impedance status and control register (porimpscr).? 4.4.3.14 pci arbiter configuration the pci arbiter configuration input, shown in table 4-22 , enables the on-chip pci/pci-x arbiter. note that the value latched on this signal during por is accessible through the pordevsr described in section 18.4.1.4, ?por device status register (pordevsr).? table 4-19. rapidio device id functional signals reset configuration name meaning tsec2_txd2 cfg_dev_id5 device id used for rapidio hosts tsec2_txd3 cfg_dev_id6 device id used for rapidio hosts tsec2_txd4 cfg_dev_id7 device id used for rapidio hosts table 4-20. pci-32 configuration functional signal reset configuration name value (binary ) meaning pci_req6 4 cfg_pci_width 0 the pci/pci-x interface operates as a 64-bit interface. default (1) 1 the pci/pci-x interface operates as a 32-bit interface (default). table 4-21. pci i/o impedance functional signal reset configuration name value (binary) meaning pci_gnt 1 cfg_pci_impd 0 25- ? i/o drivers are used on the pci interface. default (1) 1 42- ? i/o drivers are used on the pci interface (default).
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 4-20 freescale semiconductor reset, clocking, and initialization 4.4.3.15 pci debug configuration the pci debug configuration input, shown in table 4-23 , enables pci/pci-x debug mode. in this mode, source id information is driven onto the highest order address bits pci_ad[62:58] during the bus command phase (pci) or attribute phase (pci-x). note that the value latched on this signal during por is accessible through the pordbgmsr described in section 18.4.1.5, ?por debug mode status register (pordbgmsr).? 4.4.3.16 pci-x configuration the pci-x configuration input, shown in table 4-24 , configures pci or pci-x mode on the pci/pci-x port. note that this input does not support the three states of the pcixcap input defined in the pci-x specification. it is sampled as either a 1 or a 0 during reset only. note that the value latched on this signal during por is accessible through the memory-mapped pordevsr, described in section 18.4.1.4, ?por device status register (pordevsr).? 4.4.3.17 memory debug configuration the memory debug configuration input, shown in table 4-25 , selects which debug outputs (ddr or lbc memory controller) are driven onto the msrcid and mdval debug signals. note that the value latched on this signal during por is accessible through the memory-mapped table 4-22. pci arbiter configuration functiona l signal reset configuration name value (binary ) meaning pci_gnt 2 cfg_pci_arbiter 0 the on-chip pci/pci-x arbiter is disabled. external arbitration is required. default (1) 1 the on-chip pci/pci-x arbiter is enabled (default). table 4-23. pci debug configuration functiona l signal reset configuration name value (binary) meaning pci_gnt 3 default (1) cfg_pci_debug 0 pci debug is enabled. source id information is driven onto the highest order address bits, pci_ad[62:58], during the bus command phase (pci) or attribute phase (pci-x). 1 pci operates in normal mode (default) table 4-24. pci/pci-x configuration functional signal reset configuration name value (binary) meaning pci_gnt 4 default (1) cfg_pci_mode 0 pci-x mode 1 pci mode (default)
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 4-21 pordbgmsr (por debug mode register) described in section 18.4.1.5, ?por debug mode status register (pordbgmsr).? 4.4.3.18 ddr debug configuration the ddr debug configuration input, shown in table 4-26 , enables a ddr memory controller debug mode in which the ddr sdram source id field and data valid strobe are driven onto the ecc pins. ecc checking and generation are disabled in this case. ecc signals driven from the sdrams must be electrically disconnected from the ecc i/o pins of the MPC8540 in this mode. note that the value latched on this signal during por is accessible through the memory-mapped pordbgmsr (por debug mode register) described in section 18.4.1.5, ?por debug mode status register (pordbgmsr).? 4.4.3.19 pci/pci-x output hold configuration the pci output hold configuration inputs configure the output hold times for the pci or pci-x output drivers. the meanings are different for pci and pci-x because the required hold times are different in the two specifications. in either mode, the default value will meet the hold times required by the respective specification. hold times are adjusted by adding or subtracting buffer delays to the intrinsic delay of the output driver. refer to the MPC8540 integrated processor hardware specifications for specific timing information. table 4-27 shows the hold time configurations for pci mode, and table 4-28 shows the hold time configurations for pci-x mode. table 4-25. memory debug configuration functional signal reset configuration name value (binary) meaning msrcid0 default (1) cfg_mem_debug 0 debug information from the local bus controller (lbc) is driven on the msrcid and mdval signals. 1 debug information from the ddr sdram controller is driven on the msrcid and mdval signals (default). table 4-26. ddr debug configuration functional signal reset configuration name value (binary) meaning msrcid1 default (1) cfg_ddr_debug 0 debug information is driven on the ecc pins instead of normal ecc i/o. ecc signals from memory devices must be disconnected. 1 debug information is not driven on ecc pins. ecc pins function in their normal mode (default).
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 4-22 freescale semiconductor reset, clocking, and initialization 4.4.3.20 local bus output hold configuration the lbc output hold configuration inputs, shown in table 4-29 , configure the output hold times for the local bus interface output drivers. the default values are designed to meet the specified ac timing requirements for the local bus. hold times are adjusted by adding buffer delays to the intrinsic delay of the output driver. refer to the MPC8540 integrated processor hardware specifications for specific timing information. note that for three of the por configuration input settings, there is a minimum of one buffer of output hold delay between the lale and lad[0:31] signals. table 4-27. pci output hold configuration (cfg_pci_mode = 1) functional signals reset configuration name value (binary ) meaning lwe [0:1] default (11) cfg_pci_hold[0:1] 11 two added buffer delays?required to meet 2-ns hold time requirement 10 three added buffer delays (default + 1) 01 zero added buffer delays (default + 2 mod 4) 00 one added buffer delay (default + 3 mod 4) table 4-28. pci-x output hold configuration (cfg_pci_mode = 0) functional signals reset configuration name value (binary ) meaning lwe [0:1] default (11) cfg_pci_hold[0:1] 11 zero added buffer delays?meets 0.7 ns hold time requirement 10 one added buffer delay (default + 1) 01 two added buffer delays (default + 2) 00 three added buffer delays (default + 3) table 4-29. local bus output hold configuration functional signals reset configuration name value (binary ) meaning tsec2_txd[6:5 ] default (11) cfg_lb_hold[0:1] 11 one added buffer delay (default) (zero added buffer delays for lale) 10 two added buffer delays (default + 1) (one added buffer delay for lale) 01 three added buffer delays (default + 2) (one added buffer delay for lale) 00 zero added buffer delays (zero added buffer delays for lale)
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 4-23 4.4.3.21 general-purpose por configuration the lbc address/data bus inputs, shown in table 4-30 , configure the value of the general-purpose por configuration register defined in section 18.4.1.6, ?general-purpose por configuration register (gpporcr).? this register is intended to facilitate por configuration of user systems. a value placed on lad[0:31] during por is captured and stored (read only) in the gpporcr. software can then use this value to inform the operating system about initial system configuration. typical interpretations include circuit board type, board id number, or a list of available peripherals. 4.4.4 clocking the following paragraphs describe the clocking within the MPC8540 device. 4.4.4.1 system clock/pci clock the MPC8540 takes a single input clock, sysclk, as its primary clock source for the e500 core and all of the devices and interfaces that operate synchronously with the core. as shown in figure 4-6 , the sysclk input (frequency) is multiplied up using a phase lock loop (pll) to create the core complex bus (ccb) clock (also called the platform clock). the ccb clock is used by virtually all of the synchronous system logic, including the l2 cache, and other internal blocks such as the dma and interrupt controller. the ccb clock also feeds the pll in the e500 core and the dlls that create clocks for the ddr sdram and local bus memory controllers. note that the divide-by-two ccb clock divider and the divide-by- n ccb clock divider, shown in figure 4-6 , are located in the ddr and local bus blocks, respectively. table 4-30. general-purpose por configuration functional signals reset configuration name value (binary ) meaning lad[0:31] no default cfg_gpporcr xx general-purpose por configuration vector to be placed in gpporcr
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 4-24 freescale semiconductor reset, clocking, and initialization figure 4-6. clock subsystem block diagram when the pci/pci-x interface is being used, sysclk also functions as the pci_clk signal. note that this is true both when the MPC8540 is in agent mode and host mode. the MPC8540 does not provide a separate pci_clk output in host mode. 4.4.4.2 rapidio clocks as shown in figure 4-7 , the rapidio transmit clocks (rio_tclk and rio_tclk ) can be selected from one of three sources. if the desired rapidio clock is sourced by the device to which the MPC8540 rapidio port is connected, then the transmit clock can be derived from the receive clock (rio_rclk and rio_rclk ). figure 4-7. rapidio transmit clock options lclk2 core pll device pll dll dll msync_in lsync_in lsync_out lclk0 lclk1 msync_out mck[0:5] mck [0:5] core_clk e500 core ccb_clk to rest of the device sysclk/ pci_clk ccb_clk cfg_sys_pll[0:3] cfg_core_pll[0:1] MPC8540 2 4 6 6 ddr controller lbc 2 n ccb_clk rio_rck rio_rck rio_tck rio_tck cfg_rio_clk[0:1] clock synthesis chip rio_tx_clk_in rio_tx_clk_in MPC8540 2
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 4-25 if the MPC8540 is the initial master of the rapidio clock, then it can derive the rapidio transmit clock from either its internal platform (ccb) clock or from a dedicated lvds clock input, rio_tx_clk_in / rio_tx_clk_in . 4.4.4.3 ethernet clocks the ethernet blocks operate asynchronously with respect to the rest of the device. these blocks use receive and transmit clocks supplied by their respective phy chips, plus a 125-mhz clock input for gigabit protocols. data transfers are synchronized to the ccb clock internally. 4.4.4.4 real time clock as shown in figure 4-8 , the real time clock (rtc) input can optionally be used to clock the e500 core timer facilities. rtc can also be used (optionally) by the MPC8540 programmable interrupt controller (pic) global timer facilities. the rtc is separate from the e500 core clock and is intended to support relatively low frequency timing applications. the rtc frequency range is specified in the MPC8540 integrated processor hardware specifications , but the maximum value should not exceed one-eighth of the core frequency. before being distributed to the core time base, rtc is sampled and synchronized with the ccb clock. the clock source for the core time base is specified by two fields in hid0: time base enable (tben), and select time base clock (sel_tbclk). if the time base is enabled, (hid0[tben] is set), the clock source is determined as follows:  hid0[sel_tbclk] = 0, the time base is updated every 8 ccb clocks  hid0[sel_tbclk] = 1, the time base is updated on the rising edge of rtc the default source of the time base is the ccb clock divided by eight. for more details, see the section ?hardware implementation-dependent register (hid0),? in the ? powerpc? e500 core complex reference manual. ? section 10.3.2.6, ?timer control register (tcr),? provides additional information on the use of the rtc signal to clock the global timers in the pic unit.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 4-26 freescale semiconductor reset, clocking, and initialization figure 4-8. rtc and core timer facilities clocking options rtc (sampled an d synchronize d) hid0 tben sel_tbclk core time base (incrementer) decrementer event 63 decar 32 auto-reload 63 32 63 32 (decrementer) watchdog timer events based on one of the 64 tb bits selected by concatenating tcr[wpext] with the eis-defined tcr[wp] (wpext||wp). dec tbu tbl core timer e500 core 8 ccb clock ? ? ? ? ? ? note: the logic circuits shown depict functional relationships only; they do not represent physical implementation details. (0 ? 1 detect) facilities clock fixed-interval timer events based on one of the 64 tb bits selected by concatenating tcr[fpext] with the eis-defined tcr[fp] (fpext||fp).
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor ii-1 part ii e500 core complex and l2 cache this part describes the many features of the MPC8540 core processor at an overview level and the interaction between the core complex and the l2 cache. the following chapters are included:  chapter 5, ?core complex overview,? provides an overview of the e500 core processor and the l1 caches and mmu that, together with the core, comprise the core complex.  chapter 6, ?core register summary,? provides a listing of the e500 registers in reference form.  chapter 7, ?l2 look-aside cache/sram,? describes the l2 cache of the MPC8540. note that the l2 cache can also be addressed directly as memory-mapped sram. the e500 processor core is a low-power implementation of the family of reduced instruction set computing (risc) embedded processors that implement the powerpc architecture. this part provides additional information about the book e architecture as it relates specifically to the e500 core complex and specific details on how its registers are accessed. the e500 core complex interacts with the l2 cache through the core complex bus (ccb).
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 ii-2 freescale semiconductor
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 5-1 chapter 5 core complex overview this chapter provides an overview of the powerpc e500 microprocessor core as it is implemented on the MPC8540. this chapter includes the following:  an overview of the book e version of the powerpc architecture features as implemented in this core and a summary of the core feature set  a summary of the instruction pipeline and flow  an overview of the programming model  an overview of interrupts and exception handling  a description of the memory management architecture  high-level details of the e500 core memory and coherency model  a brief description of the core complex bus (ccb)  a summary of the book e architecture compatibility and migration from the original version of the powerpc architecture as it is defined by apple, ibm, and motorola (referred to as the aim version of the powerpc architecture) specific details about the e500 are provided in the powerpc e500 core complex reference manual (freescale semiconductor document id no. e500corerm). the e500 core provides features that the integrated device may not implement or may implement in a more specific way. these differences are summarized in section 5.14, ?powerquicc iii implementation details.? 5.1 overview the e500 processor core is a low-power implementation of the family of reduced instruction set computing (risc) embedded processors that implement the book e definition of the powerpc architecture. the e500 is a 32-bit implementation of the book e architecture using the lower words in the 64-bit general-purpose registers (gprs). figure 5-1 is a block diagram of the processor core complex that shows how the functional units operate independently and in parallel. note that this conceptual diagram does not attempt to show how these features are physically implemented.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 5-2 freescale semiconductor core complex overview figure 5-1. e500 core complex block diagram reservation station reservation station reservation station additional features  time base counter/decrementer  clock multiplier  jtag/cop interface  power management  performance monitor fetch stages branch prediction unit btb 512 entry ctr lr instruction unit instruction queue (12 instructions) program order is maintained by passing instructions reservation branch unit gpr file completion queue (14 entry) load/store unit 32-/ 64-bit l2 mmus 256-entry tlb array 16-entry condition cr field 128-bit general issue queue (giq) branch issue queue (biq) (tlb0) tlb array (tlb1) register unified l1 data mmu 64-entry d-l1tlb4k 4-entry d-l1vsp two instruction dispatch (1 biq, 2 giq) core interface unit l1 instruction mmu 64-entry i-l1tlb4k 4-entry i-l1vsp 32-kbyte i cache station reservation station simple unit 1 (32/64 bit) simple unit 2 (32 bit) multiple unit (64/32 bit) (64/32 bit) memory unit (4 instructions) tags tags 32-kbyte d cache maximum mas registers two instructions retire per cycle from the iq to the cq at dispatch. load data line fill buffer data write buffer instruction line rename buffers (14) fill buffer rename buffers (14) gpr completion bus operand bus crf bus two instruction issue to giq per clock one instruction issue to biq per clock l1 store queue miss queue core complex bus each execution unit can accept one instruction per cycle.
overview MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 5-3 book e allows processors to provide auxiliary processing units (apus), which are extensions to the architecture that can perform computational or system management functions. one of these on the e500 is the signal processing engine apu (spe apu), which includes a suite of vector instructions that use the upper and lower halves of the gprs as a single two-element operand. most apus implemented on the e500 are defined by the freescale semiconductor book e implementation standards (eis). 5.1.1 upward compatibility the e500 provides 32-bit effective addresses and integer data types of 8, 16, and 32 bits, and two-element 64-bit data types for the embedded vector floating-point apu which provides scalar and vector single-precision instructions that operate on operands comprised of two 32-bit elements and the spe apu, which provides an extensive instruction set for 64-bit vector integer and fractional operations. the embedded scalar floating-point apu provides 32-bit single-precision instructions. note the spe apu and embedded floating-point apu functionality is implemented in all powerquicc iii devices. however, these instructions will not be supported in devices subsequent to powerquicc iii. freescale semiconductor strongly recommends that use of these instructions be confined to libraries and device drivers. customer software that uses spe or embedded floating-point apu instructions at the assembly level or that uses spe intrinsics will require rewriting for upward compatibility with next-generation powerquicc devices. freescale semiconductor offers a libmoto_e500 library that uses spe and embedded floating-point apu instructions. freescale will also provide libraries to support next-generation powerquicc devices. 5.1.2 core complex summary the core complex is a superscalar processor that can issue two instructions and complete two instructions per clock cycle. instructions complete in order, but can execute out of order. execution results are available to subsequent instructions through the rename buffers, but those results are recorded into architected registers in program order, maintaining a precise exception model. all arithmetic instructions that execute in the core operate on data in the gprs. although the gprs are 64 bits wide, only spe apu and embedded vector floating-point instructions operate on the upper word of the gprs; the upper 32 bits are not affected by 32-bit instructions.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 5-4 freescale semiconductor core complex overview the processor core integrates two simple instruction units (su1, su2), a multiple-cycle instruction unit (mu), a branch unit (bu), and a load/store unit (lsu). the lsu and su2 support 64- and 32-bit instructions. the ability to execute five instructions in parallel and the use of simple instructions with short execution times yield high efficiency and throughput. most integer instructions execute in one clock cycle. a series of independent vector floating-point add instructions can be issued and completed with a throughput of one instruction per cycle. the core complex includes independent, on-chip, 32-kbyte, eight-way set-associative, physically addressed caches for instructions and data. it also includes on-chip first-level instruction and data memory management units (mmus) and an on-chip second-level unified mmu.  the first-level mmus contain two four-entry, fully-associative instruction and data translation lookaside buffer (tlb) arrays that provide support for demand-paged virtual memory address translation and variable-sized pages. they also contain two 64-entry, four-way set-associative instruction and data tlb arrays that support 4-kbyte pages. these arrays are maintained completely by the hardware with a true least-recently-used (lru) algorithm.  the second-level mmu contains a 16-entry, fully-associative unified (instruction and data) tlb array that provides support for variable-sized pages and a 256-entry, two-way set-associative unified tlb for 4-kbyte page size support. these tlbs are maintained completely by the software. the core complex allows cache-line-based user-mode locks on the contents in either the instruction or data cache. this provides embedded applications with the capability for locking interrupt routines or other important (time-sensitive) instruction sequences into the instruction cache. it also allows data to be locked into the data cache, which supports deterministic execution time. the core complex supports a high-speed on-chip internal bus with data tagging called the core complex bus (ccb). the ccb has two general purpose read data buses, one write data bus, data parity bits, data tag bits, an address bus, and address attribute bits. the processor core complex supports out-of-order reads, in-order writes, and one level of pipelining for addresses with address-retry responses. it can also support single-beat and burst data transfers for memory accesses and memory-mapped i/o operations. 5.2 e500 processor and system version numbers table 5-1 matches the revision code in the processor version register (pvr) and the system version register (svr) to the revision level marked on the device. these registers can be accessed as sprs through the e500 core (see chapter 6, ?core register summary? ) or as memory-mapped registers defined by the integrated device (see section 18.4.1, ?register descriptions? ).
features MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 5-5 5.3 features key features of the e500 are summarized as follows:  implements book e 32-bit architecture  auxiliary processing units the branch target buffer (btb) locking apu is specific to the e500. the btb locking apu gives the user the ability to lock, unlock, and invalidate btb entries. the eis defines the following apus: ? integer select. this apu consists of the integer select instruction, isel , which is a conditional register move that helps eliminate conditional branches, decreases latency, and reduces the code footprint. ? performance monitor. the performance monitor facility provides the ability to monitor and count predefined events such as processor clocks, misses in the instruction cache or data cache, types of instructions decoded, or mispredicted branches. the count of such events can be used to trigger the performance monitor exception. additional performance monitor registers (pmrs) similar to sprs are used to configure and track performance monitor operations. these registers are accessed with the move to pmr and move from pmr instructions ( mtpmr and mfpmr ). see section 5.12, ?performance monitoring.? ? cache line lock and unlock. this apu allows instructions and data to be locked into their respective caches on a cache line basis. locking is performed by a set of touch-and-lock set instructions. this functionality can be enabled for user mode by setting msr[ucle]. the apu also provides resources for detecting and handling overlocking conditions. ? machine check. the machine check interrupt is treated as a separate level of interrupt. it uses its own save and restore registers (mcsrr0 and mcsrr1) and return from machine check interrupt ( rfmci ) instruction. see section 5.8, ?interrupts and exception handling.? ? single-precision embedded scalar and vector floating-point apus. these instructions are listed in the eref: a reference for freescale semiconductor book e and the e500 core . table 5-1. revision level-to-device marking cross-reference MPC8540 revision e500 core revision processor version register (pvr) system version register (svr) 1.0 1.0 0x8020_0010 0x8030_0010 2.0 2.0 0x8021_0010 0x8030_0020
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 5-6 freescale semiconductor core complex overview ? signal processing engine apu (spe apu). note that the spe is not a separate unit; spe computational and logical instructions are executed in the simple and multiple-cycle units used by all other computational and logical instructions, and 64-bit loads and stores are executed in the common lsu. figure 5-1 shows how execution logic for su1, the mu, and the lsu is replicated to support operations on the upper halves of the gprs. the e500 register set is modified as follows: ? gprs are widened to 64 bits to support 64-bit load, store, and merge operations. note that the upper 32 bits are affected only by 64-bit instructions. ? a 64-bit accumulator (acc) has been added. ? the signal processing and embedded floating-point status and control register (spefscr) provides interrupt control and status for spe and embedded floating-point instructions. these registers are shown in figure 5-6 . spe instructions are grouped as follows: ? single-cycle integer add and subtract with the same latencies for spe apu operations as for the 32-bit equivalent ? single-cycle logical operations ? single-cycle shift and rotate ? four-cycle integer pipelined multiplies ? 4-, 11-, 19-, and 35-cycle integer divides ? if r a or r b is zero, a floating-point divide takes 4 cycles. all other cases take 29 cycles. ? 4-cycle simd pipelined multiply-accumulate (mac) ? 64-bit accumulator for no-stall mac operations ? 64-bit loads and stores ? 64-bit merge instructions  cache structure?separate 32-kbyte, 32-byte line, 8-way set-associative level 1 instruction and data caches ? 1.5-cycle cache array access, 3-cycle load-to-use latency ? pseudo-lru (plru) replacement algorithm ? copy-back data cache that can function as a write-through cache on a page-by-page basis ? supports all book e memory coherency modes ? supports eis-defined cache-locking instructions, as listed in table 5-3  dual-issue superscalar control ? two-instructions-per-clock peak issue rate
features MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 5-7 ? precise exception handling  decode unit ? 12-entry instruction queue (iq) ? full hardware detection of interlocks ? decodes as many as two instructions per cycle ? decode serialization control ? register dependency resolution and renaming  branch prediction unit (bpu) ? dynamic branch prediction using a 512-entry, four-way set-associative branch target buffer (btb) supported by the e500 btb instructions listed in table 5-5 . ? branch prediction is handled in the fetch stages.  completion unit ? as many as 14 instructions allowed in 14-entry completion queue (cq) ? in-order retirement of as many as two instructions per cycle ? completion and refetch serialization control ? synchronization for all instruction flow changes?interrupts, mispredicted branches, context-synchronizing instructions  issue queues ? two-entry branch instruction issue queue (biq) ? four-entry general instruction issue queue (giq)  branch unit?the branch unit (bu) is an execution unit and is distinct from the bpu. it executes (resolves) all branch and cr logical instructions.  two simple units (su1 and su2) ? add and subtract ? shift and rotate ? logical operations ? support for 64-bit signal processing engine apu instructions in su1  multiple-cycle unit (mu)?the mu is shown in figure 5-2 .
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 5-8 freescale semiconductor core complex overview figure 5-2. four-stage mu pipeline, showing divide bypass the mu has the following features: ? four-cycle latency for all multiplication, including spe integer and fractional multiply instructions and embedded scalar and vector floating-point multiply instructions ? variable-latency divide: 4, 11, 19, and 35 cycles for all integer divide instructions. if r a or r b is zero, floating-point divide instructions take 4 cycles. all others take 29. note that although most divide instructions take more than 4 cycles to execute, the mu allows subsequent multiply instructions to execute through all four mu stages in parallel with the divide. ? four-cycle floating-point add and subtract  load/store unit (lsu) is shown in figure 5-3 . upper lower mu-3 mu-1 mu-2 divide bypass path postdivide divide reservation station from giq0 or giq1 mu-4
features MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 5-9 figure 5-3. three-stage load/store unit the lsu has the following features: ? 3-cycle load latency ? fully pipelined ? the load miss queue allows up to four load misses before stalling. ? load hits can continue to be serviced when the load miss queue is full. ? seven-entry l1 store queue allows full pipelining of stores ? the three-entry data line fill buffer is used for loads and cacheable stores. stores are allocated here so loads can access data from the store immediately. ? the data write buffer contains three entries: one dedicated for snoop pushes, one dedicated for cast outs, and one that can be used for snoop pushes or cast outs.  cache coherency ? supports four-state cache coherency: modified-exclusive, exclusive, shared, and invalid (mesi) ? bus support for hardware-enforced coherency (bus snooping)  core complex bus (ccb)?internal bus ? high-speed, on-chip local bus with data tagging ? 32-bit address bus ? address protocol with address pipelining and retry/copyback derived from bus used by previous generations of powerpc processors (referred to as the 60x bus) ? two general-purpose read data buses and one write data bus reservation station load/store unit (64-/32-bit) load data line fill buffer data write buffer l1 store queue miss queue to core interface unit to data cach e to gpr operand bus to completion queue to g p r s three-stage pipeline queues and buffers
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 5-10 freescale semiconductor core complex overview  extended exception handling ? supports book e interrupt model ? less than 10-cycle interrupt latency ? interrupt vector prefix register (ivpr) ? vector offset registers (ivors) 0?15 as defined in book e, plus e500-defined ivors 32?35 ? exception syndrome register (esr) ? book e-defined preempting critical interrupt, including critical interrupt status registers (csrr0 and csrr1) and an rfci instruction ? e500-specific interrupts not defined in book e architecture ? machine-check apu ? spe apu unavailable exception ? floating-point data exception ? floating-point round exception ? performance monitor  memory management unit (mmu) ? 32-bit effective address translated to 32-bit real address (using a 41-bit interim virtual address) ? tlb entries for variable (4-kbyte?256-mbyte) and fixed-size (4-kbyte) pages ? data l1 mmu ? 4-entry, fully associative tlb array for variable-sized pages ? 64-entry, 4-way set-associative tlb for 4-kbyte pages ? instruction l1 mmu ? 4-entry, fully associative tlb array for variable-sized pages ? 64-entry, 4-way set-associative tlb for 4-kbyte pages ? unified l2 mmu ? 16-entry, fully associative tlb array for variable-sized pages ? a 256-entry, 2-way set-associative unified (for instruction and data accesses) l2 tlb array (tlb0) supports only 4-kbyte pages ? software reload for tlbs ? virtual memory support for as much as 4 gbytes (2 32 ) of effective address space ? real memory support for as much as 4 gbytes (2 32 ) of physical memory ? support for big-endian and true little-endian memory on a per-page basis  power management
features MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 5-11 ? low-power, 1.5-v design ? internal clock multipliers ranging from 1 to 8 times the bus clock, including integer and half-mode multipliers. the MPC8540 supports multipliers of 2, 2.5, 3, and 3.5. ? power-saving modes: core-halted and core-stopped ? dynamic power management of execution units, caches, and mmus ? nap, doze, and sleep bits in hid0 can be used to assert nap , doze , and sleep output signals to initiate power-saving modes at the integrated device level.  testability ? lssd scan design ? jtag interface ? esp support ? abist for arrays ?lbist  reliability and serviceability ? parity checking on caches ? parity checking on e500 local bus
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 5-12 freescale semiconductor core complex overview 5.4 instruction set the e500 implements the following instructions:  the book e instruction set for 32-bit implementations. this is composed primarily of the user-level instructions defined by the powerpc user instruction set architecture (uisa). the e500 does not include book e floating-point, load string, or store string instructions.  the e500 supports the following implementation-specific instructions: ? integer select apu. this apu consists of the integer select instruction ( isel ), which functions as an if - then-else statement that selects between two source registers by comparison to a cr bit. this instruction eliminates conditional branches, decreases band latency, and reduces the code footprint. ? performance monitor apu. table 5-2 lists performance monitor apu instructions. ? cache line lock and unlock apu. the cache block lock and unlock apu consists of the instructions described in table 5-3 . ? machine check apu. this apu defines the return from machine check interrupt instruction ( rfmci ). ? spe apu vector instructions. new vector instructions are defined that view the 64-bit gprs as being composed of a vector of two 32-bit elements (some of the instructions also read or write 16-bit elements). some scalar instructions are defined for dsp that produce a 64-bit scalar result. ? the embedded floating-point apus provide single-precision scalar and vector floating-point instructions. scalar floating-point instructions use only the lower 32 bits of the gprs for single-precision floating-point calculations. table 5-4 lists embedded floating-point instructions. table 5-2. performance monitor apu instructions name mnemonic syntax move from performance monitor register mfpmr r d,pmrn move to performance monitor register mtpmr pmrn, r s table 5-3. cache block lock and unlock apu instructions name mnemonic syntax data cache block lock clear dcblc ct, r a, r b data cache block touch and lock set dcbtls ct, r a, r b data cache block touch for store and lock set dcbtstls ct, r a, r b instruction cache block lock clear icblc ct, r a, r b instruction cache block touch and lock set icbtls ct, r a, r b
instruction set MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 5-13 ? btb locking apu instructions. the core complex provides a 512-entry btb for efficient processing of branch instructions. the btb is a branch target address cache, organized as 128 rows with four-way set associativity, that holds the address and target instruction of the 512 most-recently taken branches. table 5-5 lists btb instructions. table 5-4. scalar and vector embedded floating-point apu instructions instruction mnemonic syntax scalar vector convert floating-point from signed fraction efscfsf evfscfsf r d ,r b convert floating-point from signed integer efscfsi evfscfsi r d ,r b convert floating-point from unsigned fraction efscfuf evfscfuf r d ,r b convert floating-point from unsigned integer efscfui evfscfui r d ,r b convert floating-point to signed fraction efsctsf evfsctsf r d ,r b convert floating-point to signed integer efsctsi evfsctsi r d ,r b convert floating-point to signed integer with round toward zero efsctsiz evfsctsiz r d ,r b convert floating-point to unsigned fraction efsctuf evfsctuf r d ,r b convert floating-point to unsigned integer efsctui evfsctui r d ,r b convert floating-point to unsigned integer with round toward zero efsctuiz evfsctuiz r d ,r b floating-point absolute value efsabs evfsabs r d ,r a floating-point add efsadd evfsadd r d ,r a ,r b floating-point compare equal efscmpeq evfscmpeq cr d ,r a ,r b floating-point compare greater than efscmpgt evfscmpgt cr d ,r a ,r b floating-point compare less than efscmplt evfscmplt cr d ,r a ,r b floating-point divide efsdiv evfsdiv r d ,r a ,r b floating-point multiply efsmul evfsmul r d ,r a ,r b floating-point negate efsneg evfsneg r d ,r a floating-point negative absolute value efsnabs evfsnabs r d ,r a floating-point subtract efssub evfssub r d ,r a ,r b floating-point test equal efststeq evfststeq cr d ,r a ,r b floating-point test greater than efststgt evfststgt cr d ,r a ,r b floating-point test less than efststlt evfststlt cr d ,r a ,r b table 5-5. btb locking apu instructions name mnemonic syntax branch buffer load entry and lock set bblels ? branch buffer entry lock reset bbelr ?
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 5-14 freescale semiconductor core complex overview 5.5 instruction flow the e500 core is a pipelined, superscalar processor with parallel execution units that allow instructions to execute out of order but record their results in order. pipelining breaks instruction processing into discrete stages, so multiple instructions in an instruction sequence can occupy the successive stages: as an instruction completes one stage, it passes to the next, leaving the previous stage available to a subsequent instruction. so, even though it may take multiple cycles for an instruction to pass through all of the pipeline stages, once a pipeline is full, instruction throughput is much shorter than the latency. a superscalar processor is one that issues multiple independent instructions into separate execution units, allowing parallel execution. the e500 core has five execution units, one each for branch (bu), load/store (lsu), and multiple-cycle operations (mu), and two for simple arithmetic (su1 and su2). the mu and su1 arithmetic execution units also execute 64-bit spe vector instructions, using both the lower and upper halves of the 64-bit gprs. the parallel execution units allow multiple instructions to execute in parallel and out of order. for example, a low-latency addition instruction that is issued to an su after an integer divide is issued to the mu should finish executing before the higher latency divide instruction. the add instruction can make its results available to a subsequent instruction, but it cannot update the architected gpr specified as its target operand ahead of the multiple-cycle divide instruction. 5.5.1 initial instruction fetch the e500 core begins execution at fixed virtual address 0xffff_fffc. the mmu has a default page translation which maps this to the identical physical address. so, the instruction at physical address 0xffff_fffc must be a branch to another address within the 4-kbyte boot page. 5.5.2 branch detection and prediction to improve branch performance, the e500 provides an implementation-specific dynamic branch prediction using the btb to resolve branch instructions and improve the accuracy of branch predictions. each of the 512 entries in the four-way set associative address cache of branch target addresses includes a 2-bit saturating branch history counter, whose value is incremented or decremented depending on whether the branch was taken. these bits can take four values indicating strongly taken, weakly taken, weakly not taken, and strongly not taken. the btb is used not only to predict branches, but to detect branches during the fetch stage, offering an efficient way to access instruction streams for branches predicted as taken. in the e500, all branch instructions are assigned positions in the completion queue at dispatch. speculative instructions in branch target streams are allowed to execute and proceed through the completion queue, although they can complete only after the branch prediction is resolved as correct and after the branch instruction itself completes.
instruction flow MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 5-15 if a branch resolves as correct, instructions in the target stream are marked nonspeculative and are allowed to complete. if the branch history bits in the btb indicated weakly taken or weakly not taken, the prediction is upgraded to strongly taken or strongly not taken. if a branch resolves as incorrect, instructions in the target stream are flushed from the execution pipeline, the branch history bits are updated in the btb entry, and nonspeculative fetching begins from the correct path. 5.5.3 e500 execution pipeline the seven stages of the e500 execution pipeline?fetch1, fetch2/predecode, decode/dispatch, issue, execute, complete, and write back?are highlighted in grey in figure 5-4 . figure 5-4. instruction pipeline flow decode stage su1 maximum four-instruction bu bu su2 fetch per clock cycle fetch stage 1 fetch stage 2 completion stage write-back stage general issue queue (giq) execute stage maximum two-instruction completion per clock cycle lsu stage 1 stage 2 stage 3 mu stage 1 stage 2 stage 3 stage 4 at dispatch, instructions are deallocated from the iq and assigned sequential positions in the cq. instruction cache maximum two-instruction per cycle dispatch to the issue queues. biq can accept one per cycle; giq can accept at most two. issue stage divide bypass postdivide divide execute finish indicates stages branch issue queue (biq)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 5-16 freescale semiconductor core complex overview the common pipeline stages are as follows:  instruction fetch?includes the clock cycles necessary to request an instruction and the time the memory system takes to respond to the request. instructions retrieved are latched into the instruction queue (iq) for subsequent consideration by the dispatcher. instruction fetch timing depends on many variables, such as whether an instruction is in the on-chip instruction cache or an l2 cache (if implemented). those factors increase when it is necessary to fetch instructions from system memory and include the processor-to-bus clock ratio, the amount of bus traffic, and whether any cache coherency operations are required. because there are so many variables, unless otherwise specified, the instruction timing examples in this chapter assume optimal performance and show the portion of the fetch stage in which the instruction is in the instruction queue. the fetch1 and fetch2 stages are primarily involved in retrieving instructions.  the decode/dispatch stage fully decodes each instruction; most instructions are dispatched to the issue queues (however, isync , rfi , sc , nop s, and some other instructions do not go to issue queues).  the two issue queues, biq and giq, can accept as many as one and two instructions, respectively, in a cycle. the behavior of instruction dispatch is covered in significant detail in the e500 software optimization guide . the following is a simplification that covers most cases: ? instructions dispatch only from the two lowest iq entries?iq0 and iq1. ? a total of two instructions can be dispatched to the issue queues per clock cycle. ? space must be available in the cq for an instruction to decode and dispatch (this includes instructions that are assigned a space in the cq but not in an issue queue). dispatch is treated as an event at the end of the decode stage. the issue stage reads source operands from rename registers and register files and determines when instructions are latched into the execution unit reservation stations. note that the e500 has 14 rename registers, one for each completion queue entry, so instructions cannot stall because of a shortage of rename registers. the general behavior of the two issue queues is described as follows: ? the giq accepts as many as two instructions from the dispatch unit per cycle. su1, su2, mu, and all lsu instructions (including 64-bit loads and stores) are dispatched to the giq, shown in figure 5-5 .
instruction flow MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 5-17 figure 5-5. gpr issue queue (giq) instructions can be issued out-of-order from the bottom two giq entries (giq1?giq0). giq0 can issue to su1, mu, and lsu. giq1 can issue to su2, mu, and lsu. note that su2 executes a subset of the instructions that can be executed in su1. the ability to identify and dispatch instructions to su2 increases the availability of su1 to execute more computational-intensive instructions. an instruction in giq1 destined for su2 or the lsu need not wait for an mu instruction in giq0 that is stalled behind a long-latency divide.  the execute stage accepts instructions from its issue queue when the appropriate reservation stations are not busy. in this stage, the operands assigned to the execution stage from the issue stage are latched. the execution unit executes the instruction (perhaps over multiple cycles), writes results on its result bus, and notifies the cq when the instruction finishes. the execution unit reports any exceptions to the completion stage. instruction-generated exceptions are not taken until the excepting instruction is next to retire. most integer instructions have a 1-cycle latency, so results of these instructions are available 1 clock cycle after an instruction enters the execution unit. the mu and lsu are pipelined, as shown in figure 5-4 . branches resolve in execute stage. if a branch is mispredicted, it takes 5 cycles for the next instruction to reach the execute stage.  the complete and write-back stages maintain the correct architectural machine state and commit results to the architecture-defined registers in the proper order. if completion logic detects an instruction containing an exception status or a mispredicted branch, all following instructions are cancelled, their execution results in rename registers are discarded, and the correct instruction stream is fetched. the complete stage ends when the instruction is retired. two instructions can be retired per clock cycle. if no dependencies exist, as many as two instructions are retired in program order. the write-back stage occurs in the clock cycle after the instruction is retired. the e500 core also provides new instructions that perform single-instruction, multiple-data (simd) operations. these signal processing instructions consist of parallel operations on both the giq1 giq3 giq0 giq2 to su2, mu, or lsu from iq0/iq1 to su1, mu, or lsu
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 5-18 freescale semiconductor core complex overview upper and lower 32 bits of two 64-bit gpr values and produce two 32-bit results written to a 64-bit gpr. as shown in figure 5-4 , the lsu, mu, and su1 replicate logic to support 64-bit operations. although a vector instruction generates separate, discrete results in the upper and lower halves of the target gpr, latency and throughput for vector instructions are the same as those for their scalar equivalents. 5.6 programming model the following section describes the e500 core registers defined in book e, the freescale semiconductor book e implementation standards (eis), and registers that are specific to the e500. table 5-6 shows the e500 register set.
programming model MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 5-19 figure 5-6. e500 core programming model user-level registers general-purpose registers instruction-accessible registers user general spr (read/write) 0 31 32 63 0 31 32 63 32 63 user spr general 0 1 1 usprg0 is a separate physical register from sprg0. (upper) gpr0 2 (lower) 2 the 64-bit gpr registers are accessed by the spe as separate 32-bit registers by spe instructions. only spe vector instructions can access the upper word. general- purpose registers cr condition register spr 256 usprg0 gpr1 spr 9 ctr count register general sprs (read-only) gpr2 spr 8 lr link register spr 259 sprg3 spr general registers 3?7 gpr31 spr 260 sprg4 spr 1 xer integer exception register ? ? ? performance monitor registers (read-only pmrs) spr 512 spefscr 3 3 these registers are defined by the eis and are not part of the book e architecture. spe fp status/control register spr 263 sprg7 acc 3 accumulator time-base registers (read-only) global control register pmr 384 upmgc0 3 miscellaneous registers spr 268 tbl time base lower/upper pmr 0?3 upmcs 3 counter registers 0?3 spr 269 tbu spr 513 bbear 3 branch buffer entry address register pmr 128?131 upmlcas 3 local control registers a0?a3 l1 cache (read-only) spr 514 bbtar 3 branch buffer target address register l1 cache configuration registers 0?1 pmr 256?259 upmlcbs 3 local control registers b0?b3 spr 515 l1cfg0 3 spr 516 l1cfg1 3 supervisor-level registers interrupt registers configuration registers 32 63 32 63 32 63 spr 63 ivpr interrupt vector prefix spr 400 ivor0 interrupt vector offset registers 0?15 msr machine state spr 401 ivor1 spr 26 srr0 save/restore registers 0/1 spr 1023 scr system version ? ? ? spr 27 srr1 spr 415 ivor15 spr 286 pir processor id spr 58 csrr0 critical srr 0/1 processor version spr 528 ivor32 3 interrupt vector offset registers 32?35 spr 287 pvr spr 59 csrr1 spr 529 ivor33 3 timer/decrementer registers spr 570 mcsrr0 3 machine check srr 0/1 spr 530 ivor34 3 spr 571 mcsrr1 3 spr 531 ivor35 3 spr 22 dec decrementer exception syndrome register spr 62 esr mmu control and status (read/write) decrementer auto-reload spr 54 decar mmu control and status register 0 spr 572 mcsr 3 machine check syndrome register spr 1012 mmucsr0 3 spr 284 tbl time base lower/upper spr 573 mcar machine check address register spr 624 mas0 3 mmu assist registers 0?4 and 6 spr 285 tbu spr 625 mas1 3 spr 61 dear data exception address register spr 340 tcr timer control spr 626 mas2 3 spr 627 mas3 3 spr 336 tsr timer status debug registers spr 628 mas4 3 miscellaneous registers spr 308 dbcr0 debug control registers 0?2 spr 630 mas6 3 spr 309 dbcr1 spr 1008 hid0 3 hardware implementation dependent 0?1 spr 48 pid0 process id registers 0?2 spr 310 dbcr2 spr 1009 hid1 3 spr 633 pid1 3 spr 304 dbsr debug status register spr 634 pid2 3 spr 1013 bucsr 4 4 these registers are e500-specific. branch control and status register spr 312 iac1 instruction address compare registers 1?4 mmu control and status (read only) spr 272?279 sprg0?7 general sprs 0?7 spr 313 iac2 spr 1015 mmucfg 3 mmu configuration performance monitor registers data address compare registers 1 and 2 spr 316 dac1 spr 688 tlb0cfg 3 tlb configuration 0/1 pmr 400 pmgc0 3 global control spr 317 dac2 spr 689 tlb1cfg 3 pmr 16?19 pmc0?3 3 counter registers 0?3 spr 318 dvc1 data value compare registers 1 and 2 l1 cache (read/write) spr 319 dvc2 pmr 144?147 pmca0?3 3 local control a0?a3 spr 1010 l1csr0 3 l1 cache control/ status 0/1 pmr 272?275 pmcb0?3 3 local control b0?b3 spr 1011 l1csr1 3
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 5-20 freescale semiconductor core complex overview 5.7 on-chip cache implementation the core complex contains separate 32-kbyte, eight-way set-associative, level 1 (l1) instruction and data caches to give rapid access to instructions and data. the data cache supports four-state mesi memory coherency protocol with 3-bit status and 1-bit coherency valid fields. the core complex broadcasts all cache management functions based on the setting of the address broadcast enable bit, hid1[abe], allowing management of other caches in the system. on the MPC8540 the abe bit must be set to ensure that cache and tlb management instructions operate properly on the l2 cache. the caches implement a pseudo-least-recently-used (plru) replacement algorithm. parity generation and checking may be enabled for both caches, and each cache can be independently invalidated through l1csr1 and l1csr0. additionally, instructions are provided to perform cache locking and unlocking on both data and instruction caches on a cache-block granularity. these are listed in section 5.10.3, ?cache control instructions.? individual instruction cache lines and data cache lines can be invalidated using the icbi and dcbi instructions, respectively. the entire data cache can be invalidated by setting l1csr0[cfi]; the entire instruction cache can be invalidated by setting l1csr1[icfi]. 5.8 interrupts and exception handling the e500 core supports an extended exception handling model, with nested interrupt capability and extensive interrupt vector programmability. the following sections define the exception model, including an overview of exception handling as implemented on the e500 core, a brief description of the exception classes, and an overview of the registers involved in the processes. 5.8.1 exception handling in general, interrupt processing begins with an exception that occurs due to external conditions, errors, or program execution problems. when the exception occurs, the processor checks to verify interrupt processing is enabled for that particular exception. if enabled, the interrupt causes the state of the processor to be saved in the appropriate registers, and prepares to begin execution of the handler located at the associated vector address for that particular exception. once the handler is executing, the implementation may need to check one or more bits in the exception syndrome register (esr) or the spefscr, depending on the exception, to verify the specific cause of the exception and take appropriate action. the core complex provides the interrupts described in section 5.8.5, ?interrupt registers.?
interrupts and exception handling MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 5-21 5.8.2 interrupt classes all interrupts may be categorized as asynchronous/synchronous and critical/noncritical.  asynchronous interrupts (such as machine check, critical input, and external interrupts) are caused by events that are independent of instruction execution. for asynchronous interrupts, the address reported in a save/restore register is the address of the instruction that would have executed next had the asynchronous interrupt not occurred.  synchronous interrupts are those that are caused directly by the execution or attempted execution of instructions. synchronous inputs may be either precise or imprecise, which are described as follows: ? synchronous precise interrupts are those that precisely indicate the address of the instruction causing the exception that generated the interrupt or, in some cases, the address of the immediately following instruction. the interrupt type and status bits indicate which instruction is addressed in the appropriate save/restore register. ? synchronous imprecise interrupts are those that may indicate the address of the exception causing the exception that generated the interrupt, or some instruction after the instruction causing the interrupt. if the interrupt was caused by either the context synchronizing mechanism or the execution synchronizing mechanism, the address in the appropriate save/restore register is the address of the interrupt forcing instruction. if the interrupt was not caused by either of those mechanisms, the address in the save/restore register is the last instruction to start execution and may not have completed. no instruction following the instruction in the save/restore register has executed. 5.8.3 interrupt types the e500 core processes all interrupts as either machine check, critical, or noncritical types. separate control and status register sets are provided for each interrupt type. the core handles interrupts from these three types in the following priority order: 1. machine check interrupt (highest priority)?the e500 defines a separate set of resources for the machine check interrupt. they use the machine check save and restore registers (mcsrr0/mcsrr1) to save state when they are taken, and they use the rfmci instruction to restore state. these interrupts can be masked by the machine check enable bit, msr[me]. 2. noncritical interrupts?first-level interrupts that allow the processor to change program flow to handle conditions generated by external signals, errors, or unusual conditions arising from program execution or from programmable timer-related events. these interrupts are largely identical to those previously defined by the oea portion of the
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 5-22 freescale semiconductor core complex overview power pc architecture. they use save and restore registers (srr0/srr1) to save state when they are taken and they use the rfi instruction to restore state. asynchronous noncritical interrupts can be masked by the external interrupt enable bit, msr[ee]. 3. critical interrupts?critical interrupts can be taken during a noncritical interrupt or during regular program flow. they use the critical save and restore registers (csrr0/csrr1) to save state when they are taken and they use the rfci instruction to restore state. these interrupts can be masked by the critical enable bit, msr[ce]. book e defines the critical input, watchdog timer, and machine check interrupts as critical interrupts, but the e500 defines a third set of resources for the machine check interrupt, as described in table 5-6 . all interrupts except machine check are ordered within the two categories of noncritical and critical, such that only one interrupt of each category is reported, and when it is processed (taken), no program state is lost. because save/restore register pairs are serially reusable, program state may be lost when an unordered interrupt is taken. 5.8.4 upper bound on interrupt latencies core complex interrupt latency is defined as the number of core clocks between the sampling of the interrupt signal as asserted and the initiation of the ivor fetch (that is, the fetch of the first instruction in the handler). core complex interrupt latency is determinate unless a guarded load or a cache-inhibited stwcx. is being executed, in which case the latency is indeterminate. the minimum latency is 3 core clocks and the maximum is 8, not including the 2 bus clock cycles required to synchronize the interrupt signal from the pad. when an interrupt is taken, all instructions in the iq are thrown away except if the oldest instruction is a load/store instruction. that is, if an asynchronous interrupt is being serviced and the oldest instruction is not a load/store instruction, the core complex goes straight from sampling the interrupt to ensuring a recoverable state and issuing an exception. if a load/store instruction is oldest, the core complex waits 4 clocks before ensuring a recoverable state. during this time, any instruction finished by the lsu is deallocated. 5.8.5 interrupt registers the registers associated with interrupt and exception handling are described in table 5-6 . table 5-6. interrupt registers register description noncritical interrupt registers srr0 save/restore register 0?holds the address of the instruction causing the exception or the address of the instruction that will execute after the rfi instruction. srr1 save/restore register 1?holds machine state on noncritical interrupts and restores machine state after an rfi instruction is executed.
interrupts and exception handling MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 5-23 each interrupt has an associated interrupt vector address, obtained by concatenating the ivpr value with the address index in the associated ivor (that is, ivpr[32?47]||ivor n [48?59]||0b0000). the resulting address is that of the instruction to be executed when that interrupt occurs. ivpr and ivor values are indeterminate on reset, and must be initialized by the system software using mtspr . table 5-7 lists ivor registers implemented on the e500 and the associated interrupts. critical interrupt registers csrr0 critical save/restore register 0?on critical interrupts, holds either the address of the instruction causing the exception or the address of the instruction that will execute after the rfci instruction. csrr1 critical save/restore register 1?holds machine state on critical interrupts and restores machine state after an rfci instruction is executed. machine check interrupt registers mcsrr0 machine check save/restore register 0?used to store the address of the instruction that will execute after an rfmci instruction is executed. mcsrr1 machine check save/restore register 1?holds machine state on machine check interrupts and restores machine state (if recoverable) after an rfmci instruction is executed. mcar machine check address register?holds the address of the data or instruction that caused the machine check interrupt. mcar contents are not meaningful if a signal triggered the machine check interrupt. syndrome registers mcsr machine check syndrome register?holds machine state information on machine check interrupts and restores machine state after an rfmci instruction is executed. esr exception syndrome register?provides a syndrome to differentiate between the different kinds of exceptions that generate the same interrupt type. upon generation of a specific exception type, the associated bit is set and all other bits are cleared. spe apu interrupt registers spefsc r signal processing and embedded floating-point status and control register?provides interrupt control and status as well as various condition bits associated with the operations performed by the spe apu. other interrupt registers dear data exception address register?holds the address that was referenced by a load, store, or cache management instruction that caused an alignment, data tlb miss, or data storage interrupt. ivpr ivors together, ivpr[32?47]||ivor n [48?59]||0b0000 define the address of an interrupt-processing routine. see tab l e 5 -7 and the eref for more information. table 5-6. interrupt registers (continued) register description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 5-24 freescale semiconductor core complex overview 5.9 memory management the e500 core complex supports demand-paged virtual memory as well other memory management schemes that depend on precise control of effective-to-physical address translation and flexible memory protection as defined by book e. the mapping mechanism consists of software-managed tlbs that support variable-sized pages with per-page properties and permissions. the following properties can be configured for each tlb:  user mode page execute access  user mode page read access  user mode page write access  supervisor mode page execute access table 5-7. interrupt vector registers and exception conditions register interrupt book e?defined ivors ivor0 critical input ivor1 machine check interrupt offset ivor2 data storage interrupt offset ivor3 instruction storage interrupt offset ivor4 external input interrupt offset ivor5 alignment interrupt offset ivor6 program interrupt offset ivor7 floating-point unavailable interrupt offset ivor8 system call interrupt offset ivor9 auxiliary processor unavailable interrupt offset ivor10 decrementer interrupt offset ivor11 fixed-interval timer interrupt offset ivor12 watchdog timer interrupt offset ivor13 data tlb error interrupt offset ivor14 instruction tlb error interrupt offset ivor15 debug interrupt offset e500-specific ivors ivor32 spe apu unavailable interrupt offset ivor33 spe floating-point data exception interrupt offset ivor34 spe floating-point round exception interrupt offset ivor35 performance monitor
memory management MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 5-25  supervisor mode page read access  supervisor mode page write access  write-through required (w)  caching inhibited (i)  memory coherence required (m) (ignored on the MPC8540)  guarded (g)  endianess (e)  user-definable (u0?u3), a 4-bit implementation-specific field the core complex employs a two-level memory management unit (mmu) architecture. there are separate instruction and data level-1 (l1) mmus backed up by a unified level-2 (l2) mmu, as shown in figure 5-7 . figure 5-7. mmu structure level-1 mmus have the following features:  four-entry, fully associative tlb array that supports all nine page sizes  64-entry, 4-way set-associative tlb 4-kbyte array that supports 4-kbyte pages only l2 mmus 256-entry tlb array 16-entry (tlb0) tlb array (tlb1) unified l1 data mmu 64-entry d-l1tlb4k 4-entry d-l1vsp l1 instruction mmu 64-entry i-l1tlb4k 4-entry i-l1vsp 32-kbyte i-cache memory unit ta g s ta g s 32-kbyte d-cache mas registers t o instruction unit instruction line fill buffer t o load/store unit core interface data line fill buffer
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 5-26 freescale semiconductor core complex overview  hardware partially managed by l2 mmu  supports snooping of tlbs by both internal and external tlbivax instructions the level-2 mmu has the following features:  a 16-entry, fully associative l2 tlb array (tlb1) that supports all nine page sizes  256-entry, 2-way set-associative tlb array (tlb0) that supports only 4-kbyte pages  hardware assist for tlb miss exceptions  software managed by tlbre , tlbwe , tlbsx , tlbsync , tlbivax , and mtspr instructions  supports snooping of tlb by both internal and external tlbivax instructions 5.9.1 address translation the core complex fetch and load/store units generate 32-bit effective addresses. the mmu translates these addresses to real 32-bit addresses (which are used for memory bus accesses) using an interim 41-bit virtual address. figure 5-8 shows the translation flow. figure 5-8. effective-to-real address translation flow the appropriate l1 mmu (instruction or data) is checked for a matching address translation. the instruction l1 mmu and data l1 mmu operate independently and can be accessed in parallel, so that hits for instruction accesses and data accesses can occur in the same clock. if an l1 mmu misses, the request for translation is forwarded to the unified (instruction and data) l2 mmu. if found, the contents of the tlb entry are concatenated with the byte address to obtain the physical address of the requested access. on misses, the l1 tlb entries are replaced from their l2 tlb counterparts using a true lru algorithm. effective page number byte address real page number byte address 32-bit effective address (ea) 32-bit real address 15?20 bits* > 12 bits* 15?20 bits* > 12 bits* three 41-bit virtual addresses (vas) l1 mmus instruction l1 mmu data l1 mmu 2 tlbs 2 tlbs * number of bits depends on page size (4 kbytes?128 mbytes) as 8 bits pid0 pid1 pid2 l2 mmu (unified) 16-entry fully-assoc. vsp array (tlb1) 256-entry 2-way set assoc. array (tlb0)
memory management MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 5-27 5.9.2 mmu assist registers (mas1?mas4 and mas6) book e defines spr numbers for the mmu assist registers, which are used to hold values either read from or to be written to the tlbs and information required to identify the tlb to be accessed. to ensure consistency among freescale semiconductor book e processors, certain aspects of the implementation are defined by the freescale semiconductor book e standard, whereas more specific details are left to individual implementations. mas3 implements the real page number (rpn), the user attribute bits (u0?u3), and permission bits (ux, sx, uw, sw, ur, sr) that specify user and supervisor read, write, and execute permissions. the e500 does not implement mas5. mas registers are affected by the following instructions:  mas registers are accessed with the mtspr and mfspr instructions.  the tlb read entry instruction ( tlbre ) causes the contents of a single tlb entry from the l2 mmu to be placed in defined locations in mas0?mas3. the tlb entry to be extracted is determined by information written to mas0 and mas2 before the tlbre instruction is executed.  the tlb write entry instruction ( tlbwe ) causes the information stored in certain locations of mas0?mas3 to be written to the tlb specified in mas0.  the tlb search indexed instruction ( tlbsx ) updates mas registers conditionally, based on success or failure of a lookup in the l2 mmu. the lookup is specified by the instruction encoding and specific search fields in mas6. the values placed in the mas registers may differ, depending on a successful or unsuccessful search. for tlb miss and certain mmu-related dsi/isi exceptions, mas4 provides default values for updating mas0?mas2. 5.9.3 process id registers (pid0?pid2) the e500 core complex also implements three process id (pid) registers that hold the values used to construct the three virtual addresses for each access. these process ids provide an extended page sharing capability. which of these three virtual addresses is used is controlled by the tid field of a matching tlb entry, and when tid = 0x00 (identifying a page as globally shared), the pid values are ignored. a hit to multiple tlb entries in the l1 mmu (even if they are in separate arrays) or a hit to multiple entries in the l2 mmu is considered to be a programming error. 5.9.4 tlb coherency the core complex provides the ability to invalidate a tlb entry as defined in the book e architecture. the tlbivax instruction invalidates a matching local tlb entry. execution of this
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 5-28 freescale semiconductor core complex overview instruction is also broadcast on the core complex bus (ccb) if hid1[abe] is set. the core complex also snoops tlb invalidate transactions on the ccb from other bus masters. on the MPC8540 the abe bit must be set to ensure that cache and tlb management instructions operate properly on the l2 cache. 5.10 memory coherency the core complex supports both three- and four-state memory coherency. memory coherency is hardware-supported on the system bus through bus snooping and the retry/copyback bus protocol, and through broadcasting of cache management instructions. translation coherency is also hardware-supported through broadcasting and bus snooping of tlb invalidate transactions. the four-state mesi protocol supports efficient large-scale real-time data sharing between multiple caching bus masters. 5.10.1 atomic update memory references the e500 core supports atomic update memory references for both aligned word forms of data using the load and reserve and store conditional instruction pair, lwarx and stwcx. . typically, a load and reserve instruction establishes a reservation and is paired with a store conditional instruction to achieve the atomic operation. however, there are restrictions and requirements for this functionality. because the processor revokes reservations during context switches, the programmer must reacquire the reservation after a context switch to maintain reservations across context switches. 5.10.2 memory access ordering the core complex supports weakly ordered references to memory. thus the e500 manages the order and synchronization of instructions to ensure proper execution when memory is shared between multiple processes or programs. the cache and data memory control attributes along with msync and mbar provide the required access control. 5.10.3 cache control instructions the core complex supports book e instructions for performing a full range of cache control functions, including cache locking by line. the core complex supports broadcasting and snooping of these cache control instructions on the ccb. the e500 core also supports the following e500-specific cache locking instructions:  data cache block lock clear ( dcblc )  data cache block touch-and-lock set ( dcbtls )  data cache block touch for store and lock set ( dcbtstls )
core complex bus (ccb) MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 5-29  instruction cache block lock clear ( icblc )  instruction cache block touch-and-lock set ( icbtls ) 5.10.4 programmable page characteristics cache and memory attributes are programmable on a per-page basis. in addition to the write-through, caching-inhibited, memory coherency enforce, and guarded characteristic defined by the wimg bits, book e defines an endianness bit, e, that allows selection of big- or little-endian byte ordering on a per-page basis. in addition to the wimge bits, the book e mmu model defines user-definable page attribute bits (u0?u3). 5.11 core complex bus (ccb) the core complex defines a versatile local bus interface that allows a wide range of system performance and system-complexity trade-offs. the interface defines the following buses.  an address-out bus for mastering bus transactions  an address-in bus for snooping internal resources  three tagged data buses two of the data buses are general-purpose data-in buses for reads, and the third is a data-out bus for writes. the two data-in buses feature support for out-of-order read transactions from two different sources simultaneously, and all three data buses may be operated concurrently. the address-in bus supports snooping for external management of the l1 caches and tlbs by other bus masters. the core complex broadcasts and snoops the cache and tlb management instructions accordingly. it is envisioned that a wide range of system implementations can be constructed from the defined interface. 5.12 performance monitoring the e500 core provides a performance monitoring capability that allows counting of events such as processor clocks, instruction cache misses, data cache misses, mispredicted branches, and others. the count of these events may be configured to trigger a performance monitor exception following the e500 interrupt model. this interrupt is assigned to vector offset register ivor35. the register set associated with the performance monitoring function consists of counter registers, a global control register, and local control registers. these registers are read/write from supervisor mode, and each register is reflected to a corresponding read-only register for user mode. two instructions, mtpmr and mfpmr , are provided for moving data to and from these registers. an overview of the performance monitoring registers is provided in the following sections.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 5-30 freescale semiconductor core complex overview 5.12.1 global control register the pmgc0 register provides global control of the performance monitoring facility from supervisor mode. from this register all counters may be frozen, unfrozen, or configured to freeze on an enabled condition or event. additionally, the performance monitoring facility may be disabled or enabled from this register. the contents of pmgc0 are reflected to upmgc0 which may be read from user mode using the mfpmr instruction. 5.12.2 performance monitor counter registers there are four counter registers (pcm0?pcm3) provided in the performance monitoring facility. these 32-bit registers hold the current count for software selectable events and can be programmed to generate an exception on overflow. these registers may be written or read from supervisor mode using the mtpmr and mfpmr instructions. the contents of these registers are reflected to upcm0?upcm3, which can be read from user mode with mfpmr . performance monitor exceptions occur only if all of the following conditions are met:  a counter is in the overflow state  the counter's overflow signalling is enabled  overflow exception generation is enabled in pmgc0  msr[ee] is set 5.12.3 local control registers for each of the counter registers, there are two corresponding local control registers. these two registers specify which of the 128 available events is to be counted, what specific action is to be taken on overflow, and various options for freezing a counter value under given modes or conditions.  pmlca0?pmlca3 provide fields that allow freezing of the corresponding counter in user mode, supervisor mode, or under software control. additionally, the overflow condition may be enabled or disabled from this register. the contents of these registers are reflected to upmcla0?upmlca3, which can be read from user mode with mfpmr .  pmlcb0?pmlcb3 provide count scaling for each counter register using configurable threshold and multiplier values. the threshold is a 6-bit value and the multiplier is a 3-bit encoded value, allowing eight multiplier values in the range of 1 to 128. any counter may be configured to increment only when an event occurs more than [threshold multiplier] times. the contents of these registers are reflected to upmclb0?upmlcb3, which can be read from user mode with mfpmr .
legacy support of powerpc architecture MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 5-31 5.13 legacy support of powerpc architecture this section provides an overview of the architectural differences and compatibilities of the e500 core compared with the aim powerpc architecture. the two levels of the e500 programming environment are as follows:  user level?this defines the base user-level instruction set, user-level registers, data types, memory conventions, and the memory and programming models seen by application programmers.  supervisor level?this defines supervisor-level resources typically required by an operating system, the memory management model, supervisor level registers, and the exception model. in general, the e500 core supports the user-level architecture from the existing aim architecture. the following subsections are intended to highlight the main differences. for specific implementation details refer to the relevant chapter. 5.13.1 instruction set compatibility the following sections generally describe the user and supervisor instruction sets. 5.13.1.1 user instruction set the e500 core executes legacy user-mode binaries and object files except for the following:  the e500 supports vector and scalar single-precision floating-point operations as apus. these instructions have different encoding than the aim definition of the powerpc architecture. additionally, the e500 core uses gprs for floating-point operations, rather than the fprs defined by the uisa. most porting of floating-point operations can be handled by recompiling.  string instructions are not implemented on the e500; therefore, trap emulation must be provided to ensure backward compatibility. 5.13.1.2 supervisor instruction set the supervisor mode instruction set defined by the aim version of the powerpc architecture is compatible with the e500 with the following exceptions:  the mmu architecture is different, so some tlb manipulation instructions have different semantics.  instructions that support the bats and segment registers are not implemented.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 5-32 freescale semiconductor core complex overview 5.13.2 memory subsystem both book e and the aim version of the powerpc architecture provide separate instruction and data memory resources. the e500 provides additional cache control features, including cache locking. 5.13.3 exception handling exception handling is generally the same as that defined in the aim version of the powerpc architecture for the e500, with the following differences:  book e defines a new critical interrupt, providing an extra level of interrupt nesting. the critical interrupt includes external critical and watchdog timer time-out inputs.  the machine check exception differs from the book e and from the aim definition. it defines the return from machine check interrupt instruction, rfmci , and two machine check save/restore registers, mcsrr0 and mcsrr1.  book e processors can use ivpr and ivors to set exception vectors individually, but they can be set to the address offsets defined in the oea to provide compatibility.  unlike the aim version of the powerpc architecture, book e does not define a reset vector; execution begins at a fixed virtual address, 0xffff_fffc.  some book e and e500-specific sprs are different from those defined in the aim version of the powerpc architecture, particularly those related to the mmu functions. much of this information has been moved to a new exception syndrome register (esr).  timer services are generally compatible, although book e defines a new decrementer auto reload feature, the fixed-interval timer critical interrupt, and the watchdog timer interrupt, which are implemented in the e500 core. an overview of the interrupt and exception handling capabilities of the e500 core can be found in section 5.8, ?interrupts and exception handling.? 5.13.4 memory management the e500 core implements a straightforward virtual address space that complies with the book e mmu definition, which eliminates segment registers and block address translation resources. book e defines resources for fixed 4-kbyte pages and multiple, variable page sizes that can be configured in a single implementation. tlb management is provided with new instructions and sprs. 5.13.5 reset book e?compliant cores do not share a common reset vector with the aim version of the powerpc architecture. instead, at reset fetching begins at address 0xffff_fffc. in addition to
powerquicc iii implementation details MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 5-33 the book e reset definition, the eis and the e500 define specific aspects of the mmu page translation and protection mechanisms. unlike the aim version of the powerpc core, as soon as instruction fetching begins, the e500 core is in virtual mode with a hardware-initialized tlb entry. 5.13.6 little-endian mode unlike the aim version of the powerpc architecture, where little-endian mode is controlled on a system basis, book e allows control of byte ordering on a memory page basis. in addition, the little-endian mode used in book e is true little endian. 5.14 powerquicc iii implementation details table 5-8 summarizes e500 core functionality that is not implemented by powerquicc iii devices. table 5-8. differences between the e500 core and the powerquicc iii core implementation feature powerquicc implementation cache protocol the l2 cache does not support mesi cache protocol. multiprocessor functionality because powerquicc iii is designed for a uniprocessor environment, the following e500 functionality is not implemented:  the memory coherence bit, m, which is controlled through mas2[m] and mas4[md] has no effect.  hid1[abe] has meaning only in that it must be set to ensure that cache and tlb management instructions operate properly with respect to the l2 cache.  dynamic snooping does not occur in power-stopped state (see the note below in the entry for dynamic bus snooping). nexus support nexus is not supported. the nexus processor id register (npidr) and the nexus bus enable bit (hid1[nexen]) are not supported. r1 and r2 data bus parity r1 and r2 data bus parity are disabled on powerquicc iii devices. hid1[r1dpe,r2dpe] are reserved. dynamic bus snooping the powerquicc iii devices do not perform dynamic bus snooping as described here. that is, when the e500 core is in core-stopped state (which is the state of the core when the powerquicc iii devices is in either the nap or sleep state), the core is not awakened to perform snoops on global transactions. therefore, before entering nap or sleep modes, l1 caches should be flushed if coherency is required during these power-down modes. for more information, see section 18.5.1.9, ?snooping in power-down modes.? supported tcr[wrc] powerquicc iii devices define values for 01, 10, and 11, as follows: 00 no watchdog timer reset can occur. 01 force processor checkstop on second timeout of watchdog timer 10 assert processor reset output ( core_hreset_req ) on second timeout of watchdog timer 11 reserved spe and spfp apus the spe and spfp apu functionality will not be implemented in next generation of powerquicc devices. freescale semiconductor strongly recommends that use of these instructions be confined to libraries and device drivers. customer software that uses spe or spfp instructions at the assembly level or that uses spe or spfp intrinsics will require rewriting for upward compatibility with next generation powerquicc devices. freescale semiconductor offers a libmoto_e500 library that uses spe and spfp apu instructions. freescale semiconductor will also provide future libraries to support next generation powerquicc devices.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 5-34 freescale semiconductor core complex overview hid0 implementation sel_tbclk bit. selects time base clock. if this bit is set and the time base is enabled, the time base is based on the tbclk input, which on the powerquicc iii devices is rtc. hid1 implementation pll_mode set to 01 pll_cfg. powerquicc iii devices support the following: 00010 0 2:1 00010 1 5:2 (2.5:1) 00011 0 3:1 00011 1 7:2 (3.5:1) nexen, r1dpe, r2dpe, mpxtt, mshars, sshar, ats, and mid are not implemented on powerquicc iii devices, abe must be set to ensure that cache and tlb management instructions operate properly on the l2 cache. hid1[rfxe] controls whether assertion of core_fault_in causes a machine check interrupt. assertion of core_fault_in can result from uncorrectable data error, such as an l2 multibit ecc error. it can also occur for a system error if logic on the integrated device signals a fault for nonfatal errors (read data is corrupt (or zero), but the transaction can complete without corrupting other system state, making it unnecessary to take a machine check (for example, a master abort of a pci transaction). if rfxe is 0, and core_fault_in is asserted, any data on the ccb is dropped, either stalling the load/store unit and causing the e500 pipeline to stall until an interrupt occurs (typically generated by the programmable interrupt controller (pic) in response to the fault) or allowing processingtto continue with the bad data until the interrupt occurs. because core_fault_in cannot cause a machine check if rfxe is 0, it is critical that the system be configured to generate the appropriate interrupt, as described below. it is also possible to hang the processor (requiring a hard reset to recover) if a guardedtload hits in the l2 cache and gets an uncorrectable ecc error. because of this, avoid defining memory as cacheable but guarded. if this combination is required, rfxe must be enabled, in which case an error causes both a machine check interrupt and an external interrupt when a bus fault condition is detected unless interrupts are masked for all sources of bus faults. if rfxe is 0, conditions that cause the assertion of core_fault_in cannot directly cause the e500 to generate a machine check; however, powerquicc iii devices must be configured to detect and enable such conditions. the following describes how error bits should be configured:  ecm mapping errors: eeer[laee] must be set. see section 8.2.1.4, ?ecm error enable register (eeer).?  l2 multiple-bit ecc errors: l2errdis[mbeccdis] must be cleared to ensure that error can be detected. l2errinten[mbeccinten] must be set. see section 7.3.1.5, ?l2 error registers.?  ddr multiple-bit ecc errors. err_disable[mbed] and err_int_en[mbee] must be zero and ddr_sdram_cfg[ecc_en] must be one to ensure that an interrupt is generated. see section 9.4.1, ?register descriptions.?  pci. the appropriate parity detect and master-abort bits in err_dr must be cleared and the corresponding enable bits in err_en must be set to ensure that an interrupt is generated. section 16.3.1.4, ?pci/x error management registers.?  local bus controller parity errors. ltedr[pard] must be cleared and lteir[pari] must be set to ensure that an parity errors can generate an interrupt. see section 13.3.1.11, ?transfer error check disable register (ltedr),? and section 13.3.1.12, ?transfer error interrupt enable register (lteir).?  rapidio. pcr[cce] must be set to ensure that an interrupt is generated due to a crc error. see section 17.3.2.1.2, ?port configuration register (pcr).? rfxe must also be set if software requires that code execution stop immediately when a bus fault occurs rather than continuing with the bad data until the interrupt arrives. again, this results in both a machine check interrupt and an external interrupt when a bus fault is detected, unless all possible sources for bus fault have their interrupts masked.tthe machine check interrupt can then reenable normal interrupts and wait for the interrupt due to the fault to be received before returning from the machine check. table 5-8. differences between the e500 core and the powerquicc iii core implementation (continued) feature powerquicc implementation
powerquicc iii implementation details MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 5-35 pir value the pir value is all zeros on powerquicc iii devices. pvr value the pvr reset value is 0x8020_ nnnn. see table 5-1 . pvr[version] = 0x8020 pvr[revision] = 0x nnnn (revision specific value) svr value the svr reset value is0x8030_ nnnn. see ta bl e 5 -1 . svr[version] = 0x8030 svr[revision] = 0x nnnn (revision specific value) table 5-8. differences between the e500 core and the powerquicc iii core implementation (continued) feature powerquicc implementation
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 5-36 freescale semiconductor core complex overview
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-1 chapter 6 core register summary this chapter describes the e500 register model and indicates whether each register is defined by book e, by the freescale semiconductor book e implementation standards (eis), or by the implementation. for the programmer, drawing this distinction indicates the degree to which code is portable among freescale semiconductor book e processors. this chapter provides reference material?figures for each register and complete descriptions of register fields, including how the registers are accessed, reset values, and whether they can be accessed by user- and supervisor-level software. detailed discussions of how these registers are used are provided in individual chapters. note that all registers described here are implemented in the hardware as part of the e500 core. 6.1 overview as shown in figure 6-1 , most of the registers implemented on a freescale semiconductor book e processor are defined by the book e architecture, and most of those were defined by the aim definition of the powerpc architecture and have changed very little. additional registers and fields within book e?defined registers are defined by the eis and by the implementation. book e defines some register fields in a very general way, leaving some details as implementation specific. in some cases, this more specific functionality is defined by the eis; in others it is left up to the processor. this chapter identifies the level at which each features is defined. 6.1.1 register set table 6-1 shows the e500 register set, grouped by whether they can be accessed by user- or supervisor-level software. unless otherwise indicated, these registers are defined by book e.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-2 freescale semiconductor core register summary figure 6-1. core register model user-level registers general-purpose registers instruction-accessible registers user general spr (read/write) 0 31 32 63 0 31 32 63 32 63 user spr general 0 1 1 usprg0 is a separate physical register from sprg0. (upper) gpr0 2 (lower) 2 the 64-bit gpr registers are accessed by the spe as separate 32-bit registers by spe instructions. only spe vector instructions can access the upper word. general- purpose registers cr condition register spr 256 usprg0 gpr1 spr 9 ctr count register general sprs (read only) gpr2 ? ? ? spr 8 lr link register spr 259 sprg3 spr general registers 3?7 gpr31 spr 260 sprg4 spr 1 xer integer exception register ? ? ? performance monitor registers (read-only pmrs) spr 512 spefscr 3 3 these registers are defined by the eis and are not part of the book e architecture. spe fp status/control register spr 263 sprg7 acc 3 accumulator time-base registers (read only) global control register pmr 384 upmgc0 3 miscellaneous registers spr 268 tbl time base lower/upper pmr 0?3 upmcs 3 counter registers 0?3 spr 269 tbu spr 513 bbear 3 branch buffer entry address register pmr 128?131 upmlcas 3 local control registers a0?a3 l1 cache (read only) spr 514 bbtar 3 branch buffer target address register l1 cache configuration registers 0?1 pmr 256?259 upmlcbs 3 local control registers b0?b3 spr 515 l1cfg0 3 spr 516 l1cfg1 3 supervisor-level registers interrupt registers configuration registers 32 63 32 63 32 63 spr 63 ivpr interrupt vector prefix spr 400 ivor0 interrupt vector offset registers 0?15 msr machine state spr 401 ivor1 spr 26 srr0 save/restore registers 0/1 spr 1023 scr system version ? ? ? spr 27 srr1 spr 415 ivor15 spr 286 pir processor id spr 58 csrr0 critical srr 0/1 processor version spr 528 ivor32 3 interrupt vector offset registers 32?35 spr 287 pvr spr 59 csrr1 spr 529 ivor33 3 timer/decrementer registers spr 570 mcsrr0 3 machine check srr 0/1 spr 530 ivor34 3 spr 571 mcsrr1 3 spr 531 ivor35 3 spr 22 dec decrementer exception syndrome register spr 62 esr mmu control and status (read/write) decrementer auto-reload spr 54 decar mmu control and status register 0 spr 572 mcsr 3 machine check syndrome register spr 1012 mmucsr0 3 spr 284 tbl time base lower/upper spr 573 mcar machine check address register spr 624 mas0 3 mmu assist registers 0?4 and 6 spr 285 tbu spr 625 mas1 3 spr 61 dear data exception address register spr 340 tcr timer control spr 626 mas2 3 spr 627 mas3 3 spr 336 tsr timer status debug registers spr 628 mas4 3 miscellaneous registers spr 308 dbcr0 debug control registers 0?2 spr 630 mas6 3 spr 309 dbcr1 spr 1008 hid0 3 hardware implementation dependent 0?1 spr 48 pid0 process id registers 0?2 spr 310 dbcr2 spr 1009 hid1 3 spr 633 pid1 3 spr 304 dbsr debug status register spr 634 pid2 3 spr 1013 bucsr 4 4 these registers are e500-specific. branch control and status register spr 312 iac1 instruction address compare registers 1?4 mmu control and status (read only) spr 272?279 sprg0?7 general sprs 0?7 spr 313 iac2 spr 1015 mmucfg 3 mmu configuration performance monitor registers data address compare registers 1 and 2 spr 316 dac1 spr 688 tlb0cfg 3 tlb configuration 0/1 pmr 400 pmgc0 3 global control spr 317 dac2 spr 689 tlb1cfg 3 pmr 16?19 pmc0?3 3 counter registers 0?3 spr 318 dvc1 data value compare registers 1 and 2 l1 cache (read/write) spr 319 dvc2 pmr 144?147 pmca0?3 3 local control a0?a3 spr 1010 l1csr0 3 l1 cache control/status 0/1 pmr 272?275 pmcb0?3 3 local control b0?b3 spr 1011 l1csr1 3
register model for 32-bit implementations MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-3 6.2 register model for 32-bit implementations embedded 32-bit processors implement the following types of software-accessible registers:  book e?defined registers that are accessed as part of instruction execution. these include the following: ? registers used for computation. these include the following: ? general-purpose registers (gprs)?book e defines a set of 32 gprs used to hold source and destination operands for load, store, arithmetic, and computational instructions, and to read and write to other registers. the e500 implements these as 64-bit registers for use with 64-bit load, store, and merge instructions, as described in section 6.3.1, ?general-purpose registers (gprs).? ? integer exception register (xer)?bits in this register are set based on the operation of an instruction considered as a whole, not on intermediate results. (for example, the subtract from carrying instruction ( subfc ), the result of which is specified as the sum of three values, sets bits in the xer based on the entire operation, not on an intermediate sum.) these registers are described in section 6.3, ?registers for computational operations.? ? condition register (cr)?used to record conditions such as overflows and carries that occur as a result of executing arithmetic instructions (including those implemented by the spe apu). the cr is described in section 6.4, ?registers for branch operations.? ? machine state register (msr)?used by the operating system to configure parameters such as user/supervisor mode, address space, and enabling of asynchronous interrupts. this register is described in section 6.5.1, ?machine state register (msr),? grouped with processor control sprs.  book e?defined special-purpose registers (sprs) that are accessed explicitly using mtspr and mfspr instructions. these registers are listed in table 6-1 in section 6.2.1, ?special-purpose registers (sprs).?  freescale semiconductor eis? and e500-defined sprs that are accessed explicitly using mtspr and mfspr are listed in table 6-2 in section 6.2.1, ?special-purpose registers (sprs).?  freescale semiconductor eis?defined performance monitor registers (pmrs). these registers are similar to sprs, but are accessed with freescale semiconductor eis?defined move to and move from pmr instructions ( mtpmr and mfpmr ). in this chapter, sprs are grouped by function as follows:  section 6.4, ?registers for branch operations,? describes the count register (ctr) and the link register (lr) defined by book e.  section 6.5, ?processor control registers?  section 6.6, ?timer registers?
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-4 freescale semiconductor core register summary  section 6.7, ?interrupt registers?  section 6.8, ?software-use sprs (sprg0?sprg7 and usprg0),? describes book e?defined sprs defined for software use.  section 6.9, ?branch target buffer (btb) registers,? describes e500-specific registers defined to support the e500 btbs.  section 6.10, ?hardware implementation-dependent registers,? describes hid0 and hid1.  section 6.11, ?l1 cache configuration registers?  section 6.12, ?mmu registers?  section 6.13, ?debug registers?  section 6.14, ?signal processing and embedded floating-point status and control register (spefscr)? the e500 core implements 64-bit gprs, the upper 32 bits of which are used only with 64-bit load, store, and merge instructions. 6.2.1 special-purpose registers (sprs) table 6-1 summarizes sprs defined in book e. the spr numbers are used in the instruction mnemonics. bit 5 in an spr number indicates whether an spr is accessible from user- or supervisor-level software. an mtspr or mfspr instruction that specifies an unsupported spr number is considered an invalid instruction. table 6-1. book e special-purpose registers (by spr abbreviation) spr abbreviatio n name defined spr number access superviso r only section/ page decimal binary csrr0 critical save/restore register 0 58 00001 11010 read/write yes 6.7.1.1/6-18 csrr1 critical save/restore register 1 59 00001 11011 read/write yes 6.7.1.2/6-18 ctr count register 9 00000 01001 read/write no 6.4.3/6-11 dac1 data address compare 1 316 01001 11100 read/write yes 6.13.4/6-48 dac2 data address compare 2 317 01001 11101 dbcr0 debug control register 0 308 01001 10100 read/write yes 6.13.1/6-42 dbcr1 debug control register 1 309 01001 10101 read/write yes dbcr2 debug control register 2 310 01001 10110 read/write yes dbsr debug status register 304 01001 10000 read/clear 1 ye s 6.13.2/6-46 dear data exception address register 61 00001 11101 read/write yes 6.7.1.5/6-19 dec decrementer 22 00000 10110 read/write yes 6.6.4/6-17 decar decrementer auto-reload 54 00001 10110 write-only esr exception syndrome register 62 00001 11110 read/write yes 6.7.1.8/6-20
register model for 32-bit implementations MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-5 iac1 instruction address compare 1 312 01001 11000 read/write yes 6.13.3/6-47 iac2 instruction address compare 2 313 01001 11001 ivor0 critical input 400 01100 10000 read/write yes 6.7.1.7/6-19 ivor1 machine check interrupt offset 401 01100 10001 ivor2 data storage interrupt offset 402 01100 10010 ivor3 instruction storage interrupt offset 403 01100 10011 ivor4 external input interrupt offset 404 01100 10100 ivor5 alignment interrupt offset 405 01100 10101 ivor6 program interrupt offset 406 01100 10110 ivor8 system call interrupt offset 408 01100 11000 ivor10 decrementer interrupt offset 410 01100 11010 ivor11 fixed-interval timer interrupt offset 411 01100 11011 ivor12 watchdog timer interrupt offset 412 01100 11100 ivor13 data tlb error interrupt offset 413 01100 11101 ivor14 instruction tlb error interrupt offset 414 01100 11110 ivor15 debug interrupt offset 415 01100 11111 ivpr interrupt vector 63 00001 11111 read/write yes 6.7.1.6/6-19 lr link register 8 00000 01000 read/write no 6.4.2/6-11 pid process id register 2 48 00001 10000 read/write yes 6.12.1/6-34 pir processor id register 286 01000 11110 r ead-only yes 6.5.2/6-14 pvr processor version register 287 01000 11111 r ead-only yes 6.5.3/6-14 sprg0 spr general 0 272 01000 10000 read/write yes 6.8/6-24 sprg1 spr general 1 273 01000 10001 read/write yes sprg2 spr general 2 274 01000 10010 read/write yes sprg3 spr general 3 259 01000 00011 read-only no 3 275 01000 10011 read/write yes sprg4 spr general 4 260 01000 00100 read-only no 276 01000 10100 read/write yes table 6-1. book e special-purpose registers (by spr abbreviation) (continued) spr abbreviatio n name defined spr number access superviso r only section/ page decimal binary
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-6 freescale semiconductor core register summary table 6-2 describes the implementation-specific sprs. compilers should recognize the mnemonic names given in table 6-2 when parsing instructions. sprg5 spr general 5 261 01000 00101 read-only no 6.8/6-24 277 01000 10101 read/write yes sprg6 spr general 6 262 01000 00110 read-only no 278 01000 10110 read/write yes sprg7 spr general 7 263 01000 00111 read-only no 279 01000 10111 read/write yes srr0 save/restore register 0 26 00000 11010 read/write yes 6.7.1.1/6-18 srr1 save/restore register 1 27 00000 11011 read/write yes 6.7.1.2/6-18 tbl time base lower 268 01000 01100 read-only no 6.6.3/6-17 284 01000 11100 write-only yes tbu time base upper 269 01000 01101 read-only no 285 01000 11101 write-only yes tcr timer control register 340 01010 10100 read/write yes 6.6.1/6-15 tsr timer status register 336 01010 10000 read/clear 4 ye s 6.6.2/6-16 usprg0 user spr general 0 5 256 01000 00000 read/write no 6.8/6-24 xer integer exception register 1 00000 00001 read/write no 6.3.2/6-8 1 the dbsr is read using mfspr . it cannot be directly written to. instead, dbsr bits corresponding to 1 bits in the gpr can be cleared using mtspr . 2 implementations may support more than one pid. for implementations with multiple pids, the eis implements the book e?defined pid as pid0. 3 user-mode read access to sprg3 is implementation dependent. 4 the tsr is read using mfspr . it cannot be directly written to. instead, tsr bits corresponding to 1 bits in the gpr can be cleared using mtspr . 5 usprg0 is a separate physical register from sprg0. table 6-2. implementation-specific sprs (by spr abbreviation) spr abbreviatio n name spr number access superviso r only section/ page bbear branch buffer entry address register 513 read/write no 6.9.1/6-25 bbtar branch buffer target address register 514 read/write no 6.9.2/6-25 bucsr branch unit control and status register 1013 read/write yes 6.9.3/6-26 hid0 hardware implementation dependent reg 0 1008 read/write yes 6.10.1/6-27 hid1 hardware implementation dependent reg 1 1009 read/write yes 6.10.1/6-27 table 6-1. book e special-purpose registers (by spr abbreviation) (continued) spr abbreviatio n name defined spr number access superviso r only section/ page decimal binary
register model for 32-bit implementations MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-7 ivor32 spe apu unavailable interrupt offset 528 read/write yes 6.7.1.7/6-19 ivor33 floating-point data exception interrupt offset 529 read/write yes ivor34 floating-point round exception interrupt offset 530 read/write yes ivor35 performance monitor 531 read/write yes l1cfg0 l1 cache configuration register 0 515 read-only no 6.11.3/6-32 l1cfg1 l1 cache configuration register 1 516 read-only no 6.11.4/6-33 l1csr0 l1 cache control and status register 0 1010 read/write yes 6.11.1/6-30 l1csr1 l1 cache control and status register 1 1011 read/write yes 6.11.2/6-31 mas0 mmu assist register 0 624 read/write yes 6.12.5.1/6-3 7 mas1 mmu assist register 1 625 read/write yes 6.12.5.2/6-3 8 mas2 mmu assist register 2 626 read/write yes 6.12.5.3/6-3 9 mas3 mmu assist register 3 627 read/write yes 6.12.5.4/6-4 0 mas4 mmu assist register 4 628 read/write yes 6.12.5.5/6-4 0 mas6 mmu assist register 6 630 read/write yes 6.12.5.6/6-4 1 mcar machine check address register 573 read-only yes 6.7.2.3/6-22 mcsr machine check syndrome register 572 read/write yes 6.7.2.4/6-23 mcsrr0 machine check save/restore register 0 570 read/write yes 6.7.2.1/6-21 mcsrr1 machine check save/restore register 1 571 read/write yes 6.7.2.2/6-22 mmucfg mmu configuration register 1015 read-only yes 6.12.3/6-35 mmucsr0 mmu control and status register 0 1012 read/write yes 6.12.2/6-34 pid0 process id register 0. book e refers to this as pid instead of pid0. 48 read/write yes 6.12.1/6-34 pid1 process id register 1 633 read/write yes pid2 process id register 2 634 read/write yes spefscr signal processing and embedded floating-point status and control register 512 read/write no 6.14/6-48 svr system version register 1023 read-only yes 6.5.4/6-14 table 6-2. implementation-specific sprs (by spr abbreviation) (continued) spr abbreviatio n name spr number access superviso r only section/ page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-8 freescale semiconductor core register summary 6.3 registers for computational operations the following sections describe general-purpose and integer exception registers. note register fields designated as write-one-to-clear are cleared only by writing ones to them. writing zeros to them has no effect. 6.3.1 general-purpose registers (gprs) book e implementations provide 32 gprs (gpr0?gpr31) for integer operations. the instruction formats provide 5-bit fields for specifying the gprs to be used in the execution of the instruction. each gpr is a 64-bit register, although only 64-bit load, store, and merge instructions use gpr bits 0?31. 6.3.2 integer exception register (xer) tlb0cfg tlb configuration register 0 688 read-only yes 6.12.4/6-35 tlb1cfg tlb configuration register 1 689 read-only yes 6.12.4.2/6-3 6 32 33 34 35 56 57 63 field so ov ca ? number of bytes reset all zeros r/w r/w spr spr 1 figure 6-2. integer exception register (xer) table 6-2. implementation-specific sprs (by spr abbreviation) (continued) spr abbreviatio n name spr number access superviso r only section/ page
registers for branch operations MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-9 6.4 registers for branch operations this section describes registers that support book e branch and cr operations. 6.4.1 condition register (cr) table 6-3. xer field description bits name description 32 so summary overflow. set when an instruction (except mtspr ) sets the overflow bit. once set, so remains set until it is cleared by mtspr[xer] or mcrxr . so is not altered by compare instructions or by other instructions (except mtspr[xer] and mcrxr ) that cannot overflow. executing mtspr[xer] , supplying the values 0 for so and 1 for ov, causes so to be cleared and ov to be set. 33 ov overflow. x-form add, subtract from, and negate instructions having oe = 1 set ov if the carry out of bit 32 is not equal to the carry out of bit 33, and clear ov otherwise to indicate a signed overflow. x-form multiply low word and divide word instructions having oe = 1 set ov if the result cannot be represented in 32 bits ( mullwo , divwo , and divwuo ) and clear ov otherwise. ov is not altered by compare instructions or by other instructions (except mtspr[xer] and mcrxr ) that cannot overflow. 34 ca carry. add carrying, subtract from carrying, add extended, and subtract from extended instructions set ca if there is a carry out of bit 32 and clear it otherwise. ca can be used to indicate unsigned overflow for add and subtract operations that set ca. shift right algebraic word instructions set ca if any 1 bits are shifted out of a negative operand and clear ca otherwise. compare instructions and instructions that cannot carry (except shift right algebraic word, mtspr[xer] , and mcrxr ) do not affect ca. 35?56 ? reserved, should be cleared. 57?63 no. of bytes supports emulation of load and store string instructions. specifies the number of bytes to be transferred by a load string indexed or store string indexed instruction. 32 35 36 39 40 43 44 47 48 51 52 55 56 59 60 63 field cr0 cr1 cr2 cr3 cr4 cr5 cr6 cr7 reset all zeros r/w r/w figure 6-3. condition register (cr) table 6-4. bi operand settings for cr fields cr n bits cr bits bi description cr0[0] 32 00000 negative (lt)?set when the result is negative. for spe apu vector compare and vector test instructions: set if the high-order element of r a is equal to the high-order element of r b; cleared otherwise. cr0[1] 33 00001 positive (gt)?set when the result is positive (and not zero). for spe apu vector compare and vector test instructions: set if the low-order element of r a is equal to the low-order element of r b; cleared otherwise.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-10 freescale semiconductor core register summary cr0[2] 34 00010 zero (eq)?set when the result is zero. for spe apu vector compare and vector test instructions: set to the or of the result of the compare of the high and low elements. cr0[3] 35 00011 summary overflow (so). copy of xer[so] at the instruction?s completion. for spe apu vector compare and vector test instructions: set to the and of the result of the compare of the high and low elements. cr1[0] 36 00100 negative (lt) for spe apu vector compare and vector test instructions: set if the high-order element of r a is equal to the high-order element of r b; cleared otherwise. cr1[1] 37 00101 positive (gt) for spe apu vector compare and vector test instructions: set if the low-order element of r a is equal to the low-order element of r b; cleared otherwise. cr1[2] 38 00110 zero (eq) for spe apu vector compare and vector test instructions: set to the or of the result of the compare of the high and low elements. cr1[3] 39 00111 summary overflow (so) for spe apu vector compare and vector test instructions: set to the and of the result of the compare of the high and low elements. cr n [0] 40 44 48 52 56 60 01000 01100 10000 10100 11000 11100 less than (lt) for integer compare instructions: r a < simm or r b (signed comparison) or r a < uimm or r b (unsigned comparison). for spe apu vector compare and vector test instructions: set if the high-order element of r a is equal to the high-order element of r b; cleared otherwise. cr n [1] 41 45 49 53 57 61 01001 01101 10001 10101 11001 11101 greater than (gt) for integer compare instructions: r a > simm or r b (signed comparison) or r a > uimm or r b (unsigned comparison). for spe apu vector compare and vector test instructions: set if the low-order element of r a is equal to the low-order element of r b; cleared otherwise. cr n [2] 42 46 50 54 58 62 01010 01110 10010 10110 11010 11110 equal (eq) for integer compare instructions: r a = simm, uimm, or r b. for spe apu vector compare and vector test instructions: set to the or of the result of the compare of the high and low elements. cr n [3] 43 47 51 55 59 63 01011 01111 10011 10111 11011 11111 summary overflow (so) for integer compare instructions, this is a copy of xer[so] at the completion of the instruction. for spe apu vector compare and vector test instructions: set to the and of the result of the compare of the high and low elements. table 6-4. bi operand settings for cr fields (continued) cr n bits cr bits bi description
processor control registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-11 the bits of cr0 are interpreted as described in table 6-5 . 6.4.2 link register (lr) 6.4.3 count register (ctr) 6.5 processor control registers this section addresses machine state, processor id, and processor version registers. table 6-5. cr0 bit descriptions cr bit name description 32 negative (lt) bit 32 of the result is equal to 1. 33 positive (gt) bit 32 of the result is equal to 0 and at least one bit from 33?63 of the result is non-zero. 34 zero (eq) bits 32?63 of the result are equal to 0. 35 summary overflow (so) this is a copy of the final state of xer[so] at the completion of the instruction. 32 63 field link address reset all zeros r/w r/w spr spr 8 figure 6-4. link register (lr) 32 63 field count value reset all zeros r/w r/w spr spr 9 figure 6-5. count register (ctr)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-12 freescale semiconductor core register summary 6.5.1 machine state register (msr) 32 36 37 38 39 44 45 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 field ? ucle spe ? we ce ? ee pr ? me ? uble de ? is ds ? pmm ? reset all zeros r/w r/w figure 6-6. machine state register (msr) table 6-6. msr field descriptions bits name description 32?36 ? reserved, should be cleared. 1 37 ucle user-mode cache lock enable (defined by the eis). used to restrict user-mode cache-line locking by the operating system 0 any cache lock instruction executed in user-mode takes a cache-locking dsi exception and sets either esr[dlk] or esr[ilk]. this allows the operating system to manage and track the locking/unlocking of cache lines by user-mode tasks. 1 cache-locking instructions can be executed in user-mode and they do not take a dsi for cache-locking (they may still take a dsi for access violations though). 38 spe spe enable (defined by the eis) 0 if software attempts to execute an spe apu or spfp instruction, an spe apu unavailable exception is taken. 1 software can execute supported spe and spfp apu instructions. note: the spe apu and spfp apu functionality will be implemented in the all powerquicc iii devices. however, these instructions will not be supported in devices subsequent to powerquicc iii. freescale semiconductor strongly recommends that use of these instructions be confined to libraries and device drivers. customer software that uses spe or spfp apu instructions at the assembly level or that uses spe intrinsics w ill r equire rewriting for upward compatibility with next generation powerquicc devices. freescale semiconductor offers a libmoto_e500 library that uses spe and spfp apu instructions. freescale will also provide future libraries to support next-generation powerquicc devices. 39?44 ? reserved, should be cleared. 1 45 we wait state enable. allows the core complex to signal a request for power management, according to the states of hid0[doze], hid0[nap], and hid0[sleep]. 0 the processor is not in wait state and continues processing. no power management request is signaled to external logic. 1 the processor enters wait state by ceasing to execute instructions and entering low-power mode. details of how wait state is entered and exited and how the processor behaves in the wait state are implementation-dependent. on the e500, msr[we] gates the doze, nap, and sleep outputs from the core complex; as a result, these outputs negate to the external power management logic on entry to the interrupt and then return to their previous state on return from the interrupt. we is cleared on entry to any interrupt and restored to its previous state upon return. 46 ce critical enable 0 critical input and watchdog timer interrupts are disabled. 1 critical input and watchdog timer interrupts are enabled. 47 ? preserved for book iii ile
processor control registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-13 48 ee external enable 0 external input, decrementer, fixed-interval timer, and performance monitor interrupts are disabled. 1 external input, decrementer, fixed-interval timer, and performance monitor interrupts are enabled. 49 pr user mode (problem state) 0 the processor is in supervisor mode, can execute any instruction, and can access any resource (for example, gprs, sprs, and the msr). 1 the processor is in user mode, cannot execute any privileged instruction, and cannot access any privileged resource. pr also affects memory access control 50 ? reserved, should be cleared. 1 51 me machine check enable 0 machine check interrupts are disabled. 1 machine check interrupts are enabled. 52 ? reserved, should be cleared. 1 53 uble in the e500, it is the user btb lock enable bit. 0 execution of the btb lock instructions for user mode is disabled; privileged instruction exception taken instead. 1 execution of the btb lock instructions for user mode is enabled. 54 de debug interrupt enable 0 debug interrupts are disabled. 1 debug interrupts are enabled if dbcr0[idm] = 1. see the description of the dbsr[ude] in section 6.13.2, ?debug status register (dbsr).? 55?57 ? reserved, should be cleared. 1 58 is instruction address space 0 the processor directs all instruction fetches to address space 0 (ts = 0 in the relevant tlb entry). 1 the processor directs all instruction fetches to address space 1 (ts = 1 in the relevant tlb entry). 59 ds data address space 0 the processor directs data memory accesses to address space 0 (ts = 0 in the relevant tlb entry). 1 the processor directs data memory accesses to address space 1 (ts = 1 in the relevant tlb entry). 60 ? reserved, should be cleared. 1 61 pmm performance monitor mark bit (defined by the eis). system software can set pmm when a marked process is running to enable statistics to be gathered only during execution of the marked process. msr[pr] and msr[pmm] together define a state that the processor (supervisor or user) and the process (marked or unmarked) may be in at any time. if this state matches an individual state specified in the pmlcax, the state for which monitoring is enabled, counting is enabled. 62?63 ? preserved for oea-defined ri and le, respectively 1 an msr bit that is reserved may be altered by a return from interrupt instruction. table 6-6. msr field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-14 freescale semiconductor core register summary 6.5.2 processor id register (pir) 6.5.3 processor version register (pvr) 6.5.4 system version register (svr) 32 63 field processor id reset all zeros r/w read only spr spr 286 figure 6-7. processor id register (pir) 32 47 48 63 field version revision reset 0x8020_ nnnn r/w read only spr spr 287 figure 6-8. processor version register (pvr) table 6-7. pvr field descriptions bits name description 32?47 version a 16-bit number that identifies the version of the processor. different version numbers indicate major differences between processors, such as which optional facilities and instructions are supported. 48?63 revision a 16-bit number that distinguishes between implementations of the version. different revision numbers indicate minor differences between processors having the same version number, such as clock rate and engineering change level. 32 63 field system version reset soc-dependent value: 0x8030_ nnnn r/w read only spr spr 1023 figure 6-9. system version register (svr)
timer registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-15 6.6 timer registers 6.6.1 timer control register (tcr) 32 33 34 35 36 37 38 39 40 41 42 43 46 47 50 51 63 field wp wrc wie die fp fie are ? wpext fpext ? reset all zeros r/w r/w spr spr 340 figure 6-10. timer control register (tcr) table 6-8. tcr field descriptions bits name description 32?33 wp watchdog timer period. when concatenated with wpext, specifies one of 64-bit locations of the time base used to signal a watchdog timer exception on a transition from 0 to 1. wpext[0?3] || wp[0?1] = 0b00_0000 selects tbu[32] (the msb of the tb) wpext[0?3] || wp[0?1] = 0b11_1111 selects tbl[63] (the lsb of the tb) 34?35 wrc watchdog timer reset control. this value is written into tsr[wrs] when a watchdog event occurs. wrc may be set by software but cannot be cleared by software, except by a software-induced reset. once written to a non-zero value, wrc may no longer be altered by software. 00 no watchdog timer reset will occur. 01 a second timeout is ignored, regardless of the value of msr[me]. 10 assert processor reset output ( core_hreset_req ) on second timeout of watchdog timer 11 reserved 36 wie watchdog timer interrupt enable 0 watchdog timer interrupts disabled 1 watchdog timer interrupts enabled 37 die decrementer interrupt enable 0 decrementer interrupts disabled 1 decrementer interrupts enabled 38?39 fp fixed interval timer period. when concatenated with fpext, fp specifies one of 64 bit locations of the time base used to signal a fixed-interval timer exception on a transition from 0 to 1. fpext[0?3] || fp[0?1] = 0b00_0000 selects tbu[32] (the msb of the tb) fpext[0?3] || fp[0?1] = 0b11_ 1111 selects tbl[63] (the lsb of the tb) 40 fie fixed interval interrupt enable 0 fixed interval interrupts disabled 1 fixed interval interrupts enabled 41 are auto-reload enable. controls whether the decar value is reloaded into the dec when the dec value reaches 0000_0001. see eref: a reference for freescale semiconductor book e and the e500 core . 0 auto-reload disabled 1 auto-reload enabled 42 ? reserved, should be cleared. 43?46 wpext watchdog timer period extension (see the description for wp)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-16 freescale semiconductor core register summary 6.6.2 timer status register (tsr) 47?50 fpext fixed-interval timer period extension (see the description for fp) 51?63 ? reserved, should be cleared. 32 33 34 35 36 37 38 63 field enw wis wrs dis fis ? reset all zeros r/w set by hardware. read with mfspr and cleared with mtspr by writing ones to any tsr bit positions to be cleared and zeros in all other bit positions. spr spr 336 figure 6-11. timer status register (tsr) table 6-9. tsr field descriptions bits name description 32 enw enable next watchdog time. functions as write-one-to-clear. 0 action on next watchdog timer time-out is to set tsr[enw] 1 action on next watchdog timer time-out is governed by tsr[wis] when a watchdog timer time-out occurs while wis = 0 and the next watchdog time-out is enabled (enw = 1), a watchdog timer exception is generated and logged by setting wis. this is referred to as a watchdog timer first time out. a watchdog timer interrupt occurs if enabled by tcr[wie] and msr[ce]. to avoid another watchdog timer interrupt once msr[ce] is reenabled, (assuming tcr[wie] is not cleared instead), the interrupt handler must reset tsr[wis]. 33 wis watchdog timer interrupt status. functions as write-one-to-clear. 0 a watchdog timer event has not occurred. 1 a watchdog timer event occurred. when msr[ce] = 1 and tcr[wie] = 1, a watchdog timer interrupt is taken. see the description of enw for more information about how wis is used. 34?35 wrs watchdog timer reset status. functions as write-one-to-clear. defined at reset (value = 00). set to tcr[wrc] when a reset is caused by the watchdog timer. 36 dis decrementer interrupt status. functions as write-one-to-clear. 0 a decrementer event has not occurred. 1 a decrementer event occurred. when msr[ee] = tcr[die] = 1, a decrementer interrupt is taken. 37 fis fixed-interval timer interrupt status. functions as write-one-to-clear. 0 a fixed-interval timer event has not occurred. 1 a fixed-interval timer event occurred. when msr[ee] = 1 and tcr[fie] = 1, a fixed-interval timer interrupt is taken. 38?63 ? reserved, should be cleared. table 6-8. tcr field descriptions (continued) bits name description
timer registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-17 6.6.3 time base registers 6.6.4 decrementer register 6.6.5 decrementer auto-reload register (decar) 32 63 32 63 field tbu tbl reset all zeros all zeros r/w user read/supervisor write user read/supervisor write spr 269 read/285 write 268 read/284 write figure 6-12. time base upper/lower registers (tbu/tbl) 32 63 field decrementer value reset all zeros r/w r/w spr spr 22 figure 6-13. decrementer register (dec) 32 63 field decrementer auto-reload value reset all zeros r/w write only spr spr 54 figure 6-14. decrementer auto-reload register (decar)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-18 freescale semiconductor core register summary 6.7 interrupt registers 6.7.1 interrupt registers defined by book e 6.7.1.1 save/restore register 0 (srr0) 6.7.1.2 save/restore register 1 (srr1) 6.7.1.3 critical save/restore register 0 (csrr0) 32 63 field next instruction address reset all zeros r/w r/w spr spr 26 figure 6-15. save/restore register 0 (srr0) 32 63 field msr state information reset all zeros r/w r/w spr spr 27 figure 6-16. save/restore register 1 (srr1) 32 63 field next instruction address reset all zeros r/w r/w spr spr 58 figure 6-17. critical save/restore register 0 (csrr0)
interrupt registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-19 6.7.1.4 critical save/restore register 1 (csrr1) 6.7.1.5 data exception address register (dear) 6.7.1.6 interrupt vector prefix register (ivpr) 6.7.1.7 interrupt vector offset registers (ivor n ) 32 63 field msr state information reset all zeros r/w r/w spr spr 59 figure 6-18. critical save/restore register 1 (csrr1) 32 63 field exception address reset all zeros r/w r/w spr spr 61 figure 6-19. data exception address register (dear) 32 47 48 63 field interrupt vector prefix ? reset all zeros r/w r/w spr spr 63 figure 6-20. interrupt vector prefix register (ivpr) 32 47 48 59 60 63 field ? interrupt vector offset ? reset all zeros r/w r/w spr (see ta bl e 6 -1 0 .) figure 6-21. interrupt vector offset registers (ivor n )
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-20 freescale semiconductor core register summary 6.7.1.8 exception syndrome register (esr) table 6-10. ivor assignments ivor number spr interrupt type ivor0 400 critical input ivor1 401 machine check ivor2 402 data storage ivor3 403 instruction storage ivor4 404 external input ivor5 405 alignment ivor6 406 program ivor8 408 system call ivor10 410 decrementer ivor11 411 fixed-interval timer interrupt ivor12 412 watchdog timer interrupt ivor13 413 data tlb error ivor14 414 instruction tlb error ivor15 415 debug ivor16?ivor31 ? reserved for future architectural use ivor32 528 spe apu unavailable (eis defined) ivor33 529 floating-point data exception (eis defined) ivor34 530 floating-point round exception (eis defined) ivor35 531 performance monitor (eis defined) ivor36?ivor63 ? allocated for implementation-dependent use 32 35 36 37 38 39 40 41 42 43 44 45 46 47 55 56 57 63 field ? pil ppr ptr ? st ? dlk ilk ? bo ? spe ? reset all zeros r/w r/w spr spr 62 figure 6-22. exception syndrome register (esr)
interrupt registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-21 6.7.2 eis-defined interrupt registers 6.7.2.1 machine check save/restore register 0 (mcsrr0) table 6-11. esr field descriptions bits name syndrome interrupt types 32?35 ? reserved, should be cleared. (defined by book e as allocated.) ? 36 pil illegal instruction exception program 37 ppr privileged instruction exception program 38 ptr trap exception program 39 ? defined by book e for floating-point operations. reserved and permanently cleared because the e500 does not implement a book e fpu. setting it has no effect. ? 40 st store operation alignment, data storage, data tlb error 41 ? reserved, should be cleared. ? 42 dlk cache locking. settings are implementation-dependent. 0 default 1 on the e500, dlk is set when a dsi occurs because dcbtls , dcbtstls , or dcblc is executed in user mode while msr[ucle] = 0. data storage 43 ilk set when a dsi occurs because icbtl or icblc is executed in user mode (msr[pr] = 1) and msr[ucle] = 0 data storage 44?45 ? reserved, should be cleared. 46 bo byte-ordering exception data storage, instruction storage 47?55 ? reserved, should be cleared. ? 56 spe spe exception bit (e500-specific) 0 default 1 any exception caused by an spe or spfp instruction spe unavailable 57?63 ? reserved, should be cleared. (defined by book e as allocated.) ? 32 63 field next instruction address reset all zeros r/w r/w spr spr 570 figure 6-23. machine check save/restore register 0 (mcsrr0)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-22 freescale semiconductor core register summary 6.7.2.2 machine check save/restore register 1 (mcsrr1) 6.7.2.3 machine check address register (mcar) 32 63 field msr state information reset all zeros r/w r/w spr spr 571 figure 6-24. machine check save/restore register 1 (mcsrr1) 32 63 field machine check address reset all zeros r/w read only spr spr 573 figure 6-25. machine check address register (mcar)
interrupt registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-23 6.7.2.4 machine check syndrome register (mcsr) 32 33 34 35 36 37 38 39 field mcp icperr dcp_perr dcperr ? ? ? ? reset all zeros r/w r/w 40 41 42 43 44 45 46 47 field ? ? ? ? ? ? ? gl_ci reset all zeros r/w r/w 48 49 50 51 52 53 54 55 field ? ? ? ? ? ? ? ? reset all zeros r/w r/w 56 57 58 59 60 61 62 63 field bus_iaerr bus_raerr bus_waerr bus_iberr bus_rberr bus_wberr bus_iperr bus_rperr reset all zeros r/w r/w spr spr 572 figure 6-26. machine check syndrome register (mcsr) table 6-12. mcsr field descriptions bit name description recoverable 32 mcp machine check input pin maybe 33 icperr instruction cache parity error precise 34 dcp_perr data cache push parity error maybe 35 dcperr data cache parity error precise. (cache-inhibited stwcx. instructions and guarded loads that initiate this error are deallocated before a machine check is taken. mcsrr0 holds the address of the next instruction, not the instruction that initiated the error.) 36?46 ? reserved, should be cleared. ? 47 gl_ci set when a guarded load or cache-inhibited stwcx. causes a cache parity error (icperr, dcperr)?mcsrr0 holds the address for the instruction after the instruction that caused the error.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-24 freescale semiconductor core register summary 6.8 software-use sprs (spr g0?sprg7 and usprg0) 48?55 ? reserved, should be cleared. ? 56 bus_iaerr bus instruction address error maybe 57 bus_raerr bus read address error maybe 58 bus_waerr bus write address error maybe 59 bus_iberr bus instruction data bus error maybe 60 bus_rberr bus read data bus error maybe 61 bus_wberr bus write bus error maybe 62 bus_iperr bus instruction parity error maybe 63 bus_rperr bus read parity error maybe 32 63 field software-determined information reset all zeros spr r/w sprg0 272 read/write supervisor sprg1 273 read/write supervisor sprg2 274 read/write supervisor sprg3 259 read-only user/supervisor 275 read/write supervisor sprg4 260 read-only user/supervisor 276 read/write supervisor sprg5 261 read-only user/supervisor 277 read/write supervisor sprg6 262 read-only user/supervisor 278 read/write supervisor sprg7 263 read-only user/supervisor 279 read/write supervisor usprg0 256 read/write user/supervisor figure 6-27. software-use sprs (sprg0?sprg7 and usprg0) table 6-12. mcsr field descriptions (continued) bit name description recoverable
branch target buffer (btb) registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-25 6.9 branch target buffer (btb) registers 6.9.1 branch buffer entry address register (bbear) 6.9.2 branch buffer target address register (bbtar) 32 61 62 63 field branch buffer entry address iab[0?1] reset all zeros r/w r/w spr spr 513 figure 6-28. branch buffer entry address register (bbear) table 6-13. bbear field descriptions bits name description 32?61 branch buffer entry address branch buffer entry effective address bits 0?29 62?63 iab[0?1] instruction after branch (with bbtar[62]). 3-bit pointer that points to the instruction in the cache line after the branch. see the description in the bblels instruction in the eref. if the branch is the last instruction in the cache block, iab = 000, to indicate the next sequential instruction, which resides in the zeroth position of the next cache block. 32 61 62 63 field branch buffer target address iab2 bdirpr reset all zeros r/w r/w spr spr 514 figure 6-29. branch buffer target address register (bbtar) table 6-14. bbtar field descriptions bits name description 32?61 branch buffer target address branch buffer target effective address bits 0?29
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-26 freescale semiconductor core register summary 6.9.3 branch unit control a nd status register (bucsr) 62 iab2 instruction after branch bit 2 (with bbear[62?63]). iab is a 3-bit pointer that points to the instruction in the cache line after the branch. see the description for bblels in the eref. if the branch is the last instruction in the cache block, iab = 000, to indicate the next sequential instruction, which resides in the zeroth position of the next cache block. 63 bdirpr branch direction prediction. the user can pick the direction of the predicted branch. 0 the locked address is always predicted as not taken. 1 the locked address is always predicted as taken. 32 53 54 55 56 57 58 62 63 field ? bbfi bblo bbul bblfc ? bpen reset all zeros r/w r/w spr spr 1013 figure 6-30. branch unit control and status register (bucsr) table 6-15. bucsr field descriptions bits name description 32?5 3 ? reserved, should be cleared. 54 bbfi branch buffer flash invalidate. clearing and then setting bbfi flash clears the valid bit of all entries in the branch buffer; clearing occurs independently from the value of the enable bit (bpen). bbfi is always read as 0. 55 bblo branch buffer lock overflow status 0 indicates a lock overflow condition was not encountered in the branch buffer 1 indicates a lock overflow condition was encountered in the branch buffer this sticky bit is set by hardware and is cleared by writing 0 to this bit location. 56 bbul branch buffer unable to lock 0 indicates a lock overflow condition in the branch buffer 1 indicates a lock set instruction failed in the branch buffer, for example, if the btb is disabled. this sticky bit is set by hardware and is cleared by writing 0 to this bit location. 57 bblf c branch buffer lock bits flash clear. clearing and then setting bblfc flash clears the lock bit of all entries in the branch buffer; clearing occurs independently from the value of the enable bit (bpen). bblfc is always read as 0. 58?6 2 ? reserved, should be cleared. 63 bpen branch prediction enable 0 branch prediction disabled 1 branch prediction enabled (enables btb to predict branches) table 6-14. bbtar field descriptions (continued) bits name description
hardware implementation-dependent registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-27 6.10 hardware implementation-dependent registers 6.10.1 hardware implementation-dependent register 0 (hid0) 32 33 39 40 41 42 43 48 49 50 51 62 63 field emcp ? doze nap sleep ? tben sel_tbclk ? nopti reset all zeros r/w r/w spr spr 1008 figure 6-31. hardware implementation-dependent register 0 (hid0) table 6-16. hid0 field descriptions bits name description 32 emcp enable machine check pin, mcp . used to mask out further machine check exceptions caused by assertion of mcp . 0mcp is disabled. 1mcp is enabled. if mse[me] = 0, asserting mcp causes checkstop. if msr[me] = 1, asserting mcp causes a machine check exception. 33?39 ? reserved, should be cleared. 40 doze doze power management mode. if msr[we] is set, this bit controls doze mode. 0 core not in doze mode 1 core in doze mode 41 nap nap power management mode. if msr[we] is set, this bit controls nap mode. 0 core not in nap mode 1 core in nap mode 42 sleep configure for sleep power management mode. controls sleep mode if msr[we] is set. 0 core not in sleep mode 1 core in sleep mode 43?48 ? reserved, should be cleared. 49 tben time base enable 0 time base disabled (no counting) 1 time base enabled  if hid0[tben] = 1 and hid0[sel_tbclk] = 0, the time base is updated every 8 bus clocks  if hid0[tben] = 1 and hid0[sel_tbclk] = 1, the time base is updated on the rising edge of core_tbclk (sampled at bus rate). the maximum supported frequency can be found in the electrical specifications, but this value is approximately 25% of the bus clock frequency. 50 sel_tbcl k select time base clock. if the time base is enabled, this field functions as follows: 0 time base is based on the processor clock 1 time base is based on the tbclk (rtc) input
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-28 freescale semiconductor core register summary 6.10.2 hardware implementation-dependent register 1 (hid1) 51?62 ? reserved, should be cleared. 63 nopti no-op the data and instruction cache touch instructions. 0 dcbt , dcbtst , and icbt are enabled, as defined by the eis. on the e500, if ct = 0, icbt is always a no-op, regardless of the value of nopti. if ct = 1, icbt does a touch load to an l2 cache, if one is present. 1 dcbt , dcbtst , and icbt are treated as no-ops; dcblc and dcbtls are not. 32 33 34 39 40 45 46 47 49 50 51 52 63 field pll_mode pll_cfg ? rfxe ? astme abe ? reset 01[pll_cfg]_0000_0000_0000_0000_0000_0000 r/w r/w spr spr 1009 figure 6-32. hardware implementation-dependent register 1 (hid1) table 6-17. hid1 field descriptions bits name description 32?33 pll_mod e read-only for integrated devices. 01 fixed value for MPC8540 34?39 pll_cfg reflected directly from configuration input pins (read-only). pll_cfg[0?4] corresponds to the integer divide ratio and pll_cfg5 is the half-mode bit. MPC8540 supports the following: 00010 0 ratio of 2:1 00010 1 ratio of 5:2 (2.5:1) 00011 0 ratio of 3:1 00011 1 ratio of 7:2 (3.5:1) note that this value is also reflected to porpllsr[e500_ratio]. see section 18.4.1.1, ?por pll status register (porpllsr).? 40?45 ? reserved, should be cleared. table 6-16. hid0 field descriptions (continued) bits name description
hardware implementation-dependent registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-29 46 rfxe read fault exception enable. controls whether assertion of core_fault_in causes a machine check interrupt. the assertion of core_fault_in can result from an l2 multibit ecc error. it can also occur for a system error if logic on the integrated device signals a fault for nonfatal errors (read data is corrupt (or zero), but the bus transaction can complete without corrupting other system state, making it unnecessary to take a machine check (for example, a master abort of a pci transaction). 0 assertion of core_fault_in cannot cause a machine check. rfxe should be left clear if an interrupt is to be reported by the integrated device through int or c_int for this condition. if rfxe = 0, it is important that the integrated device generates an interrupt if core_fault_in is asserted. if core_fault_in is asserted, any data on the ccb is dropped, stalling the load/store unit and eventually causing the e500 pipeline either to stall until an interrupt occurs (typically generated by the programmable interrupt controller (pic) in response to the fault) or to continue processing with bad data untill the interrupt occurs. because core_fault_in cannot cause a machine check, if rfxe is 0, it is critical that the system be configured to generate the appropriate interrupt. it is also possible to hang the processor (requiring a hard reset to recover) if a guarded load hits in the l2 cache and gets an uncorrectable ecc error. because of this, avoid defining memory as cacheable but guarded. if this combination is required, rfxe must be enabled, in which case an error causes both a machine check interrupt and an external interrupt when a bus fault condition is detected unless interrupts are masked for all sources of bus faults, such as dram ecc errors, pci parity errors, local bus parity errors, and others. rfxe must also be set if software requires that code execution stop immediately when a bus fault occurs rather than continuing with the bad data until the interrupt arrives. again, this results in both a machine check interrupt and an external interrupt when a bus fault is detected, unless all possible sources for bus fault have their interrupts masked.tthe machine check interrupt can then reenable normal interrupts and wait for the interrupt due to the fault to be received before returning from the machine check. 1 a machine check can occur due to assertion of core_fault_in . if msr[me] = 1 and a fault is signaled, a machine check interrupt occurs. if msr[me] = 0 and a fault is signaled, a checkstop occurs. note that if rfxe is set and another mechanism is configured to generate an interrupt in response to assertion of core_fault_in , the same event causes two interrupts, the machine check enabled by setting rfxe and the interrupt triggered by the on-chip peripheral or other block; therefore, rfxe should be set only if no other mechanism is configured to generate an interrupt for this case. note that the l2 cache detects any assertion of core_fault_in and ensures that the l2 cache is not corrupted when data is dropped for this type of transaction. 47?49 ? reserved, should be cleared. 50 astme address bus streaming mode enable. this bit, along with the ecm stream control bits in the eebacr, enables address bus streaming on the ccb. see section 8.2.1.1, ?ecm ccb address configuration register (eebacr).? 0 address bus streaming mode disabled 1 address bus streaming mode enabled 51 abe address broadcast enable. the e500 broadcasts cache management instructions ( dcbst , dcblc (ct = 1), icblc (ct = 1), dcbf , dcbi , mbar , msync , tlbsync , icbi ) based on abe. on the MPC8540 , abe must be set to allow management of external l2 caches. 0 address broadcasting disabled 1 address broadcasting enabled 52?63 ? reserved, should be cleared. table 6-17. hid1 field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-30 freescale semiconductor core register summary 6.11 l1 cache configuration registers 6.11.1 l1 cache control and status register 0 (l1csr0) line locking apu bits 32 46 47 48 49 51 52 53 54 55 56 61 62 63 field ? cpe cpi ? cslc cul clo clfr ? cfi ce reset all zeros r/w r/w spr spr 1010 figure 6-33. l1 cache control and status register 0 (l1csr0) table 6-18. l1csr0 field descriptions bits nam e description 32?46 ? reserved, should be cleared. 47 cpe (data) cache parity enable 0 parity checking of the cache disabled 1 parity checking of the cache enabled 48 cpi (data) parity error injection enable 0 parity error injection disabled 1 parity error injection enabled. cache parity must also be enabled (cpe = 1) when this bit is set. 49?51 ? reserved, should be cleared. 52 csl c (data) cache snoop lock clear. sticky bit set by hardware if a dcbi snoop (either internally or externally generated) invalidated a locked cache line. note that the lock bit for that line is cleared whenever the line is invalidated. this bit can be cleared only by software. 0 the cache has not encountered an dcbi snoop that invalidated a locked line. 1 the cache has encountered an dcbi snoop that invalidated a locked line. 53 cul (data) cache unable to lock. sticky bit set by hardware and cleared by writing 0 to this bit location. 0 indicates a lock set instruction was effective in the cache 1 indicates a lock set instruction was not effective in the cache 54 clo (data) cache lock overflow. sticky bit set by hardware and cleared by writing 0 to this bit location. 0 indicates a lock overflow condition was not encountered in the cache 1 indicates a lock overflow condition was encountered in the cache 55 clf r (data) cache lock bits flash reset. writing a 1 during a flash clear operation causes an undefined operation. writing a 0 during a flash clear operation is ignored. clearing occurs regardless of the enable (ce) value. 0 default. 1 hardware initiates a cache lock bits flash clear operation. this bit is cleared when the operation is complete. 56?61 ? reserved, should be cleared.
l1 cache configuration registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-31 6.11.2 l1 cache control and status register 1 (l1csr1) 62 cfi (data) cache flash invalidate. 0 no cache invalidate. writing a 0 to cfi during an invalidation operation is ignored. 1 cache invalidation operation. a cache invalidation operation is initiated by hardware. once complete, this bit is cleared. writing a 1 during an invalidation operation causes an undefined operation. invalidation occurs regardless of the enable (ce) value. 63 ce (data) cache enable 0 the cache is neither accessed or updated. 1 enables cache operation line locking apu bits 32 46 47 48 49 51 52 53 54 55 56 60 61 62 63 field ? icpe icpi ? icslc icul iclo iclfr ? icfi ice reset all zeros r/w r/w spr spr 1011 figure 6-34. l1 cache control and status register 1 (l1csr1) table 6-19. l1csr1 field descriptions bits name description 32?46 ? reserved, should be cleared. 47 icpe instruction cache parity enable 0 parity checking of the instruction cache disabled 1 parity checking of the instruction cache enabled 48 icpi instruction parity error injection enable 0 parity error injection disabled 1 parity error injection enabled. note that instruction cache parity must also be enabled (icpe = 1) when this bit is set. 49?51 ? reserved, should be cleared. 52 icsl c instruction cache snoop lock clear. sticky bit set by hardware if an icbi snoop (either internally or externally generated) invalidated a locked line in the instruction cache. note that the lock bit for that line is cleared whenever the line is invalidated. this bit can only be cleared by software. 0 the instruction cache has not encountered an icbi snoop that invalidated a locked line. 1 the instruction cache has encountered an icbi snoop that invalidated a locked line. 53 icul instruction cache unable to lock. sticky bit set by hardware and cleared by writing 0 to this bit location. 0 indicates a lock set instruction was effective in the instruction cache 1 indicates a lock set instruction was not effective in the instruction cache table 6-18. l1csr0 field descriptions (continued) bits nam e description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-32 freescale semiconductor core register summary 6.11.3 l1 cache configuration register 0 (l1cfg0) 54 iclo instruction cache lock overflow. sticky bit set by hardware and cleared by writing 0 to this bit location. 0 indicates a lock overflow condition was not encountered in the instruction cache 1 indicates a lock overflow condition was encountered in the instruction cache 55 iclf r instruction cache lock bits flash reset. writing 0 and then 1 flash clears the lock bit of all entries in the instruction cache; clearing occurs independently from the value of the enable bit (ice). iclfr is always read as 0. 56?61 ? reserved, should be cleared. 62 icfi instruction cache flash invalidate. written to 0 and then 1 to flash clear the valid bit of all entries in the instruction cache; operates independently from the value of the enable bit (ice). ici is always read as 0. 63 ice instruction cache enable 0 the instruction cache is neither accessed or updated. 1 enables instruction cache operation 32 33 34 38 39 40 41 42 43 44 45 49 50 52 53 55 56 63 field carch ? cbsize crepl cla cpa ? cnway ? csize reset 00 00_000 00 01 1 1 000_00 11_1 000 0010_0000 r/w read only spr spr 515 figure 6-35. l1 cache configuration register 0 (l1cfg0) table 6-20. l1cfg0 field descriptions bits name description 32?33 carch cache architecture 00 harvard 01 unified 34?38 ? reserved, should be cleared. 39?40 cbsize cache line size 0 32 bytes 1 64 bytes 41?42 crepl cache replacement policy 0 true lru 1 pseudo lru 43 cla cache locking apu available 0 unavailable 1available table 6-19. l1csr1 field descriptions (continued) bits name description
l1 cache configuration registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-33 6.11.4 l1 cache configuration register 1 (l1cfg1) 44 cpa cache parity available 0 unavailable 1available 45?49 ? reserved, should be cleared. 50?52 cnway cache number of ways 111 indicates 8 ways 53?55 ? reserved, should be cleared. 56?63 csize cache size 0x20 indicates 32 kbytes 32 38 39 40 41 42 43 44 45 52 53 63 field ? icbsiz icrepl icla icp a icnway icsize reset 0000_000 0_0 01 1 1 000_0011_1 000_0010_0000 r/w read only spr spr 516 figure 6-36. l1 cache configuration register 1 (l1cfg1) table 6-21. l1cfg1 field descriptions bits name description 32?38 ? reserved, should be cleared. 39?40 icbsiz instruction cache block size 00 indicates block size of 32 bytes 41?42 icrepl instruction cache replacement policy 01 indicates pseudo-lru policy 43 icla instruction cache locking available 1 indicates available 44 icpa instruction cache parity available 1 indicates available 45?52 icnway instruction cache number of ways 111 indicates 8 ways 53?63 icsize instruction cache size 0x20 indicates 32 kbytes table 6-20. l1cfg0 field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-34 freescale semiconductor core register summary 6.12 mmu registers 6.12.1 process id registers (pid0?pid2) 6.12.2 mmu control and status register 0 (mmucsr0) 32 55 56 63 field ? process id reset all zeros r/w r/w spr book e defined: spr 48(pid0); eis defined: spr 633 (pid1); spr 634 (pid2) figure 6-37. process id registers (pid0?pid2) 32 60 61 62 63 field ? l2tlb0_fi l2tlb1_fi ? reset all zeros r/w r/w spr spr 1012 figure 6-38. mmu control and status register 0 (mmucsr0) table 6-22. mmucsr0 field descriptions bits name description 32?60 ? reserved, should be cleared. 61 l2tlb0_fi tlb0 flash invalidate (write to 1 to invalidate) 62 l2tlb1_fi tlb1 flash invalidate (write 1 to invalidate) 0 no flash invalidate. writing a 0 to this bit during an invalidation operation is ignored. 1 tlb1 invalidation operation. hardware initiates a tlb1 invalidation operation. when this operation is complete, this bit is cleared. writing a 1 during an invalidation operation causes an undefined operation. 63 ? reserved, should be cleared.
mmu registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-35 6.12.3 mmu configuration register (mmucfg) 6.12.4 tlb configuration registers (tlb n cfg) 6.12.4.1 tlb0 configuration register 0 (tlb0cfg) 32 48 49 52 53 57 58 59 60 61 62 63 field ? npids pidsize ? ntlbs mavn reset 0000_0000_0000_0000_0 001_1 001_11 00 01 00 r/w read only spr spr 1015 figure 6-39. mmu configuration register (mmucfg) table 6-23. mmucfg field descriptions bits name description 32?48 ? reserved, should be cleared. 49?52 npids number of pid registers, a 4-bit field that indicates the number of pid registers provided by the processor. the e500 implements three pids. 53?57 pidsize pid register size. the 5-bit value of pidsize is one less than the number of bits in each of the pid registers implemented by the processor. the processor implements only the least significant pidsize+1 bits in the pid registers. 00111 indicates 8-bit registers. this is the value presented by the e500. 58?59 ? reserved, should be cleared. 60?61 ntlbs number of tlbs. the value of ntlbs is one less than the number of software-accessible tlb structures that are implemented by the processor. ntlbs is set to one less than the number of tlb structures so that its value matches the maximum value of mas0[tlbsel]. 00 1 tlb 01 2 tlbs. this is the value presented by the e500. 10 3 tlbs 11 4 tlbs 62?63 mavn mmu architecture version number. indicates the version number of the architecture of the mmu implemented by the processor. 0b00 indicates version 1.0. 32 39 40 43 44 47 48 49 50 51 52 63 field assoc minsize maxsize iprot avail ? nentry reset 0000_0010 0001 0001 0 0 00 0001_0000_0000 r/w read only spr spr 688 figure 6-40. tlb configuration register 0 (tlb0cfg)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-36 freescale semiconductor core register summary 6.12.4.2 tlb1 configuration register 1 (tlb1cfg) table 6-24. tlb0cfg field descriptions bits name description 32?39 assoc associativity of tlb0 0x02 indicates associativity is 2-way set associative 40?43 minsize minimum page size of tlb0 0x1 indicates smallest page size is 4k 44?47 maxsize maximum page size of tlb0 0x1 indicates maximum page size is 4k 48 iprot invalidate protect capability of tlb0 0 indicates invalidate protection capability not supported 49 avail page size availability of tlb0 0 no variable-sized pages available (minsize = maxsize) 50?51 ? reserved, should be cleared. 52?63 nentry number of entries in tlb0 0x100: tlb0 contains 256 entries 32 39 40 43 44 47 48 49 50 51 52 63 field assoc minsize maxsize iprot avail ? nentry e500 reset values 0001_0000 0001 1001 1 1 00 0000_0001_0000 r/w read only spr spr 689 figure 6-41. tlb configuration register 1 (tlb1cfg) table 6-25. tlb1cfg field descriptions bits name description 32?39 assoc associativity of tlb1 0x10 indicates associativity is 16 40?43 minsize minimum page size of tlb1 0x1 indicates smallest page size is 4k 44?47 maxsize maximum page size of tlb1 0x9 indicates maximum page size is 256 mbyte 48 iprot invalidate protect capability of tlb1 1 indicates that tlb1 supports invalidate protection capability 49 avail page size availability of tlb1 1 indicates all page sizes between minsize and maxsize supported
mmu registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-37 6.12.5 mmu assist registers 6.12.5.1 mas register 0 (mas0) 50?51 ? reserved, should be cleared. 52?63 nentry number of entries in tlb1 0x010: tlb1 contains 16 entries 32 34 35 36 43 44 47 48 62 63 field ? tlbsel ? esel ? nv reset all zeros r/w r/w spr spr 624 figure 6-42. mas register 0 (mas0) table 6-26. mas0 field descriptions?mmu read/write and replacement control bits name descriptions 32?34 ? reserved, should be cleared. 35 tlbsel selects tlb for access 0tlb0 1tlb1 36?43 ? reserved, should be cleared. 44?47 esel entry select. number of entry in selected array to be used for tlbwe . this field is also updated on tlb error exceptions (misses), and tlbsx hit and miss cases. for the e500, esel serves as the way select for the corresponding tlb as follows: when tlbsel = 00 (tlb0 selected), only bit 47 is used (and bits 44?46 should be cleared). this bit selects between way 0 and way 1 of tlb0. ea bits 45?51 from mas2[epn] are used to index into the tlb to further select the entry for the operation. when tlbsel = 01 (tlb1 selected), all four bits are used to select one of 16 entries in the array. 48?62 ? reserved, should be cleared. 63 nv next victim. next victim bit value to be written to tlb0[nv] on execution of tlbwe . this field is also updated on tlb error exceptions (misses), tlbsx hit and miss cases and on execution of tlbre . this field is updated based on the calculated next victim bit for tlb0 (based on the round-robin replacement algorithm.) note that this field is not defined for operations that specify tlb1 (when tlbsel = 01). table 6-25. tlb1cfg field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-38 freescale semiconductor core register summary 6.12.5.2 mas register 1 (mas1) 32 33 34 39 40 47 48 50 51 52 55 56 63 field v iprot ? tid ? ts tsize ? reset all zeros r/w r/w spr spr 625 figure 6-43. mas register 1 (mas1) table 6-27. mas1 field descriptions?descriptor context and configuration control bits name descriptions 32 v tlb valid bit 0 this tlb entry is invalid. 1 this tlb entry is valid. 33 ipro t invalidate protect. set to protect this tlb entry from invalidate operations due the execution of tlbiva [ x ] (tlb1 only). note that not all tlb arrays are necessarily protected from invalidation with iprot. arrays that support invalidate protection are denoted as such in the tlb configuration registers. 0 entry is not protected from invalidation 1 entry is protected from invalidation. 34?39 ? reserved, should be cleared. 40?47 tid translation identity. an 8-bit field that defines the process id for this tlb entry. tid is compared with the current process ids of the three virtual address to be translated. a tid value of 0 defines an entry as global and matches with all process ids. 48?50 ? reserved, should be cleared. 51 ts translation space. this bit is compared with the is or ds fields of the msr (depending on the type of access) to determine if this tlb entry may be used for translation. 52?55 tsize translation size. defines the tlb entry page size. for arrays that contain fixed-size tlb entries, tsize is ignored. for variable page size arrays, the page size is 4 tsize kbytes. note that although the freescale semiconductor book e standard supports all 16 page sizes defined in book e, the e500 supports only the following: 0001 4 kbyte 0010 16 kbyte 0011 64 kbyte 0100 256 kbyte 0101 1 mbyte 0110 4 mbyte 0111 16 mbyte 1000 64 mbyte 1001 256 mbyte 56?63 ? reserved, should be cleared.
mmu registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-39 6.12.5.3 mas register 2 (mas2) 32 51 52 56 57 58 59 60 61 62 63 field epn ? x0 x1 w i m g e reset all zeros r/w r/w spr spr 626 figure 6-44. mas register 2 (mas2) table 6-28. mas2 field descriptions?epn and page attributes bits name description 32?5 1 epn effective page number. depending on page size, only the bits associated with a page boundary are valid. bits that represent offsets within a page are ignored and should be cleared. 52?5 6 ? reserved for implementation-specific use 57 x0 implementation-dependent page attribute 58 x1 implementation-dependent page attribute 59 w write-through 0 this page is considered write-back with respect to the caches in the system. 1 all stores performed to this page are written through the caches to main memory. 60 i caching-inhibited 0 accesses to this page are considered cacheable. 1 the page is considered caching-inhibited. all loads and stores to the page bypass the caches and are performed directly to main memory. 61 m memory coherence required 0 memory coherence is not required. 1 memory coherence is required. this allows loads and stores to this page to be coherent with loads and stores from other processors (and devices) in the system, assuming all such devices are participating in the coherence protocol. 62 g guarded 0 accesses to this page are not guarded and can be performed before it is known if they are required by the sequential execution model. 1 all loads and stores to this page that miss in the l1 cache are performed without speculation (that is, they are known to be required). speculative loads can be performed if they hit in the l1 cache. in addition, accesses to caching-inhibited pages are performed using only the memory element that is explicitly specified. 63 e endianness. determines endianness for the corresponding page. little-endian operation is true little endian, which differs from the modified little-endian byte-ordering model optionally available in previous devices that implement the original powerpc architecture. see the e500 reference manual for more information on the book e definition of endianness. 0 the page is accessed in big-endian byte order. 1 the page is accessed in true little-endian byte order.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-40 freescale semiconductor core register summary 6.12.5.4 mas register 3 (mas3) 6.12.5.5 mas register 4 (mas4) 32 51 52 53 54 57 58 59 60 61 62 63 field rpn ? u0?u3 ux sx uw sw ur sr reset all zeros r/w r/w spr spr 627 figure 6-45. mas register 3 (mas3) table 6-29. mas3 field descriptions?rpn and access control bits name description 32?51 rpn real page number. depending on page size, only the bits associated with a page boundary are valid. bits that represent offsets within a page are ignored and should be cleared. 52?53 ? reserved, should be cleared. 54?57 u0?u3 user attribute bits. associated with a tlb entry and can be used by system software. for example, they can hold information useful to a page-scanning algorithm or mark more abstract page attributes. 58?63 permi s permission bits (ux, sx, uw, sw, ur, sr). user and supervisor read, write, and execute permission bits. 32 34 35 36 45 46 47 48 51 52 55 56 57 58 59 60 61 62 63 field ? tlbseld ? tidseld ? tsized ? x0d x1d wd id md gd ed reset all zeros r/w r/w spr spr 628 figure 6-46. mas register 4 (mas4) table 6-30. mas4 field descriptions?hardware replacement assist configuration bits name description 32?34 ? reserved, should be cleared. 35 tlbseld tlbsel default value. the default value to be loaded in mas0[tlbsel] on a tlb miss exception. 0tlb0 1tlb1 36?45 ? reserved, should be cleared.
mmu registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-41 6.12.5.6 mas register 6 (mas6) 46?47 tidseld tid default selection value. a 2-bit field that specifies which of the current pid registers should be used to load the mas1[tid] field on a tlb miss exception. the e500 implementation defines this field as follows: 00 pid0 01 pid1 10 pid2 11 tidz (0x00) (all zeros) 48?51 ? reserved, should be cleared. 52?55 tsized default tsize value. specifies the default value to be loaded into mas1[tsize] on a tlb miss exception. 56 ? reserved, should be cleared. 57 x0d default x0 value. specifies the default value to be loaded into mas2[x0] on a tlb miss exception. 58 x1d default x1 value. specifies the default value to be loaded into mas2[x1] on a tlb miss exception. 59 wd default w value. specifies the default value to be loaded into mas2[w] on a tlb miss exception. 60 id default i value. specifies the default value to be loaded into mas2[i] on a tlb miss exception. 61 md default m value. specifies the default value to be loaded into mas2[m] on a tlb miss exception. 62 gd default g value. specifies the default value to be loaded into mas2[g] on a tlb miss exception. 63 ed default e value. specifies the default value to be loaded into mas2[e] on a tlb miss exception. 32 39 40 47 48 62 63 field ? spid0 ? sas reset all zeros r/w r/w spr spr 630 figure 6-47. mas register 6 (mas6) table 6-31. mas6?tlb search context register 0 bits name comments, or function when set 32?39 ? reserved, should be cleared. 40?47 spid0 specifies the pid value (recent value of pid0) used when searching the tlb during execution of tlbsx . 48?62 ? reserved, should be cleared. 63 sas address space (as) value for searches. specifies the value of as used when searching the tlb (during execution of tlbsx ). table 6-30. mas4 field descriptions?hardware replacement assist configuration (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-42 freescale semiconductor core register summary 6.13 debug registers 6.13.1 debug control registers (dbcr0?dbcr2) 6.13.1.1 debug control register 0 (dbcr0) 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 62 63 field ? idm rst icmp brt irpt trap iac1 iac2 ? dac1 dac2 ret ? ft reset all zeros r/w r/w spr spr 308 figure 6-48. debug control register 0 (dbcr0) table 6-32. dbcr0 field descriptions bits name description 32 ? reserved, should be cleared. 33 idm internal debug mode 0 debug interrupts are disabled. no debug interrupts are taken and debug events are not logged. 1 if msr[de] = 1, the occurrence of a debug event or the recording of an earlier debug event in the dbsr when msr[de] = 0 or dbcr0[idm] = 0 causes a debug interrupt. programming note: software must clear debug event status in the dbsr in the debug interrupt handler when a debug interrupt is taken before re-enabling interrupts through msr[de]. otherwise, redundant debug interrupts are taken for the same debug event. 34?35 rst reset. book e defines this field such that 00 is always no action and all other settings are implementation specific. the e500 implements these bits as follows: 0 x default (no action) 1 x causes a hard reset if msr[de] and dbcr0[idm] are set. always cleared on subsequent cycle. 36 icmp instruction completion debug event enable 0 icmp debug events are disabled 1 icmp debug events are enabled note: instruction completion does not cause an icmp debug event if msr[de] = 0. 37 brt branch taken debug event enable 0 brt debug events are disabled 1 brt debug events are enabled note: taken branches do not cause a brt debug event if msr[de] = 0. 38 irpt interrupt taken debug event enable. this bit affects only noncritical interrupts. 0 irpt debug events are disabled 1 irpt debug events are enabled 39 trap trap debug event enable 0 trap debug events cannot occur 1 trap debug events can occur
debug registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-43 6.13.1.2 debug control register 1 (dbcr1) 40 iac1 instruction address compare 1 debug event enable 0 iac1 debug events cannot occur 1 iac1 debug events can occur 41 iac2 instruction address compare 2 debug event enable 0 iac2 debug events cannot occur 1 iac2 debug events can occur 42?43 ? reserved, should be cleared. 44?45 dac1 data address compare 1 debug event enable 00 dac1 debug events cannot occur 01 dac1 debug events can occur only if a store-type data storage access 10 dac1 debug events can occur only if a load-type data storage access 11 dac1 debug events can occur on any data storage access 46?47 dac2 data address compare 2 debug event enable 00 dac2 debug events cannot occur 01 dac2 debug events can occur only if a store-type data storage access 10 dac2 debug events can occur only if a load-type data storage access 11 dac2 debug events can occur on any data storage access 48 ret return debug event enable 0 ret debug events cannot occur 1 ret debug events can occur note: an rfci does not cause an ret debug event if msr[de] = 0 at the time that rfci executes. 49?62 ? reserved, should be cleared. 63 ft freeze timers on debug event 0 enable clocking of timers 1 disable clocking of timers if any dbsr bit is set (except mrr) 32 33 34 35 36 37 38 39 40 41 42 63 field iac1us iac1er iac2us iac2er iac12m ? reset all zeros r/w r/w spr spr 309 figure 6-49. debug control register 1 (dbcr1) table 6-32. dbcr0 field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-44 freescale semiconductor core register summary table 6-33. dbcr1 field descriptions bits name description 32?33 iac1us instruction address compare 1 user/supervisor mode 00 iac1 debug events can occur 01 reserved 10 iac1 debug events can occur only if msr[pr] = 0 11 iac1 debug events can occur only if msr[pr] = 1 34?35 iac1er instruction address compare 1 effective/real mode 00 iac1 debug events are based on effective addresses 01 reserved on the e500 10 iac1 debug events are based on effective addresses and can occur only if msr[is] = 0 11 iac1 debug events are based on effective addresses and can occur only if msr[is] = 1 36?37 iac2us instruction address compare 2 user/supervisor mode 00 iac2 debug events can occur 01 reserved 10 iac2 debug events can occur only if msr[pr] = 0 11 iac2 debug events can occur only if msr[pr] = 1 38?39 iac2er instruction address compare 2 effective/real mode 00 iac2 debug events are based on effective addresses 01 reserved on the e500 10 iac2 debug events are based on effective addresses and can occur only if msr[is] = 0 11 iac2 debug events are based on effective addresses and can occur only if msr[is] = 1 40?41 iac12m instruction address compare 1/2 mode 00 exact address compare. iac1 debug events can occur only if the address of the instruction fetch is equal to the value specified in iac1. iac2 debug events can occur only if the address of the instruction fetch is equal to the value specified in iac2. 01 address bit match. iac1 and iac2 debug events can occur only if the address of the instruction fetch, anded with the contents of iac2 are equal to the contents of iac1,plus anded with the contents of iac2. if iac1us iac2us or iac1er iac2er, results are boundedly undefined. 10 inclusive address range compare. iac1 and iac2 debug events can occur only if the address of the instruction fetch is greater than or equal to the value specified in iac1 and less than the value specified in iac2. if iac1us iac2us or iac1er iac2er, results are boundedly undefined. 11 exclusive address range compare. iac1 and iac2 debug events can occur only if the address of the instruction fetch is less than the value specified in iac1 or is greater than or equal to the value specified in iac2. if iac1us iac2us or iac1er iac2er, results are boundedly undefined. 42?63 ? reserved, should be cleared.
debug registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-45 6.13.1.3 debug control register 2 (dbcr2) 32 33 34 35 36 37 38 39 40 41 42 63 field dac1us dac1er dac2us dac2er dac12m ? reset all zeros r/w r/w spr spr 310 figure 6-50. debug control register 2 (dbcr2) table 6-34. dbcr2 field descriptions bits name description 32?33 dac1us data address compare 1 user/supervisor mode 00 dac1 debug events can occur 01 reserved 10 dac1 debug events can occur only if msr[pr] = 0. 11 dac1 debug events can occur only if msr[pr] = 1. 34?35 dac1er data address compare 1 effective/real mode 00 dac1 debug events are based on effective addresses. 01 reserved on the e500 10 dac1 debug events are based on effective addresses and can occur only if msr[ds] = 0. 11 dac1 debug events are based on effective addresses and can occur only if msr[ds] = 1. 36?37 dac2us data address compare 2 user/supervisor mode 00 dac2 debug events can occur. 01 reserved 10 dac2 debug events can occur only if msr[pr] = 0. 11 dac2 debug events can occur only if msr[pr] = 1. 38?39 dac2er data address compare 2 effective/real mode 00 dac2 debug events are based on effective addresses. 01 reserved on the e500 10 dac2 debug events are based on effective addresses and can occur only if msr[ds] = 0. 11 dac2 debug events are based on effective addresses and can occur only if msr[ds] = 1.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-46 freescale semiconductor core register summary 6.13.2 debug status register (dbsr) 40?41 dac12m data address compare 1/2 mode 00 exact address compare. dac1 debug events can occur only if the address of the data storage access is equal to the value specified in dac1. dac2 debug events can occur only if the address of the data storage access is equal to the value specified in dac2. 01 address bit match. dac1 and dac2 debug events can occur only if the address of the data storage access, anded with the contents of dac2 are equal to the contents of dac1, also anded with the contents of dac2. if dac1us dac2us or dac1er dac2er, results are boundedly undefined. 10 inclusive address range compare. dac1 and dac2 debug events can occur only if the address of the data storage access is greater than or equal to the value specified in dac1 and less than the value specified in dac2. if dac1us dac2us or dac1er dac2er, results are boundedly undefined. 11 exclusive address range compare. dac1 and dac2 debug events can occur only if the address of the data storage access is less than the value specified in dac1 or is greater than or equal to the value specified in dac2. if dac1us dac2us or dac1er dac2er, results are boundedly undefined. 42?63 ? reserved, should be cleared. 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 63 field ide ude mrr icmp brt irpt trap iac1 iac2 ? dac1r dac1w dac2r dac2w ret ? reset 00 undef. 0000_0000_0000 r/w r/w spr spr 304 figure 6-51. debug status register (dbsr) table 6-35. dbsr field descriptions bits name description 32 ide imprecise debug event. set if msr[de] = 0 and a debug event causes its respective dbsr bit to be set. functions as write-one-to-clear. 33 ude unconditional debug event. set if an unconditional debug event occurred. functions as write-one-to-clear. if ude (level sensitive, active low) is asserted, dbsr[ude] is affected as follows: msr[de] dbcr0[idm] action x 0 no action. 0 1 ude is set. 1 1 ude is set and a debug interrupt is taken. 34?35 mrr most recent reset. functions as write-one-to-clear. undefined at power-up. the e500 implements hreset as follows: 0x no hard reset occurred since this bit was last cleared by software. 1x the previous reset was a hard reset. 36 icmp instruction complete debug event. set if an instruction completion debug event occurred and dbcr0[icmp] = 1. functions as write-one-to-clear. table 6-34. dbcr2 field descriptions (continued) bits name description
debug registers MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-47 6.13.3 instruction address compare registers (iac1?iac2) 37 brt branch taken debug event. set if a branch taken debug event occurred (dbcr0[brt] = 1). functions as write-one-to-clear. 38 irpt interrupt taken debug event. set if an interrupt taken debug event occurred (dbcr0[irpt] = 1). functions as write-one-to-clear. 39 trap trap instruction debug event. set if a trap instruction debug event occurred (dbcr0[trap] = 1). functions as write-one-to-clear. 40 iac1 instruction address compare 1 debug event. set if an iac1 debug event occurred (dbcr0[iac1] = 1). functions as write-one-to-clear. 41 iac2 instruction address compare 2 debug event. set if an iac2 debug event occurred (dbcr0[iac2] = 1). functions as write-one-to-clear. 42?43 ? reserved, should be cleared 44 dac1r data address compare 1 read debug event. set if a read-type dac1 debug event occurred (dbcr0[dac1] = 10 or 11). functions as write-one-to-clear. 45 dac1 w data address compare 1 write debug event. set if a write-type dac1 debug event occurred (dbcr0[dac1] = 01 or 11). functions as write-one-to-clear. 46 dac2r data address compare 2 read debug event.set if a read-type dac2 debug event occurred (dbcr0[dac2] = 10 or 11). functions as write-one-to-clear. 47 dac2 w data address compare 2 write debug event. set if a write-type dac2 debug event occurred (dbcr0[dac2] = 01 or 11). functions as write-one-to-clear. 48 ret return debug event. set if a return debug event occurred (dbcr0[ret] = 1). functions as write-one-to-clear. 49?63 ? reserved, should be cleared. 32 61 62 63 field instruction address ? reset all zeros r/w r/w spr spr 312 (iac1); spr 313 (iac2) figure 6-52. instruction address compare registers (iac1?iac2) table 6-35. dbsr field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-48 freescale semiconductor core register summary 6.13.4 data address compare registers (dac1?dac2) 6.14 signal processing and embedded floating-point status and control register (spefscr) 32 63 field data address reset all zeros r/w r/w spr spr 316 (dac1); spr 317 (dac2) figure 6-53. data address compare registers (dac1?dac2) 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 field sovh ovh fgh fxh finvh fdbzh funfh fovfh ? finxs finvs fdbzs funfs fovfs mode reset 0000_0000_0000_0000 r/w r/w 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 field sov ov fg fx finv fdbz funf fovf ? finxe finve fdbze funfe fovfe frmc reset 0000_0000_0000_0000 r/w r/w spr spr 512 figure 6-54. signal processing and embedded floating-point status and control register (spefscr) table 6-36. spefscr field descriptions bits name function 32 sovh summary integer overflow high. set whenever an instruction (except mtspr ) sets ovh. sovh remains set until it is cleared by an mtspr[spefscr] . 33 ovh integer overflow high. an overflow occurred in the upper half of the register while executing a spe integer instruction 34 fgh embedded floating-point guard bit high. floating-point guard bit from the upper half. the value is undefined if the processor takes a floating-point exception due to input error, floating-point overflow, or floating-point underflow. 35 fxh embedded floating-point sticky bit high. floating bit from the upper half. the value is undefined if the processor takes a floating-point exception due to input error, floating-point overflow, or floating-point underflow. high-word error bits status bits enable bits n
signal processing and embedded floating-point status and control register (spefscr) MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-49 36 finvh embedded floating-point invalid operation error high. set when an input value on the high side is a nan, inf, or denorm. also set on a divide if both the dividend and divisor are zero. 37 fdbzh embedded floating-point divide by zero error high. set if the dividend is non-zero and the divisor is zero. 38 funfh embedded floating-point underflow error high 39 fovfh embedded floating-point overflow error high 40?41 ? reserved, should be cleared. 42 finxs embedded floating-point inexact sticky. finxs = finxs | fgh | fxh | fg | fx 43 finvs embedded floating-point invalid operation sticky. location for software to use when implementing true ieee floating point. 44 fdbzs embedded floating-point divide by zero sticky. fdbzs = fdbzs | fdbzh | fdbz 45 funfs embedded floating-point underflow sticky. storage location for software to use when implementing true ieee floating point. 46 fovfs embedded floating-point overflow sticky. storage location for software to use when implementing true ieee floating point. 47 mode embedded floating-point mode (read only on e500) 48 sov integer summary overflow. set whenever an spe instruction (except mtspr ) sets ov. sov remains set until it is cleared by mtspr[spefscr] . 49 ov integer overflow. an overflow occurred in the lower half of the register while a spe integer instruction is being executed. 50 fg embedded floating-point guard bit. floating-point guard bit from the lower half. the value is undefined if the processor takes a floating-point exception due to input error, floating-point overflow, or floating-point underflow. 51 fx embedded floating-point sticky bit. floating bit from the lower half. the value is undefined if the processor takes a floating-point exception due to input error, floating-point overflow, or floating-point underflow. 52 finv embedded floating-point invalid operation error. set when an input value on the high side is a nan, inf, or denorm. also set on a divide if both the dividend and divisor are zero. 53 fdbz embedded floating-point divide by zero error. set of the dividend is non-zero and the divisor is zero. 54 funf embedded floating-point underflow error 55 fovf embedded floating-point overflow error 56 ? reserved, should be cleared. 57 finxe embedded floating-point inexact enable 58 finve embedded floating-point invalid operation/input error exception enable 0 exception disabled 1 exception enabled if the exception is enabled, a floating-point data exception is taken if finv or finvh is set by a floating-point instruction. table 6-36. spefscr field descriptions (continued) bits name function
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-50 freescale semiconductor core register summary 6.14.1 accumulator (acc) 59 fdbze embedded floating-point divide-by-zero exception enable 0 exception disabled 1 exception enabled if the exception is enabled, a floating-point data exception is taken if fdbz or fdbzh is set by a floating-point instruction. 60 funfe embedded floating-point underflow exception enable 0 exception disabled 1 exception enabled if the exception is enabled, a floating-point data exception is taken if funf or funfh is set by a floating-point instruction. 61 fovfe embedded floating-point overflow exception enable 0 exception disabled 1 exception enabled if the exception is enabled, a floating-point data exception is taken if fovf or fovfh is set by a floating-point instruction. 62?63 frmc embedded floating-point rounding mode control 00 round to nearest 01 round toward zero 10 round toward +infinity 11 round toward ?infinity 0313263 field upper word lower word reset all zeros r/w r/w figure 6-55. accumulator (acc) table 6-37. acc field descriptions bits name function 0?31 upper word holds the upper-word accumulate value for spe multiply with accumulate instructions 32?63 lower word holds the lower-word accumulate value for spe multiply with accumulate instructions table 6-36. spefscr field descriptions (continued) bits name function
performance monitor registers (pmrs) MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-51 6.15 performance monitor registers (pmrs) table 6-38. supervisor-level pmrs (pmr[5] = 1) abbreviation register name pmr number pmr[0?4] pmr[5?9] section/ page pmc0 performance monitor counter 0 16 00000 10000 6.15.4/6-54 pmc1 performance monitor counter 1 17 00000 10001 pmc2 performance monitor counter 2 18 00000 10010 pmc3 performance monitor counter 3 19 00000 10011 pmgc0 performance monitor global control register 0 400 01100 10000 6.15.1/6-52 pmlca0 performance monitor local control a0 144 00100 10000 6.15.2/6-52 pmlca1 performance monitor local control a1 145 00100 10001 pmlca2 performance monitor local control a2 146 00100 10010 pmlca3 performance monitor local control a3 147 00100 10011 pmlcb0 performance monitor local control b0 272 01000 10000 6.15.3/6-53 pmlcb1 performance monitor local control b1 273 01000 10001 pmlcb2 performance monitor local control b2 274 01000 10010 pmlcb3 performance monitor local control b3 275 01000 10011 table 6-39. user-level pmrs (pmr[5] = 0) (read only) abbreviation register name pmr number pmr[0?4] pmr[5?9] section/ page upmc0 user performance monitor counter 0 0 00000 00000 6.15.4/6-54 upmc1 user performance monitor counter 1 1 00000 00001 upmc2 user performance monitor counter 2 2 00000 00010 upmc3 user performance monitor counter 3 3 00000 00011 upmlca0 user performance monitor local control a0 128 00100 00000 6.15.3/6-53 upmlca1 user performance monitor local control a1 129 00100 00001 upmlca2 user performance monitor local control a2 130 00100 00010 upmlca3 user performance monitor local control a3 131 00100 00011 upmlcb0 user performance monitor local control b0 256 01000 00000 6.15.3/6-53 upmlcb1 user performance monitor local control b1 257 01000 00001 upmlcb2 user performance monitor local control b2 258 01000 00010 upmlcb3 user performance monitor local control b3 259 01000 00011 upmgc0 user performance monitor global control register 0 384 01100 00000 6.15.2/6-52
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-52 freescale semiconductor core register summary 6.15.1 global control register 0 (pmgc0, upmgc0) 6.15.2 local control a registers (pmlca0?pmlca3, upmlca0?upmlca3) 32 33 34 35 63 field fac pmie fcece ? reset all zeros r/w pmgc0: supervisor r/w; upmgc0: user read-only pmr pmgc0: pmr400; upmgc0: pmr384 figure 6-56. performance monitor global control register 0 (pmgc0), user performance monitor global control register 0 (upmgc0) table 6-40. pmgc0 field descriptions bits name description 32 fac freeze all counters. when fac is set by hardware or software, pmlcx[fc] maintains its current value until it is changed by software. 0 the pmcs are incremented (if permitted by other pm control bits). 1 the pmcs are not incremented. 33 pmie performance monitor interrupt enable 0 performance monitor interrupts are disabled. 1 performance monitor interrupts are enabled and occur when an enabled condition or event occurs. 34 fcece freeze counters on enabled condition or event 0 the pmcs can be incremented (if permitted by other pm control bits). 1 the pmcs can be incremented (if permitted by other pm control bits) only until an enabled condition or event occurs. when an enabled condition or event occurs, pmgc0[fac] is set. it is up to software to clear fac. 35?63 ? reserved, should be cleared. 32 33 34 35 36 37 38 40 41 47 48 63 field fc fcs fcu fcm1 fcm0 ce ? event reset all zeros r/w pmlca0?pmlca3: supervisor r/w upmlca0?upmlca3: user read-only pmr pmlca0: pmr144, pmlca1: pmr145, pmlca2: pmr146, pmlca3: pmr147 upmlca0: pmr128, upmlca1: pmr129, upmlca2: pmr130, upmlca3: pmr131 figure 6-57. local control a registers (pmlca0?pmlca3), user local control a registers (upmlca0?upmlca3)
performance monitor registers (pmrs) MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 6-53 6.15.3 local control b registers (pmlcb0?pmlcb3, upmlcb0?upmlcb3) table 6-41. pmlca0?pmlca3 field descriptions bits name description 32 fc freeze counter 0 the pmc is incremented (if permitted by other pm control bits). 1 the pmc is not incremented. 33 fcs freeze counter in supervisor state 0 the pmc is incremented (if permitted by other pm control bits). 1 the pmc is not incremented if msr[pr] = 0. 34 fcu freeze counter in user state 0 the pmc is incremented (if permitted by other pm control bits). 1 the pmc is not incremented if msr[pr] = 1. 35 fcm1 freeze counter while mark = 1 0 the pmc is incremented (if permitted by other pm control bits). 1 the pmc is not incremented if msr[pmm] = 1. 36 fcm0 freeze counter while mark = 0 0 the pmc is incremented (if permitted by other pm control bits). 1 the pmc is not incremented if msr[pmm] = 0. 37 ce condition enable 0pmc x overflow conditions cannot occur (pmc x cannot cause interrupts, cannot freeze counters) 1 overflow conditions occur when the most-significant bit of pmc x is equal to 1. it is recommended that ce be cleared when counter pmc x is selected for chaining. 38?40 ? reserved, should be cleared. 41?47 event event selector. up to 128 events selectable. these events are described in the powerpc e500 core reference manual. 48?63 ? reserved, should be cleared. 32 52 53 55 56 57 58 63 field ? threshmul ? threshold reset all zeros r/w pmlcb0?pmlcb3: supervisor r/w upmlcb0?upmlcb3: user read-only pmr pmlcb0: pmr272, pmlcb1: pmr273, pmlcb2: pmr274, pmlcb3: pmr275 upmlcb0: pmr256, upmlcb1: pmr257, upmlcb2: pmr258, upmlcb3: pmr259 figure 6-58. local control b registers (pmlcb0?pmlcb3), user local control b registers (upmlcb0?upmlcb3)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 6-54 freescale semiconductor core register summary 6.15.4 performance monitor counter registers (pmc0?pmc3, upmc0?upmc3) table 6-42. pmlcb0?pmlcb3 field descriptions bits name description 32?52 ? reserved, should be cleared. 53?55 threshmul threshold multiple 000 threshold field is multiplied by 1 (pmlcb n [threshold] 1) 001 threshold field is multiplied by 2 (pmlcb n [threshold] 2) 010 threshold field is multiplied by 4 (pmlcb n [threshold] 4) 011 threshold field is multiplied by 8 (pmlcb n [threshold] 8) 100 threshold field is multiplied by 16 (pmlcb n [threshold] 16) 101 threshold field is multiplied by 32 (pmlcb n [threshold] 32) 110 threshold field is multiplied by 64 (pmlcb n [threshold] 64) 111 threshold field is multiplied by 128 (pmlcb n [threshold] 128) 56?57 ? reserved, should be cleared. 58?63 threshold threshold. only events that exceed the threshold value are counted. such events are implementation-dependent as are the dimension (for example duration in cycles) and granularity with which the value is interpreted. by varying the value, software can obtain a profile of the event characteristics subject to thresholding. for example, if pmc1 is configured to count cache misses that last longer than the threshold value, software can obtain the distribution of cache miss durations for a given program by monitoring the program repeatedly using a different threshold each time. 32 33 63 field ov counter value reset all zeros r/w pmc0?pmc3: supervisor r/w upmc0?upmc3: user read only pmr pmc0: pmr16, pmc1: pmr17, pmc2,: pmr18, pmc3: pmr19 upmc0: pmr0, upmc1: pmr1, upmc2,: pmr2, upmc3: pmr3 figure 6-59. performance monitor counter registers (pmc0?pmc3), user performance monitor counter registers (upmc0?upmc3) table 6-43. pmc0?pmc3 field descriptions bits name description 32 ov overflow. when this bit is set, it indicates this counter reaches its maximum value. 33?63 counter value indicates the number of occurrences of the specified event
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 7-1 chapter 7 l2 look-aside cache/sram this chapter describes the organization of the on-chip l2/sram, cache coherency rules, cache line replacement algorithm, cache control instructions, and various cache operations. it also describes the interaction between the l2/sram and the e500 core complex. 7.1 l2 cache overview the integrated 256-kbyte l2 cache is organized as 1024 eight-way sets of 32-byte cache lines based on 32-bit physical addresses, as shown in figure 7-1 . figure 7-1. l2 cache/sram configuration the sram can be configured with memory-mapped registers as externally accessible memory-mapped sram in addition to or instead of cache. the l2 cache can operate in the following modes, described in section 7.2, ?cache organization? :  full cache mode (256-kbyte cache)  full memory-mapped sram mode (256-kbyte sram mapped as a single 256-kbyte block or two 128-kbyte blocks)  half sram and half cache mode (128-kbyte cache and 128-kbyte memory-mapped sram) e500 core 32-kbyte l1 instruction cache 32-kbyte l1 data cache core complex bus e500 core complex 256-kbyte l2 cache/sram coherency module 64 128 128 two 128-kbyte banks (8-way) independently programmable as l2 cache or sram wr rd2 rd1 dout wr in rd in
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 7-2 freescale semiconductor l2 look-aside cache/sram 7.1.1 l2 cache and sram features two 128-kbyte arrays can be designated independently as externally-accessible memory-mapped sram or cache. the l2 cache has the following characteristics:  write-through, front-side cache ? front-side design provides easier cache access for i/o masters such as ethernet and rapidio ? write-through design is more efficient on the processor bus for front-side caches  valid, locked, and stale states (no modified state)  two input data buses (64 and 128 bits) and one output data bus (128 bits wide)  all accesses are fully pipelined and non-blocking (allows hits under misses)  256-kbyte array organized as 1024 eight-way sets of 32-byte cache lines  eight-way set associativity (high level of associativity yields good performance even with many locked lines)  tag arrays contain 17 tag bits and 1 tag parity bit per line to support 256-kbyte cache (1024 sets), or 18 tag bits to support 128-kbyte cache (512 sets).  configurable to allocate processor instructions, data, or both ? allows external writes (stashing) to allocate and optionally lock a line using one of the two following methods: ? attributes attached to the transactions by initiator or atmu ? i/o devices can force memory writes to be allocated using programmed memory ranges  pseudo-lru (7-bit replacement algorithm)  data ecc on 64-bit boundaries (single-error correction, double-error detection)  tag parity for 256-kbyte mode (1 tag bit per line covering cache tags)  cache locking methods ? individual line locks are set and cleared by using e500 cache locking apu instructions? data cache block touch and lock set ( dcbtls ), data cache block touch for store and lock set ( dcbtstls ), and instruction cache block touch and lock set ( icbtls ). ? a lock attribute can be attached to write operations. ? individual line locks are set and cleared through core-initiated instructions, by external reads or writes, or by accesses to programmed memory ranges defined in l2 cache external write address registers (l2cewar n ). ? the entire cache can be locked by setting a configuration register appropriately.  lock clearing methods ? individual locks cleared by cache locking apu instructions (instruction cache block lock clear ( icblc ) and data cache block lock clear ( dcblc )) or by snooped flush unless entire cache is locked
cache organization MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 7-3 ? flash clearing of all instruction and/or data locks is done by writes to configuration registers ? an unlock attribute attached to a read instruction.  error injection modes for testing sram features include the following:  i/o devices access sram regions by marking transactions as snoopable (global)  regions can reside at any aligned location in the memory map  for accesses of less than a cache-line, byte-accessible ecc is protected using read-modify-write transactions. 7.2 cache organization when the entire 256-kbyte array is used as a cache, it has two banks each containing 512 sets of eight cache blocks (eight ways), as shown in figure 7-2 . each block consists of 32 bytes of data and an address tag. figure 7-2. cache organization 512 sets block 5 block 6 block 7 way 4 address tag 4 address tag 5 address tag 6 address tag 7 way 1 way 2 way 3 way 0 address tag 0 address tag 1 address tag 2 address tag 3 words [0?7] words [0?7] words [0?7] words [0?7] words [0?7] words [0?7] words [0?7] words [0?7] 8 words/block 512 sets way 5 way 6 way 7 way 4 address tag 4 address tag 5 address tag 6 address tag 7 way 1 way 2 way 3 way 0 address tag 0 address tag 1 address tag 2 address tag 3 words [0?7] words [0?7] words [0?7] words [0?7] words [0?7] words [0?7] words [0?7] words [0?7] bank 1 bank 0 8 words/block
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 7-4 freescale semiconductor l2 look-aside cache/sram the tag size depends on whether both 128-kbyte arrays are configured as cache. figure 7-3 shows how physical address bits are used to access the l2 in full cache mode (256-kbyte cache). figure 7-3. 256-kbyte l2 cache address configuration?full cache mode physical address bits 17?26 identify the bank and set of the tag and data. physical address bits 0?16 are compared against the tags of all 8 ways. a match of a valid tag selects a 32-byte block of data within the set. physical address bits 27?31 identify the byte or bytes of data within the block. if the l2 is programmed as one block of 256-kbyte sram, physical address bits 14?16 are used as the way select, without a tag lookup. in half sram, half cache mode (128-kbyte cache), there is no bank select, as shown in figure 7-4 , so the tag is 18 bits (with no parity bit) for cache accesses. the cache resides in bank 1, and the sram in bank 0. for sram accesses, physical address bits 15?17 are used as the way select. if the l2 is programmed as two blocks of 128-kbyte sram, bank 0 is block 0 (defined by l2srbar0, see table 7-5 ) and bank 1 is block 1. as shown in figure 7-4 , the tag is 18 bits (with no parity bit) for cache accesses. for sram accesses, physical address bits 15?17 are used as the way select. 26 17 16 0 set index (9 bits) 18 bank select tag (17 bits) 31 27 26 17 byte select set index (9 bits) 18 bank select (5 bits) (within a cache line) tag lookup data read/write
cache organization MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 7-5 figure 7-4. 128-kbyte l2 cache address configuration?half sram, half cache mode the e500 core connects to the l2 cache and the system interface through the high-speed core complex bus (ccb). the e500 core and the l2 cache connect to the rest of the integrated device through the e500 coherency module (ecm). figure 7-5 shows the data connections of the e500 core and l2/sram. the e500 core can simultaneously read 128 bits of data from the l2/sram, read 64 bits of data from the system interface, and write 128 bits of data to the l2/sram and/or system interface. the l2/sram can be accessed by the e500 core or the system interface through the ecm. the l2 cache does not initiate transactions. figure 7-5 shows the data bus connections of the e500 core and l2/sram. . figure 7-5. data bus connection of ccb 31 27 26 byte select set index (9 bits) 18 (within a cache line) (5 bits) 26 18 17 0 tag (18 bits) way select (sram access only) (3 bits) tag lookup data read/write 15 17 set index (9 bits) e500 core l2/sram wr rd2 dout wr in rd1 rd in 64 e500 coherency module 128 128 (ecm)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 7-6 freescale semiconductor l2 look-aside cache/sram figure 7-6 shows address connections of the e500 core and l2/sram. figure 7-6. address bus connection of ccb in sram mode, if a non?cache-line read or write transaction is not preceded by a cache-line write, an ecc error occurs; such a non?cache-line write transaction cannot be allocated in the l2. 7.3 memory map/register definition table 7-1 shows the memory map for the l2/sram registers. undefined 4-byte address spaces within offset 0x000?0xfff are reserved. table 7-1. l2/sram memory-mapped registers offset register access reset section/page 0x2_0000 l2ctl?l2 control register r/w 0x2000_0000 7.3.1.1/7-7 0x2_0010 l2cewar0?l2 cache external write address register 0 r/w 0x0000_0000 7.3.1.2/7-10 0x2_0018 l2cewcr0?l2 cache external write control register 0 r/w 0x0000_0000 7.3.1.3/7-10 0x2_0020 l2cewar1?l2 cache external write address register 1 r/w 0x0000_0000 7.3.1.2/7-10 0x2_0028 l2cewcr1?l2 cache external write control register 1 r/w 0x0000_0000 7.3.1.3/7-10 0x2_0030 l2cewar2?l2 cache external write address register 2 r/w 0x0000_0000 7.3.1.2/7-10 0x2_0038 l2cewcr2?l2 cache external write control register 2 r/w 0x0000_0000 7.3.1.3/7-10 0x2_0040 l2cewar3?l2 cache external write address register 3 r/w 0x0000_0000 7.3.1.2/7-10 0x2_0048 l2cewcr3?l2 cache external write control register 3 r/w 0x0000_0000 7.3.1.3/7-10 0x2_0100 l2srbar0?l2 memory-mapped sram base address register 0 r/w 0x0000_0000 7.3.1.4/7-11 0x2_0108 l2srbar1?l2 memory-mapped sram base address register 1 r/w 0x0000_0000 7.3.1.4/7-11 0x2_0e00 l2errinjhi?l2 error injection mask high register r/w 0x0000_0000 7.3.1.5.1/7-13 0x2_0e04 l2errinjlo?l2 error injection mask low register r/w 0x0000_0000 7.3.1.5.1/7-13 0x2_0e08 l2errinjctl?l2 error injection tag/ecc control register r/w 0x0000_0000 7.3.1.5.1/7-13 0x2_0e20 l2captdatahi?l2 error data high capture register r 0x0000_0000 7.3.1.5.2/7-15 0x2_0e24 l2captdatalo?l2 error data low capture register r 0x0000_0000 7.3.1.5.2/7-15 mstr e500 core l2/sram snoop addr_in e500 coherency module (ecm)
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 7-7 7.3.1 l2/sram register descriptions the following sections describe registers that control and configure the l2/sram array. 7.3.1.1 l2 control register (l2ctl) the l2 control register (l2ctl), shown in figure 7-7 , controls configuration and operation of the l2/sram array. the sequence for modifying l2ctl is as follows: 1. mbar 2. isync 3. stw (wimg = 01xx) ccsrbar+0x2_0000 4. lwz (wimg = 01xx) ccsrbar+0x2_0000 5. mbar 0x2_0e28 l2captecc?l2 error syndrome register r 0x0000_0000 7.3.1.5.2/7-15 0x2_0e40 l2errdet?l2 error detect register special 0x0000_0000 7.3.1.5.2/7-15 0x2_0e44 l2errdis?l2 error disable register r/w 0x0000_0000 7.3.1.5.2/7-15 0x2_0e48 l2errinten?l2 error interrupt enable register r/w 0x0000_0000 7.3.1.5.2/7-15 0x2_0e4c l2errattr?l2 error attributes capture register r/w 0x0000_0000 7.3.1.5.2/7-15 0x2_0e50 l2erraddr?l2 error address capture register r 0x0000_0000 7.3.1.5.2/7-15 0x2_0e58 l2errctl?l2 error control register r/w 0x0000_0000 7.3.1.5.2/7-15 0 1 2 345 6 891011 12 13 15 r l2e l2i l2siz l2blksz 000 l2do l2io 0 l2intdis l2sram w reset 0010_0000_0000_0000 16 17 18 19 20 21 22 23 24 31 r0 0 l2lo l2slc 0 l2lfr l2lfrid 0000 0 000 w reset 0000_0000_0000_0000 offset 0x2_0000 figure 7-7. l2 control register (l2ctl) table 7-1. l2/sram memory-mapped registers (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 7-8 freescale semiconductor l2 look-aside cache/sram table 7-2 describes l2ctl fields. table 7-2. l2ctl field descriptions bits name description 0 l2e l2 enable. used to enable the l2 array (cache or memory-mapped sram). 0 the l2 sram (cache and memory-mapped sram) is disabled and is not accessed for reads, snoops, or writes. setting the l2 flash invalidate bit (l2i) is allowed. 1 the l2 sram (cache or memory-mapped sram) is enabled. note that l2i can be set regardless of the value of l2e. 1 l2i l2 flash invalidate 0 the l2 status and lru bits are not being cleared. 1 setting l2i invalidates the l2 cache globally by clearing the all the l2 status bits, as well as the lru algorithm. memory-mapped sram is unaffected. data in memory-mapped sram regions is unaffected by the flash invalidate. the hardware automatically clears l2i when the invalidate is complete. 2?3 l2siz l2 sram size (read only). indicates the total available size of l2 sram (to be configured as cache or memory-mapped sram). 00 reserved 01 reserved 10 256 kbyte 11 reserved 4?5 l2blksz l2 cache/memory-mapped sram block size. determines the l2 cache/memory-mapped sram block size. to change these bits, the l2 must be disabled (l2ctl[l2e] = 0). l2blksz must be l2siz when l2e = 1. see the description of l2ctl[l2sram] for information on configuring the total sram as cache or memory-mapped sram. 00 reserved 01 128 kbyte 10 256 kbyte 11 reserved 6?8 ? reserved 9 l2do l2 data-only. reserved in full memory-mapped sram mode. l2do may be changed while the l2 is enabled or disabled. 0 the l2 cache allocates entries for instruction fetches that miss in the l2. 1 the l2 cache allocates entries for processor data loads that miss in the l2 and for processor l1 castouts but does not allocate entries for instruction fetches that miss in the l2. instruction accesses that hit in the l2, data accesses, and accesses from the system (including i/o stash writes) are unaffected. note that if l2do and l2io are both set, no new lines are allocated into the l2 cache for any processor transactions, and processor writes and castouts that hit existing data in the cache invalidate those lines rather than updating them. 10 l2io l2 instruction-only. reserved in full memory-mapped sram mode. causes the l2 cache to allocate lines for instruction cache transactions only. l2io may be changed while the l2 is enabled or disabled. 0 the l2 cache entries are allocated for data loads that miss in the l2 and for processor l1 castouts. 1 the l2 cache allocates entries for instruction fetch misses, but does not allocate entries for processor data transactions. data accesses that hit in the l2, instruction accesses, and accesses from the system (including i/o stash writes) are unaffected. note that if l2do and l2io are both set, no new lines are allocated into the l2 cache for any processor transactions, and processor writes and castouts that hit existing data in the cache invalidate those lines rather than updating them. 11 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 7-9 12 l2intdis cache read intervention disable. reserved for full memory-mapped sram mode. used to disable cache read intervention. may be changed while the l2 is enabled or disabled. 0 cache intervention is enabled. the ecm ensures that if a data read from another device hits in the l2 cache, it is serviced from the l2 cache. 1 cache intervention is disabled 13?15 l2sram l2 block assignment. determines the l2 cache/memory-mapped sram block assignment. l2siz = l2blksiz (1 block): 000 block 0 = cache 001 block 0 = sram0 010?111 reserved l2siz = l2blksiz 2 (2 blocks): block 0 block 1 000 unused cache 001 sram0 unused 010 sram0 cache 011 sram0 sram1 1xx reserved to change these bits, the l2 must be disabled (l2ctl[l2e] = 0). 16?17 ? reserved 18 l2lo l2 cache lock overflow. reserved in full memory-mapped sram mode. this sticky bit is set if an overlock condition is detected in the l2 cache. a lock overflow is triggered either by executing instruction or data cache block touch and lock set instructions or by performing l2 cache external writes with lock set. if all ways are locked and an attempt to stash is made, the stash is not allocated. 0 the l2 cache did not encounter a lock overflow. l2lo is cleared only by software. 1 the l2 cache encountered a lock overflow condition. 19 l2slc l2 snoop lock clear. this sticky bit is set if a snoop invalidated a locked data cache line. note that the lock bit for that line is cleared whenever the line is invalidated. l2slc is reserved in full memory-mapped sram mode. 0 a snoop did not invalidate a locked l2 cache line. l2slc is cleared only by software. 1 the l2 cache encountered a snoop that invalidated a locked line. 20 ? reserved 21 l2lfr l2 cache lock bits flash reset. the l2 cache must be enabled (l2ctl[l2e] = 1) for reset to occur. this field is reserved in full memory-mapped sram mode. 0 the l2 cache lock bits are not cleared or the clear operation completed. 1 a reset operation is issued that clears each l2 cache line?s lock bits. depending on the l2lfrid value, data or instruction locks, or both can be reset. cache access is blocked during this time. after l2lfr is set, the l2 cache unit automatically clears l2lfr when the reset operation is complete (if l2ctl[l2e] is set). 22?23 l2lfrid l2 cache lock bits flash reset select instruction or data. indicates whether data or instruction lock bits or both are reset. 00 not used 01 reset data locks if l2lfr = 1 10 reset instruction locks if l2lfr = 1 11 reset both data and instruction locks if l2lfr = 1 24?31 ? reserved table 7-2. l2ctl field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 7-10 freescale semiconductor l2 look-aside cache/sram 7.3.1.2 l2 cache external write address registers 0?3 (l2cewar n ) the MPC8540 supports allocating and locking of l2 cache lines from external agents, such as pci. this functionality is called stashing. the l2 cache external write address registers 0?3 (l2cewar n ) are paired with the l2 cache external write control registers 0?3 (l2cewcr n ) to control the cache external write functionality. each register pair (for example, l2cewar0 and l2cewcr0) specifies a programmed memory range that can be locked with a snoop write transaction. the address register must be naturally aligned to the window size in the corresponding control register. l2cewar n registers contain identical fields, as shown in figure 7-8 . table 7-3 describes l2cewar n fields. 7.3.1.3 l2 cache external write control registers 0?3 (l2cewcr n ) the l2cewar n registers are paired with the l2 cache external write control registers 0?3 (l2cewcr n ), shown in figure 7-9 , to control cache external write functionality. 0 23 24 31 r addr 00000000 w reset all zeros offset 0x2_0010, 0x2_0020, 0x2_0030, 0x2_0040 figure 7-8. l2 cache external write address registers (l2cewar n ) table 7-3. l2cewar n field descriptions bits nam e description 0?23 add r l2 cache external write base address 24?3 1 ?reserved 01 2 78 31 r elock 000000 sizmask w reset all zeros offset 0x2_0018, 0x2_0028, 0x2_0038, 0x2_0048 figure 7-9. l2 cache external write control registers (l2cewcr0?l2cewcr3)
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 7-11 the l2cewcr n registers contain identical fields, which are described in table 7-4 . 7.3.1.4 l2 memory-mapped sram base address registers 0?1 (l2srbar n ) the l2 memory-mapped sram base address registers (l2srbar n ), shown in figure 7-10 , control the memory-mapped sram mode functionality. specified addresses must be aligned to the value in l2ctl[l2blksz]. if l2ctl[l2sram] specifies one memory-mapped sram block, its base address must be written to l2srbar0; if it specifies two memory-mapped sram blocks, l2srbar0 and l2srbar1 are used. table 7-4. l2cewcr n field descriptions bits name description 0 e external write enable. an external write matching the address window defined by l2cewar n /l2cewcr n is allocated or updated in the l2 cache. 0 external writes for the l2cewar n /l2cewcr n pair are disabled. 1 external writes are enabled for the l2cewar n /l2cewcr n pair. 1 lock lock lines in the targeted cache. an external write matching the address window defined by l2cewar n /l2cewcr n is locked in the l2 cache when it is allocated or updated. 0 the locked bit is not set when a line is allocated unless explicitly specified by transaction attributes. 1 cache lines are allocated as locked. a hit to a valid, unlocked lines sets the lock. 2?7 ? reserved 8?31 sizmask mask size. defines the size of the naturally aligned address region for cache external writes. the address region must be aligned to a boundary that is a multiple of the mask size. any value not listed below is illegal and produces boundedly undefined results. 1111 1111 1111 1111 1111 1111 256 bytes 1111 1111 1111 1111 1111 1110 512 bytes 1111 1111 1111 1111 1111 1100 1 kbyte 1111 1111 1111 1111 1111 1000 2 kbytes 1111 1111 1111 1111 1111 0000 4 kbytes 1111 1111 1111 1111 1110 0 000 8 kbytes 1111 1111 1111 1111 1 100 0000 16 kbytes 1111 1111 1111 1111 1000 0000 32 kbytes 1111 1111 1111 1111 0000 0000 64 kbytes 1111 1111 1111 1110 0000 0000 128 kbytes 1111 1111 1111 1 100 0000 0000 256 kbytes 1111 1111 1111 1000 0000 0000 512 kbytes 1111 1111 1111 0000 0000 0000 1 mbyte 1111 1111 1110 0000 0000 0000 2 mbytes 1111 1111 1 100 0000 0000 0000 4 mbytes 1111 1111 1000 0000 0000 0000 8 mbytes 1111 1111 0000 0000 0000 0000 16 mbytes 1111 1110 0000 0000 0000 0000 32 mbytes 1111 1100 0000 0000 0000 0000 64 mbytes 1111 1000 0000 0000 0000 0000 128 mbytes 1111 0000 0000 0000 0000 0000 256 mbytes 1110 0000 0000 0000 0000 0000 512 mbytes 1100 0000 0000 0000 0000 0000 1 gbyte 1000 0000 0000 0000 0000 0000 2 gbytes 0000 0000 0000 0000 0000 0000 4 gbytes 0 17 18 31 r addr 0000000000000 w reset all zeros offset 0x2_0100, 0x2_0108 figure 7-10. l2 memory-mapped sram base address registers (l2srbar n )
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 7-12 freescale semiconductor l2 look-aside cache/sram l2srbar bits are described in table 7-5 . when enabled, the windows defined in l2srbar n supersede all other mappings of these addresses for processor and global (snoopable) i/o transactions. therefore, sram windows must never overlap configuration space as defined by ccsrbar (see section 4.3.1.1.2, ?configuration, control, and status base address register (ccsrbar)? ). overlapping sram and local access windows is discouraged because processor and snoopable i/o transactions would map to the sram while non-snooped i/o transactions would be mapped by the local access windows. only if all accesses to the sram address range are snoopable can results be consistent if sram and local access windows overlap. furthermore, l2srbarn should not overlap a ddr dram space for which a valid chip select is defined. this could result in spurious ecc errors if ecc and speculative reads are enabled. see section 2.2.3.7, ?illegal interaction between local access windows and ddr sdram chip selects.? 7.3.1.5 l2 error registers l2 error detection, reporting, and injection allow flexible handling of ecc and parity errors in the l2 data and tag arrays. when the MPC8540 detects an l2 error, the appropriate bit in the error detect register (l2errdet) is set. error detection is disabled by setting the corresponding bit in the error disable register (l2errdis). the address and attributes of the first detected error are also saved in the error capture registers (l2erraddr, l2errattr, l2captdatahi, l2captdatalo, and l2captacc). subsequent errors set error bits in the error detection registers, but information is saved only for the first one. error reporting (by generating an interrupt) is enabled by setting the corresponding bit in the error interrupt enable register (l2errinten). note that the error detect bit is set regardless of the state of the interrupt enable bit. when an error is detected, if error detection is enabled the l2 cache/sram always asserts an internal error signal with read data to prevent the l1 caches and architectural registers from being loaded with corrupt data. if error detection is disabled, the detected error bit is not set and no internal signal is asserted. the l2 error detect register (l2errdet) is implemented as a bit-reset type register. reading from this register occurs normally; however, write operations can clear but not set bits. a bit is cleared whenever the register is written, and the data in the corresponding bit location is a 1. for example, to clear bit 6 and not affect any other bits in the register, the value 0x0200_0000 is written to the register. table 7-5. l2srbar n field descriptions bits name description 0?17 addr l2 memory-mapped sram base address 18?31 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 7-13 note that in sram mode, if a non?cache-line read or write transaction is not preceded by a cache-line write, an ecc error occurs; such a non?cache-line write transaction cannot be allocated in the l2. 7.3.1.5.1 error injection registers the l2 cache includes support for injecting errors into the l2 data, data ecc, or tag. this may be used to test error recovery software by deterministically creating error scenarios. the preferred method for error injection is to set all data pages to cache-inhibited (mmu tlb entry i = 1) except a scratch page, set l2ctl[l2do] to prevent allocation of instruction accesses, and invalidate the l2 by setting l2ctl[l2i] = 1. the following code sequence triggers an error, then detects it (a is an address in the scratch page): dcbz a | allocates the line in the l1 in the modified state dcbtls_l2 a | forces the line from the l1 and allocates the line in the l2 lwz a data or tag errors are injected into the line, according to the error injection settings in l2errinjhi, l2errinjlo, and l2errinjctl, at allocation. the final load detects and reports the error (if enabled) and allows software to examine the offending data, address, and attributes. note that error injection enable bits in l2errinjctl must be cleared by software and the l2 must be invalidated (by setting l2ctl[l2i]) before resuming l2 normal operation. figure 7-11 shows the l2 error injection mask high register (l2errinjhi). table 7-6 describes l2errinjhi[eimaskhi]. 0 31 r eimaskhi w reset all zeros offset 0x2_0e00 figure 7-11. l2 error injection mask high register (l2errinjhi) table 7-6. l2errinjhi field description bits name description 0?31 eimaskh i error injection mask/high word. a set bit corresponding to a data path bit causes that bit on the data path to be inverted on cache/sram writes if l2errinjctl[derrien] = 1.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 7-14 freescale semiconductor l2 look-aside cache/sram figure 7-12 shows the l2 error injection mask low register (l2errinjlo) fields. table 7-7 describes l2errinjlo[eimasklo]. figure 7-13 shows the l2 error injection mask control register (l2errinjctl). table 7-8 describes l2errinjctl fields. 0 31 r eimasklo w reset all zeros offset 0x2_0e04 figure 7-12. l2 error injection mask low register (l2errinjlo) table 7-7. l2errinjlo field description bits name description 0?3 1 eimaskl o error injection mask/low word. a set bit corresponding to a data path bit causes that bit on the data path to be inverted on sram writes if l2errinjctl[derrien] = 1. 01415162122232431 r00000000000000 0 terrien 000000 eccmb derrien eccerrim w reset all zeros offset 0x2_0e08 figure 7-13. l2 error injection mask control register (l2errinjctl) table 7-8. l2errinjctl field descriptions bits name description 0?14 ? reserved 15 terrien l2 tag array error injection enable 0 no tag errors are injected. 1 all subsequent entries written to the l2 tag array have the parity bit inverted. 16?21 ? reserved 22 eccmb ecc mirror byte enable 0 ecc byte mirroring is disabled 1 the most significant data path byte is mirrored onto the ecc byte if derrien = 1.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 7-15 7.3.1.5.2 error control and capture registers the error control and capture registers control detection and reporting of tag parity, ecc and l2 configuration errors. l2 configuration errors are illegal combinations of l2 size and block size and are detected when the l2 is enabled (l2ctl[l2e] = 1). figure 7-14 shows the l2 error capture data high register (l2captdatahi). table 7-9 describes l2captdatahi[l2data] fields. figure 7-15 shows the l2 error capture data low register (l2captdatalo). 23 derrien l2 data array error injection enable 0 no data errors are injected. 1 subsequent entries written to the l2 data array have data or ecc bits inverted as specified in the data and ecc error injection masks and/or data path byte mirrored onto ecc as specified by ecc mirror byte enable. note: if both ecc mirror byte and data error injection are enabled, ecc mask error injection is performed on the mirrored ecc. 24?31 eccerri m error injection mask for the ecc bits. a set bit corresponding to an ecc bit causes that bit to be inverted on sram writes if derrien = 1. 0 31 rl2data w reset all zeros offset 0x2_0e20 figure 7-14. l2 error capture data high register (l2captdatahi) table 7-9. l2captdatahi field description bits name description 0?31 l2data l2 data high word 0 31 rl2data w reset all zeros offset 0x2_0e24 figure 7-15. l2 error capture data low register (l2captdatalo) table 7-8. l2errinjctl field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 7-16 freescale semiconductor l2 look-aside cache/sram table 7-10 describes l2captdatalo[l2data] fields. figure 7-16 shows the l2 error syndrome register (l2captecc). table 7-11 describes l2captecc fields. figure 7-17 shows the l2 error detect register (l2errdet). table 7-12 describes l2errdet fields. table 7-10. l2captdatalo field description bits name description 0?31 l2data l2 data low word 078 232431 r eccsynd 0000000000000000 e ccchksum w reset all zeros offset 0x2_0e28 figure 7-16. l2 error syndrome register (l2captecc) table 7-11. l2captecc field descriptions bits name description 0?7 eccsynd the calculated ecc syndrome of the failing double word 8?23 ? reserved 24?3 1 eccchksu m the data path ecc of the failing double word 0 1 26 27 28 29 30 31 r mull2err 0000000000000000000000000 0 tparerr mbeccerr sbeccerr 0 l2cfgdis w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_0e40 figure 7-17. l2 error detect register (l2errdet) table 7-12. l2errdet field descriptions bits name description 0 mull2err multiple l2 errors (bit reset, write 1 to clear) 0 multiple l2 errors of the same type were not detected. 1 multiple l2 errors of the same type were detected. 1?26 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 7-17 figure 7-18 shows the l2 error disable register (l2errdis). table 7-13 describes l2errdis fields. 27 tparerr tag parity error (bit reset, write 1 to clear) 0 tag parity error was not detected 1 tag parity error was detected note that if an l2 cache tag parity error occurs on an attempt to write a new line, the l2 cache must be flash invalidated. l2 functionality is not guaranteed if flash invalidation is not performed after a tag parity error. 28 mbeccerr multiple-bit ecc error (bit reset, write 1 to clear) 0 multiple-bit ecc errors were not detected. 1 multiple-bit ecc errors were detected. 29 sbeccerr single-bit ecc error (bit reset, write 1 to clear) 0 single-bit ecc error was not detected 1 single-bit ecc error was detected 30 ? reserved 31 l2cfgerr l2 configuration error (bit reset, write 1 to clear). reports inconsistencies between the l2siz, l2blksz, and l2sram settings of the l2 control register (l2ctl). 0 l2 configuration errors were not detected 1 l2 illegal configuration error detected 0262728293031 r00000000000000000000000000 0 tpardis mbeccdis sbeccdis 0 l2cfgdis w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_0e44 figure 7-18. l2 error disable register (l2errdis) table 7-13. l2errdis field descriptions bits name description 0?26 ? reserved 27 tpardis tag parity error disable 0 tag parity error detection enabled 1 tag parity error detection disabled 28 mbeccdis multiple-bit ecc error disable. note that uncorrectable read errors may cause the assertion of core_fault_in , which causes the core to generate a machine check interrupt, unless it is disabled (by clearing hid1[rfxe]). if rfxe is zero and this error occurs, mbeccdis must be cleared and l2errinten[mbeccinten] must be set to ensure that an interrupt is generated. for more information, see section 6.10.2, ?hardware implementation-dependent register 1 (hid1).? 0 multiple-bit ecc error detection enabled 1 multiple-bit ecc error detection disabled table 7-12. l2errdet field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 7-18 freescale semiconductor l2 look-aside cache/sram figure 7-19 shows the l2 error interrupt enable register (l2errinten). when an enabled error condition exists, the l2 signals an interrupt to the core through the internal int signal. table 7-14 describes l2errinten fields. 29 sbeccdis single-bit ecc error disable 0 single-bit ecc error detection enabled 1 single-bit ecc error detection disabled 30 ? reserved 31 l2cfgdis l2 configuration error disable 0 l2 configuration error detection enabled 1 l2 configuration error detection disabled 0262728293031 r00000000000000000000000000 0 tparinten mbeccinten sbeccinten 0 l2cfginten w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_0e48 figure 7-19. l2 error interrupt enable register (l2errinten) table 7-14. l2errinten field descriptions bits name description 0?26 ? reserved 27 tparinten tag parity error reporting enable 0 tag parity error reporting disabled 1 tag parity error reporting enabled 28 mbeccinten multiple-bit ecc error reporting enable. note that uncorrectable read errors may cause the assertion of core_fault_in , which causes the core to generate a machine check interrupt, unless it is disabled (by clearing hid1[rfxe]). if rfxe is zero and this error occurs, l2errdis[mbeccdis] must be cleared and mbeccinten must be set to ensure that an interrupt is generated. for more information, see section 6.10.2, ?hardware implementation-dependent register 1 (hid1).? 0 multiple-bit ecc error reporting disabled 1 multiple-bit ecc error reporting enabled 29 sbeccinten single-bit ecc error reporting enable 0 single-bit ecc error reporting disabled 1 single-bit ecc error reporting enabled 30 ? reserved 31 l2cfginten l2 configuration error reporting enable 0 l2 configuration error reporting disabled 1 l2 configuration error reporting enabled table 7-13. l2errdis field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 7-19 figure 7-20 shows the l2 error attributes capture register (l2errattr). table 7-15 describes l2errattr fields. 012 345 7 8 91011 15161718 1920 30 31 r00 dwnum 0 transsiz burst 00 transsrc 00 transtype 0 0000000000 valinfo w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_0e4c figure 7-20. l2 error attributes capture register (l2errattr) table 7-15. l2errattr field descriptions bits name description 0?1 ? reserved 2?3 dwnum double-word number of the detected error (data ecc errors only) 4?reserved 5?7 transsiz transaction size for detected error single-beat burst 000 8 bytes reserved 001 1 byte 16 bytes 010 2 bytes 32 bytes 011 3 bytes reserved single-beat burst 100 4 bytes reserved 101 5 bytes reserved 110 6 bytes reserved 111 7 bytes reserved 8 burst burst transaction for detected error 0 single-beat ( 64 bits) transaction 1 burst transaction 9?10 ? reserved 11?15 transsrc transaction source for detected error 00000external (system logic) 10000processor (instruction) 10001processor (data) 16?17 ? reserved 18?19 transtyp e transaction type for detected error 00 snoop (tag/status read) 01 write 10 read 11 read-modify-write 20?30 ? reserved 31 valinfo l2 capture registers valid 0 l2 capture registers contain no valid information or no enabled errors were detected. 1 l2 capture registers contain information of the first detected error which has reporting enabled. software must clear this bit to unfreeze error capture so error detection hardware can overwrite the capture address/data/attributes for a newly detected error.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 7-20 freescale semiconductor l2 look-aside cache/sram figure 7-21 shows the l2 error address capture register (l2erraddr). table 7-16 describes l2erraddr[l2addr] fields. figure 7-22 shows the l2 error control register (l2errctl). table 7-17 describes l2errctl fields. 0 31 r l2addr w reset all zeros offset 0x2_0e50 figure 7-21. l2 error address capture register (l2erraddr) table 7-16. l2erraddr field description bits name description 0?31 l2addr l2 address corresponding to detected error 0 7 8 1516 2324 31 r00000000 l2cthresh 00000000 l2ccount w reset all zeros offset 0x2_0e58 figure 7-22. l2 error control register (l2errctl) table 7-17. l2errctl field descriptions bits name description 0?7 ? reserved 8?15 l2cthresh l2 cache threshold. threshold value for the number of ecc single-bit errors that are detected before reporting an error condition 16?23 ? reserved 24?31 l2ccount l2 count. counts ecc single-bit errors detected. if l2ccount equals the ecc single-bit error trigger threshold, an error is reported if single-bit error reporting is enabled
external writes to the l2 cache (cache stashing) MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 7-21 7.4 external writes to the l2 cache (cache stashing) data from an i/o master can be allocated into the l2 cache while simultaneously being written to memory. external writes can be performed from any i/o master:  ethernet rapidio pci dma new cache lines are allocated for full cache line writes, unless the line is already valid or locked. sub?cache-line write data is stashed only if the line is valid in the cache. a read-modify-write process is used to merge the stashed data with the valid line data. the l2 cache external write address registers 0?3 (l2cewar n ) are paired with the l2 cache external write control registers 0?3 (l2cewcr n ) to control the cache stashing functionality. each register pair (for example, l2cewar0 and l2cewcr0) specifies a programmed memory range that can be locked with a snoop write transaction. the address register must be naturally aligned to the window size in the corresponding control register. for more information, see section 7.3.1.2, ?l2 cache external write address registers 0?3 (l2cewarn),? and section 7.3.1.3, ?l2 cache external write control registers 0?3 (l2cewcrn).? note that stashing can occur regardless of whether the l1 cache is enabled. note that stashing can also occur even if the cache-inhibited bit in the mmu is set for the page. when the core looks for (and does not find) the stashed data in the l1 cache, a transaction is generated in which the l2 cache responds by updating the l1 cache with the requested data. for information on how to initiate cache stashing, see the respective chapters for the i/o masters, listed above, that support stashing. 7.5 l2 cache timing table 7-18 shows the timing of back-to-back loads that miss in the l1 data cache and hit in the l2 cache, assuming the core is running at 2 1/2 times the l2 cache frequency. the l2 returns the 128 bits containing the requested data (critical quad word) first. this data is forwarded to the result register before the full cache line reloads the l1.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 7-22 freescale semiconductor l2 look-aside cache/sram . 7.6 l2 cache and sram coherency this section explains the rules of cache and memory-mapped sram coherency. the term ?snoop transaction? refers to transactions initiated by the MPC8540 system logic or by i/o traffic, as opposed to e500 core-initiated transactions. 7.6.1 l2 cache coherency rules l2 cache coherency rules are as follows:  the l2 is non-inclusive of the l1?valid l1 lines may be valid or invalid in the l2.  the l2 cache holds no modified data. there are four states?invalid, exclusive, exclusive locked, and stale. table 7-18. fastest read timing?hit in l2 core clocks 1234567891011121314151617181920212223242526 e500 core load 1 to d-cache d-cache miss to c iu ciu q to c iu lsu dlfb lsu reads command lsu reads out data result bus e500 core load 2 to d-cache d-cache miss to ciu ciu q to c i u lsu dlfb lsu reads command lsu reads out data result bus ccb clocks <12 345 6 7 8 91011> ccb address bus load 1 bg ts aack hit data- comin g ccb address bus load 2 bg ts aack hit data- comin g ccb data bus load 1 data data ccb data bus load 2 data data
l2 cache and sram coherency MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 7-23  the l2 allocates entries for data cast-out or pushed (non-global, non-write-through write with kill) from the l1 caches.  lines for e500 core-initiated burst read transactions are allocated as exclusive in the l2.  the l2 supports i/o devices reading data from valid lines in the l2 cache (data intervention) if l2ctl[l2intdis] = 0. an optional unlock attribute causes i/o reads to clear a lock when the read is performed.  the l2 cache does not respond to cache-inhibited read transactions.  e500 core-initiated, cache-inhibited store transactions invalidate the line when they hit on a valid l2 line. if the line is locked, it goes to the stale state. for other write transactions the cache-inhibited bit is ignored.  non-burst cacheable write transactions from the e500 core (generated by write-through cacheable stores) update a valid l2 cache line through a read-modify-write operation.  e500 core cast out transactions that hit on a stale line in the l2 cache cause a data update of the line and a change to the valid locked state for that line.  an e500 core-initiated, cacheable, non-write-through store that misses in l1 and hits on a line in the l2 invalidates that line in the l2. if the line is marked exclusive locked, the l2 marks the line as stale.  transactions that hit a stale l2 cache line that would cause an allocate if they miss cause a data update of the line (when data arrives from memory) and a change to the line?s valid locked state. data is not supplied by the l2 cache for the read in this case.  the following transactions kill the data and the respective locks when they hit a valid l2 line: ? dcbf ? dcbi  the l2 cache supports mixed cache external writes and core-initiated writes to the same addresses if the core-initiated writes are marked coherency-required, caching allowed, not write-through (wimg = 001x) and the external writes are marked coherency-required, caching-allowed.  the l2 cache supports writes to the l2 cache from peripheral devices or from i/o controllers through snoop write transactions with addresses that hit in a programmed memory range. full-cache-line (32-byte) write transactions update the data for a valid line in the l2, and if the line is not valid in the l2, a line is allocated. sub-cache-line write transactions update the data only for valid l2 cache lines through read-modify-write operations.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 7-24 freescale semiconductor l2 look-aside cache/sram  the l2 cache supports burst writes that lock an l2 cache line from peripheral devices or from i/o controllers through write transactions with addresses that hit in a programmed memory range that has the lock attribute set.  the l2 cache supports burst writes that allocate and/or lock an l2 cache line from peripheral devices or i/o controllers through a write allocate transaction. see the system logic programming model (for example, that of the dma controller) for details on how to set the transaction type for cache external writes to the l2. 7.6.2 memory-mapped sram coherency rules memory-mapped sram coherency rules are as follows:  external (non?core-initiated) accesses to memory-mapped sram must be marked coherency-required. external accesses marked coherency-not-required to memory-mapped sram may cause an address unavailable error.  accesses to memory-mapped sram are cacheable only in the corresponding e500 l1 caches. external accesses must be marked cache-inhibited or be performed with non-caching transactions. 7.7 l2 cache locking the MPC8540 caches can be locked and cleared using the following methods:  cache locking methods ? individual line locks are set and cleared by using instructions defined by the e500 cache locking apu, which is part of the freescale book e implementation standards (eis). these instructions include data cache block touch and lock set ( dcbtls ), data cache block touch for store and lock set ( dcbtstls ), and instruction cache block touch and lock set ( icbtls ). for detailed information about these instructions, see the powerpc e500 core reference manual. ? a lock attribute can be attached to write operations. ? individual line locks are set and cleared through core-initiated instructions, by external reads or writes, or by accesses to programmed memory ranges defined in l2 cache external write address registers (l2cewarn). ? the entire cache can be locked by setting configuration registers appropriately.  methods for clearing locks ? individual locks are cleared by cache locking apu instructions (instruction cache block lock clear ( icblc ) and data cache block lock clear ( dcblc )) or by snooped flush unless the entire cache is locked.
l2 cache locking MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 7-25 ? flash clearing of all instruction and/or data locks can be done by writes to configuration registers. ? an unlock attribute can be attached to i/o read operations. 7.7.1 locking the entire l2 cache the entire l2 cache can be locked by setting l2ctl[l2do] = 1 and l2ctl[l2io] = 1. this has the effect of preventing any further allocation of new lines in the cache by core requests. if there are lines in the cache that are not valid, they cannot be used by core requests until the cache is unlocked. while the cache is locked, read requests are serviced as normal, and snooping continues as normal to maintain coherency. lines invalidated to satisfy coherency requirements cannot be reallocated by core requests while the cache remains locked. the l2 cache can be unlocked by clearing l2ctl[l2io] and/or l2ctl[l2do]. note that l2ctl[l2do] and l2ctl[l2io] have no effect on cache external write allocations or memory-mapped sram. note that this form of cache locking does not use the lock bits of the cache and cannot be cleared by resetting the cache or lock bits. 7.7.2 locking programmed memory ranges a programmed memory range can be locked with a snoop write transaction that matches a cache external write address range (specified by l2cewar n and l2cewcr n ). there is no clearing of locks through the programmed address ranges. locks can be cleared using clear lock instructions, flushes, or read-and-clear-lock snoop (rwnitc with clear lock attribute), or flash clear locks. 7.7.3 locking selected lines individual lines are locked when the l2 receives one of the following burst transactions:  icbtls (ct = 1)?instruction cache block touch and lock set instruction  dcbtls (ct = 1)?data cache block touch and lock set instruction  dcbtstls (ct = 1)?data cache block touch for store and lock set instruction  snoop burst write?if the address hits on a programmed cache external write space with the lock attribute set, or if the write allocate transaction type is used  snoop non-burst write?if the address hits on a programmed cache external write space with the lock attribute set note that the core complex broadcasts these instructions to the l2 if the ct field in the instruction specifies the l2 cache (ct = 1). when the l2 cache is specified, data is not placed in the l1, only the l2. if the l1 cache is specified (ct = 0), the l2 does not lock the line, and the data is placed in the l1 (and locked).
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 7-26 freescale semiconductor l2 look-aside cache/sram when the touch lock set l2 instruction ( dcbtls or dcbtstls ) hits are modified in the l1 cache, the modified data is allocated into the l2 cache (and written back to main memory) and a data lock is set. the l1 line state transitions to invalid. note that if the l2 receives a request to allocate and lock a line, but all lines in the selected way are locked, the requested l2 line is not allocated and the l2 cache lock overflow bit (l2ctl[l2lo]) is set. lines invalidated to satisfy coherency requirements cannot be reallocated while the cache remains locked. 7.7.4 clearing locks on selected lines individual locks in the l2 are cleared by a lock clear ( icblc or dcblc, ct = 1) instruction. this directs the l2 cache to clear a lock on that line if it hits in the l2 cache. both data and instruction locks are cleared by the icblc and dcblc instructions. note that the lock on a line is cleared if the line is invalidated by a snooped flush transaction, and the line in the cache is available for allocation of a new line of instruction or data unless the entire cache is locked. note there is a scenario in which a lock clear operation appears to fail to clear a lock in the l2 cache. this occurs only when the attempt to set the lock results in a bus error (for example, pci returns an error condition). assume the following scenario: 1. the e500 attempts to set a lock in the l2 cache (by executing a dcbtls or icbtls instruction with ct = 1). the line is not already present in the cache, so it must be read from external memory. this read encounters an error which, depending on the chip configuration, will be reported to the core (probably as an interrupt). 2. at (or near) the same time, a cache external write to the same cache line is being mastered by the ecm. 3. very soon after the cache external write, a transaction to clear the lock occurs. this can be caused by the processor executing a dcblc or icblc instruction with ct = 1, or by the ecm mastering a lock clear transaction. if this scenario occurs within a tight timing window, the cache line may unexpectedly remain locked at the end of the sequence.
plru l2 replacement policy MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 7-27 the interrupt handler may want to clear the erroneously remaining lock in this case. 7.7.5 flash clearing of instruction and data locks locks for instructions and data are recorded separately in the l2 cache, and they can be flash cleared separately by writing the appropriate value to the l2 cache control register (l2ctl[l2lfr] and l2ctl[l2lfrid]). flash invalidating of the l2 (setting l2ctl[l2i]) clears all locks on both instructions and data. note that flash clearing is the only way to clear data locks without clearing instruction locks, or to clear instruction locks without clearing data locks. all instructions and snoop transactions that clear locks clear both data and instruction locks. 7.7.6 locks with stale data if data is locked in the l2 and either the e500 core performs a cacheable copyback store or a dcbtst misses in the l1, the l2 invalidates the line; however, the l2 clears the valid bit for the data, the lock remains, and the line cannot be victimized. if the e500 core casts out modified data or pushes it in response to a non-flush snoop, the l2 updates the data and sets the valid bit again, maintaining the lock and keeping the data in the cache hierarchy. 7.8 plru l2 replacement policy line replacement is determined using a pseudo least-recently-used (plru) algorithm. there is a valid bit (v0?v7) for each line. to determine the replacement victim (the line to be cast out), there are seven plru bits (p0?p6) for each set. plru bits are updated every time a new line is allocated or replaced and every time a line is modified or invalidated. there are two sets of lock bits, one for instructions (i0?i7) and one for data (d0?d7) for every line. the lock bits act as a mask over the plru bits to determine victim selection. the plru bits are updated regardless of line locking. figure 7-23 shows the binary decision tree used to generate the victim line. the eight ways of the l2 cache are labeled w0?w7; the seven plru bits are labeled p0?p6.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 7-28 freescale semiconductor l2 look-aside cache/sram figure 7-23. l2 cache line replacement algorithm 7.8.1 plru bit update considerations plru bits are updated when a way is modified, either by a write, an invalidate, or an allocation of a new line. plru bit updates depend on which cache way was last accessed, as summarized in table 7-19 . when an l2 line is invalidated, the plru bits are updated, marking the corresponding way as least-recently-used. this causes the invalidated way to be selected as the next victim. table 7-19. plru bit update algorithm last way accessed plru bits p 0 p 1 p 2 p 3 p 4 p 5 p 6 0 1 1?1??? 1 1 1?0??? 210??1?? 310??0?? 40?1??1? 50?1??0? 6 0?0???1 7 0?0???0 p0 = 0? p1 = 0? p2 = 0? p3 = 0? p5 = 0? p4 = 0? p6 = 0? allocate w0 allocate w1 allocate w2 allocate w3 allocate w4 allocate w5 allocate w6 allocate w7 yes yes ye s ye s ye s ye s no no no no no no ye s n o p0 p1 p2 p3 p4 p6 0 0 x 0 p5 x x x 0 1 x x 0 x x 0 1 x x 1 x x 0 0 x 1 x x x 1 x 0 x x 0 x 1 x 0 x x 1 x 1 x 1 x x x 0 1 x 1 x x x 1
l2 cache operation MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 7-29 7.8.2 allocation of lines l2 cache lines are locked through the status array lock bits. there are two lock bits for each way of each set (1024 sets by eight ways). these bits are set or cleared through special l2 controller commands. lock bits are used at allocate time to steer the plru algorithm away from selecting locked victims. in the following discussion, the eight lock bits for a particular set are called l0?l7. where lock way i: li = di | ii, i=0...7 (di = data lock, ii = instruction lock) an effective value of each plru bit is calculated as follows: p0_eff = f(p0,l0,l1,l2,l3,l4,l5,l6,l7) = (l0 & l1 & l2 & l3) | (p0 & ~(l4 & l5 & l6 & l7)) p1_eff = f(p1,l0,l1,l2,l3) = (l0 & l1) | (p1 & ~(l2 & l3)) p2_eff = f(p2,l4,l5,l6,l7) = (l4 & l5) | (p2 & ~(l6 & l7)) p3_eff = f(p3,l0,l1) = l0 | (p3 & ~l1) p4_eff = f(p4,l2,l3) = l2 | (p4 & ~l3) p5_eff = f(p5,l4,l5) = l4 | (p5 & ~l5) p6_eff = f(p6,l6,l7) = l6 | (p6 & ~l7) these effective plru bits are used to select a victim, as indicated in table 7-20 . 7.9 l2 cache operation this section describes the behavior of the l1 and l2 cache in response to various operations and in various configurations. 7.9.1 l2 cache states the l2 status array uses four bits for each line to determine the status of the line. different combinations of these bits result in different l2 states. the status bits are as follows:  valid (v)  instruction locked (il)  data locked (dl)  stale (t) table 7-20. plru-based victim selection mechanism way selected plru state (binary) reduced logic equation w0 00x0xxx ~p0 & ~p1 & ~p3 w1 00x1xxx ~p0 & ~p1 & p3 w2 01xx0xx ~p0 & p1 & ~p4 w3 01xx1xx ~p0 & p1 & p4 w4 1x0xx0x p0 & ~p2 & ~p5 w5 1x0xx1x p0 & ~p2 & p5 w6 1x1xxx0 p0 & p2 & ~p6 w7 1x1xxx1 p0 & p2 & p6
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 7-30 freescale semiconductor l2 look-aside cache/sram table 7-21 shows l2 cache states. note that these conventions are also used in table 7-22 . 7.9.2 flash invalidation of the l2 cache the l2 cache may be completely invalidated by setting the l2i bit of the l2 control register (l2ctl). note that no data is lost in this process because the l2 cache is a write-through cache and contains no modified data. flash invalidation of the cache is necessary when the cache is initially enabled and may be necessary to recover from some error conditions such as a tag parity error. the invalidation process requires several cycles to complete. the l2i bit remains set during this procedure and is then cleared automatically when the procedure is complete. the l2 cache controller issues retries for all transactions on the e500 core complex bus (ccb) while the flash invalidation process is in progress. note that the contents of memory-mapped sram regions of the data array are unaffected by a flash invalidation of the l2 cache regions fo the array. 7.9.3 l2 state transitions table 7-22 lists state transitions for all e500 core-initiated transactions that change the l2 cache state. core-initiated transactions caused when the core executes msync , mbar , tlbivax , or tlbsync do not change the l2 cache state. the table does not list initial l1 states for transactions that hit in the l1 (il1 or dl1) and are not sent to the l2. in the table, the heading ?l2 hit? indicates that the l2 provides (on a read) or captures (on a write) data for an existing line. some entries list two final l1 states. l2 touch instructions never allocate into il1 or dl1. table 7-21. l2 cache states v t il dl l2 states 0xxxinvalid (i) 1000exclusive (e) 1001exclusive data locked (edl) 1010exclusive instruction locked (eil) 1011exclusive instruction and data locked (el) 1100stale (data invalid, locks invalid) (t) 1101stale (data invalid, dlock valid) (tdl) 1110stale (data invalid, ilock valid) (til) 1111stale (data invalid, locks valid) (tl)
l2 cache operation MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 7-31 note that if the l2 sram is disabled, the l2 initial and final states are always i and the l2 never hits. similarly, if the l2 sram is in full memory-mapped sram mode, the l2 initial and final states are always i and the l2 never hits for addresses not in the memory-mapped sram address range. the l2 always hits for addresses in the enabled memory-mapped sram address ranges. table 7-22. state transitions due to core-initiated transactions source of transaction initial states l2 hit final states comments l1 l2 l1 l2 cacheable instruction fetch icbtls_l1 il1 i i/t no i/v same l2ctl[l2do] = 1. l2 touch instructions not allocated in l1 i no i/v e l2ctl[l2do] = 0 icbt_l2 dl1 i,e e/el yes i/v same t no i/v el l2ctl[l2do] = 0. restore locked line in l2 with valid data from bus icbtls_l2 dl1 i,e i/t no i same l2ctl[l2do] = 1 e yes i i l2ctl[l2do] = 1 el yes i t l2ctl[l2do] = 1 i no i el l2ctl[l2do] = 0 e yes i el l2ctl[l2do] = 0 el yes i same l2ctl[l2do] = 0 t no i el l2ctl[l2do] = 0. restore locked line in l2 with valid data from bus cache-inhibited instruction fetch n/a n/a no n/a n/a no l1/l2 effect cacheable load (4-state) cacheable lwarx (4-state) dcbt_l1 (4-state) dcbtls_l1 (4-state) dl1 i i/t no e same l2ctl[l2io] = 1 e yes e i l2ctl[l2io] = 1 el yes e t l2ctl[l2io] = 1 i no e e l2ctl[l2io] = 0 e/el yes e same l2ctl[l2io] = 0 t no el el l2ctl[l2io] = 0. restore locked line in l2 with valid data from bus cache-inhibited load n/a n/a no n/a n/a no l1/l2 effect cache-inhibited lwarx n/a n/a no n/a n/a no l2 effect writeback store dl1 i i/t no m same l2 allocates when a line is cast out of l1. eyesm i el yes m t writeback stwcx. dl1 i i/t no m same eyesm i el yes m t
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 7-32 freescale semiconductor l2 look-aside cache/sram cacheable load (3-state) cacheable lwarx (3-state) dcbt_l1 (3-state) dcbtls_l1 (3-state) dl1 i i no e/i i l2ctl[l2io] = 1 t no e/i t l2ctl[l2io] = 1 e yes e/i i l2ctl[l2io] = 1 el yes e/i t l2ctl[l2io] = 1 i no e/i e l2ctl[l2io] = 0 dcbt_l2 dcbtst_l2 dl1 i,e e/el yes e/i same l2ctl[l2io] = 0 t no e/i el l2ctl[l2io] = 0. restore locked line with valid data from bus dcbtst_l1 dcbtstls_l1 dl1 i i/t no e same eyese i el yes e t dcbtls_l2 dcbtstls_l2 dl1 i,e i no i i l2ctl[l2io] = 1 t no i t l2ctl[l2io] = 1 e yes i i l2ctl[l2io] = 1 el yes i t l2ctl[l2io] = 1 i no i el l2ctl[l2io] = 0 e/el yes i el l2ctl[l2io] = 0 t no i el l2ctl[l2io] = 0. restore locked line with valid data from bus write-through store dl1 i,e,m i/t no same i e/el yes same same read-modify-write cache-inhibited store n/a i/e no n/a i invalidate line el/t no n/a t invalidate data, keep lock cache-inhibited stwcx. n/a i/e no n/a i invalidate line el/t no n/a t invalidate data, keep lock dcblc_l2 icblc_l2 dl1 i,e,m i/e no same same el no same e tnosamei victim castout dcbt_l2 icbt_l2 dcbtst_l2 dl1 m i/t no i same l2ctl[l2io] = 1. if software sharing cache lines between instructions and data wishes to capture instruction lines in l2 with l2ctl[l2io] = 1, it must perform dcbst to flush the line out of the dl1 before fetching it into l2. i no i e l2ctl[l2io] = 0 e/el no i i/t l2ctl[l2io] = 1 yes i same l2ctl[l2io] = 0 t yes i el l2ctl[l2io = 0 table 7-22. state transitions due to core-initiated transactions (continued) source of transaction initial states l2 hit final states comments l1 l2 l1 l2
l2 cache operation MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 7-33 table 7-23 lists l2 cache state transitions for all system-initiated (non-core) transactions that change the l2. the transaction types and attributes listed follow mpx bus nomenclature, with the addition of write allocate (burst write with l2 cache allocation). table 7-23 accounts for changes caused by l1 snoop pushes triggered by snoops, listed in table 7-22 . dcbtls_l2 icbtls_l2 dcbtstls_l2 dl1 m i no i el an icbtls_l2 that hits modified in l1 cannot be distinguished from dcbtls_l2 and sets the l2 dlock bit. if software shares cache lines between instructions and data and wishes to set ilocks in l2, it must perform dcbst to flush the line out of the dl1 before locking it in l2. e/el/t yes i el snoop push dl1 m i/e no i/e i el/t no i/e t invalidate data, keep lock dcbf dcbst dl1 m i/e/el no i i dcbz dcba dl1 i i/e no m i el no m t dcbi dl1 i,e,m i/ e/el/t no i i dcbf dcbst dl1 i,e i/ e/el/t no i i icbi il1 i,v i/ e/el/t no i i table 7-23. state transitions due to system-initiated transactions transaction type wt ci gbl initial l2 state final l2 state comments clean ikill x x 0 i/e/el/t same flush x x 0 i/e/el/t i write allocate 0 1 0 i/e/el/t el allocate and lock regardless of cache external write (cew) window 1 1 0 i/e e allocate regardless of cew window el/t el x 0 0 i/e i no allocate if cache-inhibited el/t t invalidate data, keep lock table 7-22. state transitions due to core-initiated transactions (continued) source of transaction initial states l2 hit final states comments l1 l2 l1 l2
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 7-34 freescale semiconductor l2 look-aside cache/sram 7.10 initialization/application information this section describes some required steps for initializing the l2 sram both in l2 cache mode, and in memory-mapped sram mode. also, it includes some guidlines for error managment. wwk 32-byte wwf 32-byte wwf atomic x 1 0 i/e/el/t i miss in cache external write windows i e/el hit in cache external write window. set lock if cew lock attribute set el same ee/el tel x 0 0 i/e i invalidate line el/t t invalidate data, keep lock < 32-byte wwf < 32-byte wwf atomic x 1 0 i/e i miss in cache external write windows el/t t miss in cache external write windows i/t same hit in cew window but need burst data el same hit in cache external write window e e/el hit in cache external write window. set lock if cew lock attribute set x 0 0 i/e i invalidate line el/t t invalidate data, keep lock read read atomic 110 i/t same ee el el x 0 0 n/a n/a no l1/l2 effect rwnitc 1 1 0 i/l/t same ee el el 0 1 0 i same read-and-clear-lock el e ti x 0 0 n/a n/a no l1/l2 effect kill rwitm rwitm atomic rclaim x 1 0 i/e i el/t t invalidate data, keep lock x 0 0 i/e/el/t same table 7-23. state transitions due to system-initiated transactions (continued) transaction type wt ci gbl initial l2 state final l2 state comments
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 7-35 7.10.1 initialization this section describes l1 cache and memory-mapped sram initialization. 7.10.1.1 l2 cache initialization after power-on reset, the valid bits in the l2 cache status array are in random states. therefore, it is necessary to perform a flash invalidate operation before using the array as an l2 cache. this is done by writing a 1 to the l2i bit of the l2 control register (l2ctl). this can be done before or simultaneously with the write that enables the l2 cache. that is, the l2e and l2i bits of l2ctl can be set simultaneously. the l2i bit clears automatically, so no further writes are necessary. 7.10.1.2 memory-mapped sram initialization after power-on reset, the contents of the data and ecc arrays and are random, so all sram data must be initialized before it is read. if the cache is initialized by the core or any other device that uses sub-cacheline transactions, ecc error checking should be disabled during the initialization process to avoid false ecc errors generated during the read-modify-write process used for sub-cacheline writes to the sram array. this is done by setting the multi- and single-bit ecc error disable bits of the l2 error disable register (l2errdis[mbeccdis, sbeccdis]). see section 7.3.1.5.2, ?error control and capture registers? . if the array is initialized by a dma engine using cache-line writes, then ecc checking can remain enabled during the initialization process. 7.10.2 managing errors this section describes recommended handling for ecc and tag parity errors. 7.10.2.1 ecc errors an individual soft error that causes a single- or mulit-bit ecc error can be cleared from the l2 array simply by executing a dcbf instruction for the address captured in the l2erraddr register. this will invalidate the line in the l2 cache. when the load that caused the ecc error is performed again, the data will be re-allocated into the l2 with ecc bits set properly again. if the threshold for single bit errors set in the l2errctl register is exceeded, then the l2 cache should be flash invalidated to clear out all single-bit errors. note that no data is lost by executing dcbf instructions or flash invalidate operations because the l2 cache is write-through and contains no modified data.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 7-36 freescale semiconductor l2 look-aside cache/sram 7.10.2.2 tag parity errors a tag parity error must be fixed by flash invalidating the l2 cache. note that executing a dcbf instruction for the address that caused the error to be reported is not sufficient because a tag parity error is seen as an l2 miss and does not cause invalidation of the bad tag. proper l2 operation cannot be guaranteed if an l2 tag parity error is not repaired by a flash invalidation of the entire array.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor iii-1 part iii memory and i/o interfaces p part iii defines the memory and i/o interfaces of the MPC8540 and it describes how these blocks interact with one another and with other blocks on the device. the following chapters are included:  chapter 8, ?e500 coherency module,? defines the e500 coherency module and how it facilitates communication between the e500 core complex, the l2 cache, and the other blocks that comprise the coherent memory domain of the MPC8540. the ecm provides a mechanism for i/o-initiated transactions to snoop the core complex bus (ccb) of the e500 core in order to maintain coherency across cacheable local memory. it also provides a flexible, easily expandable switch-type structure for e500- and i/o-initiated transactions to be routed (dispatched) to target modules on the MPC8540.  chapter 9, ?ddr memory controller,? describes the ddr sdram memory controller of the MPC8540. this fully programmable controller supports most ddr memories available today, including both buffered and unbuffered devices. the built-in error checking and correction (ecc) ensures very low bit error rates for reliable high-frequency operation. dynamic power management and auto-precharge modes simplify memory system design. a large set of special features like dll software override, crawl mode, and ecc error injection support rapid system debug.  chapter 10, ?programmable interrupt controller,? describes the embedded programmable interrupt controller (pic) of the MPC8540. this controller is an openpic-compliant interrupt controller that provides interrupt management, and is responsible for receiving hardware-generated interrupts from different sources (both internal and external), prioritizing them, and delivering them to the cpu for servicing.  chapter 11, ?i 2 c interface,? describes the inter-ic (iic or i 2 c) bus controller of the MPC8540. this synchronous, serial, bidirectional, multi-master bus allows two-wire connection of devices such as microcontrollers, eeproms, real-time clock devices, a/d converters, and lcds. the MPC8540 powers up in boot sequencer mode, which allows the i 2 c controller to initialize configuration registers.  chapter 12, ?duart,? describes the (dual) universal asynchronous receiver/transmitters (uarts) which feature a pc16552d-compatible programming model. these independent uarts are provided specifically to support system debugging.  chapter 13, ?local bus controller,? describes the local bus controller of the MPC8540. the main component of the local bus controller (lbc) is its memory controller which provides a seamless interface to many types of memory devices and peripherals. the
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 iii-2 freescale semiconductor memory controller is responsible for controlling eight memory banks shared by a high performance sdram machine, a general-purpose chip-select machine (gpcm), and up to three user-programmable machines (upms). as such, it supports a minimal glue logic interface to synchronous dram (sdram), sram, eprom, flash eprom, burstable ram, regular dram devices, extended data output dram devices, and other peripherals.  chapter 14, ?three-speed ethernet controllers,? describes the two three-speed ethernet controllers on the MPC8540. these controllers provide 10/100/1gb ethernet support with a complete set of media-independent interface options including gmii, rgmii, tbi, and rtbi. each controller provides very high throughput using a captive dma channel and direct connection to the MPC8540 memory coherency module.  chapter 15, ?dma controller,? describes the four-channel general-purpose dma controller of the MPC8540. the dma controller transfers blocks of data, independent of the e500 core or external hosts. data movement occurs among rapidio and the local address space. the dma controller has four high-speed channels. both the e500 core and external masters can initiate a dma transfer. all channels are capable of complex data movement and advanced transaction chaining.  chapter 16, ?pci/pci-x bus interface,? describes the pci/pci-x controller of the MPC8540.  chapter 17, ?rapidio interface,? describes the rapidio controller of the MPC8540.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 8-1 chapter 8 e500 coherency module 8.1 introduction the e500 coherency module (ecm) provides a flexible, easily expandable switching structure for routing e500- and i/o-initiated transactions to target modules on the device. figure 8-1 shows a high-level block diagram of the ecm. figure 8-1. e500 coherency module block diagram 8.1.1 overview the ecm routes transactions initiated by the e500 core to the appropriate target interface on the device. in a manner analogous to a bridging router in a local area network, the ecm forwards i/o-initiated transactions that are tagged with the global attribute onto the core complex bus data bus arbiter ccb arbiter i/o arbiter dispatch bus global data bus port data buses core complex bus (to/from e500) port data internal global data bus config reg?s configuration bus global data mux global (to ocean, request transaction queue ccb interface (from ocean, ddr, lbc?) ddr, lbc?) bus (internal) ? ? ? ? (to ocean, ddr, lbc,?) buses ocean tsec1 tsec2 10/100
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 8-2 freescale semiconductor e500 coherency module (ccb). this allows on-chip caches to snoop these transactions as if they were locally initiated and to take actions to maintain coherency across cacheable memory. 8.1.2 features the ecm includes these distinctive features:  support for e500 core and an l2/sram on the ccb, including a ccb arbiter. it sources a 64-bit data bus for returning read data from the ecm to the e500 core and routing write data from the ecm to the l2/sram. it sinks a 128-bit data bus for receiving data from the l2/sram and a 128-bit write data bus from the e500 core.  four connection points for i/o initiating (mastering into the device) interfaces. one of those connection points services ocean initiators, one services tsec1, one services tsec2, and the last services other i/o initiators. the ecm supports five connection points for i/o targets. the ddr memory controller, local bus, ocean targets, programmable interrupt controller (pic), and configuration register access block all have a target port connection to the ecm.  split transaction support?separate address and data tenures allow for pipelining of transactions and out-of-order data tenures between initiators and targets.  proper ordering of i/o-initiated transactions.  speculative read bus for low-latency dispatch of reads to the ddr controller.  low-latency path for returning read data from ddr to the e500.  error registers trap transactions with invalid addresses. errors can be programmed to generate interrupts to the e500 core, as described in the following sections: ? section 8.2.1.3, ?ecm error detect register (eedr)? ? section 8.2.1.4, ?ecm error enable register (eeer)? ? section 8.2.1.5, ?ecm error attributes capture register (eeatr)? ? section 8.2.1.6, ?ecm error address capture register (eeadr)?  errors from i/o devices on reads (for example, a master-aborted read transaction on the pci interface) terminate with corrupt data sent to the requester. if the requester is the e500 core, the ecm also asserts core_fault_in to the core, which causes the core to generate a machine check interrupt, unless it is disabled (by clearing hid1[rfxe]). if rfxe is zero and one of these errors occurs, appropriate interrupts must be enabled to ensure that an interrupt is generated. see section 6.10.2, ?hardware implementation-dependent register 1 (hid1).? 8.2 memory map/register definition table 8-1 shows the ecm?s memory map. undefined 4-byte address spaces within offset 0x000?0xfff are reserved.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 8-3 8.2.1 register descriptions this section consists of detailed descriptions of those registers summarized in table 8-1 . note that these registers are shown in big-endian format. 8.2.1.1 ecm ccb address configuration register (eebacr) the ecm ccb address configuration register, shown in figure 8-2 , controls arbitration and streaming policies for the ccb. figure 8-2. ecm ccb address configuration register (eebacr) table 8-2 describes the eebacr fields. table 8-1. ecm memory map local memory offset register acces s reset section/pag e 0x0_1000 eebacr?ecm ccb address configuration register r/w 0x0000_000 3 8.2.1.1/8-3 0x0_1010 eebpcr?ecm ccb port configuration register r/w 0x0 n 00_000 0 8.2.1.2/8-4 0x0_1e00 eedr?ecm error detect register special 0x0000_000 0 8.2.1.3/8-5 0x0_1e08 eeer?ecm error enable register r/w 0x0000_000 0 8.2.1.4/8-6 0x0_1e0c eeatr?ecm error attributes capture register r 0x0000_000 0 8.2.1.5/8-7 0x0_1e10 eeadr?ecm error address capture register r 0x0000_000 0 8.2.1.6/8-8 02728293031 r a_strm_dis core_strm_dis a_strm_cnt w reset 0000_0000_0000_0000_0000_0000_0000_0011 offset 0x0_1000 table 8-2. eebacr field descriptions bits name description 0?27 ? reserved 28 a_strm_dis controls whether the ecm allows any streaming to occur. 0 streaming is enabled. 1 streaming is disabled.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 8-4 freescale semiconductor e500 coherency module 8.2.1.2 ecm ccb port configuration register (eebpcr) the ecm ccb port configuration register (eebpcr) is shown in figure 8-3 . figure 8-3. ecm ccb port configuration register (eebpcr) table 8-3 describes eebpcr fields. 29 core_strm_dis with a_strm_dis, controls whether the e500 core can stream commands onto the ccb. a_strm_dis and core_strm_dis must both be cleared for the e500 core to be enabled to stream address tenures that it masters. 0 stream address tenures initiated by the e500 core, provided a_strm_dis is cleared. 1 streaming of address tenures initiated by the e500 core not allowed. 30?31 a_strm_cnt stream count. specifies the maximum number of transactions that any master can stream (issue sequentially without preemption) on the ccb following an initial transaction. 00 reserved 01 one transaction can be streamed with the initial transaction. 10 two transactions can be streamed with the initial transaction. 11 three transactions can be streamed with the initial transaction. default. 0678 29 30 31 r cpu_en cpu_pri w reset 0000_000 n _0000_0000_0000_0000_0000_0000 offset 0x0_1010 table 8-3. eebpcr field descriptions bits name description 0?6 ? reserved 7 cpu_en cpu port enable. controls boot holdoff mode when the device is an agent of an external host. specifies whether the e500 core (cpu) port is enabled to run transactions on the ccb. the cpu boot configuration power-on reset pin (cfg_cpu_boot) determines the initial value of this bit. if the pin is sampled as a logic 1 at the negation of reset, the cpu is enabled to boot at the end of the por sequence. otherwise, the cpu cannot fetch its boot vector until an external host sets the cpu_en bit. 0 boot holdoff mode. cpu arbitration is disabled on the ccb and no bus grants are issued. 1 cpu is enabled and receives bus grants in response to bus requests for the boot vector. after this bit is set, it should not be cleared by software. it is not intended to dynamically enable and disable cpu operation. it is only intended to end boot holdoff mode. see section 4.4.3.5, ?cpu boot configuration,? for more information. table 8-2. eebacr field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 8-5 8.2.1.3 ecm error detect register (eedr) the ecm error detect register (eedr) is shown in figure 8-4 . figure 8-4. ecm error detect register (eedr) 8?29 ? reserved 30?31 cpu_pri specifies the priority level of the e500 core (cpu) port. this priority level is used to determine whether a particular port?s bus request can cause the ccb arbiter to terminate another port?s streaming of address tenures. 00 lowest priority level 01 second lowest priority level 10 highest priority level 11 reserved 01 30 31 r mult_err lae w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_1e00 table 8-3. eebpcr field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 8-6 freescale semiconductor e500 coherency module table 8-4 describes eedr fields. 8.2.1.4 ecm error enable register (eeer) the ecm error enable register (eeer) shown in figure 8-5 enables the reporting of error conditions to the e500 core through the internal int interrupt signal. figure 8-5. ecm error enable register (eeer) table 8-4. eedr field descriptions bits name description 0 mult_err multiple error. indicates the occurrence of multiple errors of the same type. write one to clear. 0 multiple errors of the same type were not detected. 1 multiple errors of the same type were detected. 1?30 ? reserved 31 lae local access error. write one to clear. three cases can generate laes:  transaction does not map to any target. in this case the ecm injects read responses (with the corrupt attribute set) and write data is dropped. note that a read that attempts to access an unmapped target causes the assertion of core_fault_in , which causes the core to generate a machine check interrupt, unless it is disabled (by clearing hid1[rfxe]). if rfxe is zero and this error occurs, eeer[laee] must be set to ensure that an interrupt is generated. for more information, see section 6.10.2, ?hardware implementation-dependent register 1 (hid1).?  source and target ids indicate that an ocn port initiated a transaction that targets an ocn port. this loopback behavior can result from programming errors where inbound atmu window targets are inconsistent with targets configured in the local access windows for a given address range. for this type of lae, the dispatch (to ocn target in this case) is not screened off; the lae error is reported, but the transaction is still sent to its ocn target.  inbound read atomic set, clear, inc, or dec transactions from rapidio target an interface other than ddr (only the ddr supports these transactions). this condition screens off the dispatch to the target (if one is mapped); the ecm injects read responses (with the corrupt attribute set) and write data is dropped. 0 local access error has not occurred. 1 local access error occurred. 0 30 31 r laee w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_1e08
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 8-7 table 8-5 describes eeer fields. 8.2.1.5 ecm error attributes capture register (eeatr) the ecm error attributes capture register (eeatr) is shown in figure 8-6 . figure 8-6. ecm error attributes capture register (eeatr) table 8-6 describes eeatr fields. table 8-5. eeer field descriptions bits name description 0?30 ? reserved 31 laee local access error enable. note that a read that attempts to access an unmapped target causes the assertion of core_fault_in , which causes the core to generate a machine check interrupt, unless it is disabled (by clearing hid1[rfxe]). if rfxe is zero and this error occurs, laee must be set to ensure that an interrupt is generated. for more information, see section 6.10.2, ?hardware implementation-dependent register 1 (hid1).? 0 disable reporting local access errors as interrupts. 1 enable reporting local access errors as interrupts. 023 781011 151617 2021 3031 r byte_cnt src_id ttype val w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_1e0c table 8-6. eeatr field descriptions bits name description 0?2 ? reserved 3?7 byte_cnt byte count. specifies the transaction byte count. 00000 32 bytes 00001 1 byte 00010 2 bytes 00011 3 bytes 00100 4 bytes 01000 8 bytes 10000 16 bytes 8?10 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 8-8 freescale semiconductor e500 coherency module 8.2.1.6 ecm error address capture register (eeadr) the ecm error address capture register (eeadr) is shown in figure 8-7 . figure 8-7. ecm error address capture register (eeadr) table 8-7 describes eeadr fields. 11?15 src_id source id. specifies the source device mastering the transaction. 00000 pci/pci-x interface 00001?01001 reserved 01010 boot sequencer 01011 reserved 01100 rapidio 01101?01111 reserved 10000 processor (instruction) 10001 processor (data) 10010 reserved 10011 reserved 10100 reserved 10101 dma 10110 reserved 10111 sap 11000 tsec1 11001 tsec2 11010 10/100 fec 11011 reserved 11100 rapidio message units 11101 rapidio doorbell units 11110 rapidio port-write units 11111 reserved 16 ? reserved 17?20 ttype transaction type. defined as follows: 0000 write 0001 reserved 0010 write with allocate 0011 write with allocate with lock 0100 address only transaction 0101?0111 reserved 1000 read 1001 read with unlock 101x reserved 1100 read with clear atomic 1101 read with set atomic 1110 read with decrement atomic 1111 read with increment atomic 21?30 ? reserved 31 val register data valid. 0 ecm error attribute capture register does not contain valid information. 1 ecm error attribute capture register contains valid information. 0 31 r addr w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_1e10 table 8-7. eeadr field descriptions bits name description 0?31 addr address. specifies the 32-bit address of the transaction. qualified by eeatr[val]. table 8-6. eeatr field descriptions (continued) bits name description
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 8-9 8.3 functional description the following is a very general discussion of ecm operation. 8.3.1 i/o arbiter figure 8-1 shows the i/o arbiter block that manages i/o-initiated address tenure requests arriving on the request buses. four request buses compete for access to the ecm, which can only process one request at a time. the ecm uses two factors to select the winning request bus: the primary factor is request priority and the secondary factor is longest waiting/least recently granted status. by default all requesters use the lowest priority (priority 0) for requests. the tsec controllers dynamically raise and lower their priority levels based on fifo depth. a starvation avoidance algorithm prevents high priority requests from indefinitely starving low priority requesters. the transaction from the winning request bus competes with e500 core requests for the ccb and entry into the transaction queue. 8.3.2 ccb arbiter figure 8-1 shows the ccb arbiter block coordinating the entry of new transactions into the ecm?s transaction queue. it handles arbitration for requests to use the ccb from the e500 core and the winning request bus and consequently controls when these new transactions can enter the transaction queue. because the ccb bus operates most efficiently when it streams commands from one initiator, the ccb arbiter alternates grants between streams of transactions from the processor and from the winner of the i/o arbiter. the length of a stream (number of back-to-back transactions) is limited by the a_strm_cnt field in the eebacr register. however, the arbiter also uses the priority of the requests to limit streaming. if the priority of a new request is higher than that of a stream in progress, then the higher priority transaction will interrupt the other stream. the priority of e500 transactions is set by the cpu_pri field in eebpcr register. 8.3.3 transaction queue the ecm?s transaction queue performs three basic functions: target mapping and dispatching, enforcement of ordering, and enforcement of coherency. the address of each transaction is compared against each local access window, and the transaction is then routed to the appropriate target interface associated with the local access window that the address hits within. even though the ccb and ecm allow the pipelining of transactions, the address tenures of all transactions issued from masters other than the e500 core (all i/o masters) are strictly ordered and are dispatched to their target interfaces in the same order they are submitted. for those transactions accessing address space marked as snoopable, or space that may be cached by the e500 core, the
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 8-10 freescale semiconductor e500 coherency module ecm enforces coherency, snooping those transactions on the ccb, and taking castouts from the e500 core as is necessary. 8.3.4 global data multiplexor figure 8-1 shows how the global data multiplexor takes data bus connections and multiplexes them onto one 128-bit global data bus. the global data mux allows initiators of write transactions to route data to their targets and read targets to return data to the initiators. 8.3.5 ccb interface figure 8-1 shows the ccb interface for both ccb address and data tenures. this interface formats ccb address tenures for the ecm transaction queue. it also contains the queueing and buffering needed to manage outstanding ccb data tenures. the buffers receive e500 core-initiated write and i/o-initiated read data (that hit in the l2/sram module) from the e500 write (128-bit wide) and read (128-bit wide) data buses and route them through the global data mux to the global data bus. the buffers also receive e500 core-initiated read and i/o-initiated write data (that hit in the l2/sram module) from the global data bus and forward them onto the ccb data bus (64 bits). 8.4 initialization/application information if the e500 core is used to initialize the MPC8540, the cpu boot configuration power-on reset pin should be pulled high to initially set eebpcr[cpu_en]. see chapter 4, ?reset, clocking, and initialization,? for more information on power-up reset initialization. if any device other than the e500 core, such as the boot sequencer or pci, is used to initialize the MPC8540, the cpu boot configuration power-on reset pin should be pulled low to initially clear eebpcr[cpu_en]. this prevents the e500 core from accessing any configuration registers or local memory space during initialization. however, in any such system, one step near the end of the initialization routine must set eebpcr[cpu_en] to re-enable the e500 core. note that for basic functionality, eebpcr[cpu_en] is the only field that must be written (provided a device other than the e500 core is used to initialize the device) in the ecm. eebpcr[cpu_pri] specifies the priority level associated with all e500 core initiated transactions. this value allows users running time-critical applications to adjust the average response latency of transactions initiated by the core compared to those initiated by i/o masters. this priority level affects whether the e500 core requests can interrupt the streaming of address tenures initiated by (the ecm on behalf of) i/o masters. only transactions with a priority greater than the current ccb transaction can interrupt streaming. the higher the core?s priority, the lower the average latency needed for it to obtain bus grants from the ecm, because it can interrupt lower priority streaming. the default value of zero gives all core-initiated transactions the lowest priority, which prevents the core from interrupting i/o master transaction streams.
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 8-11 eebacr[a_strm_cnt] allows users to balance response latency with throughput and should prove useful in tuning systems with multiple time-critical tasks. the default value of 0b11 causes the ecm to attempt to stream as many as four transactions initiated from the same ccb master. increasing this value increases the maximum number of transactions that may be streamed together from any one ccb master. raising this value can increase throughput for high priority transactions, but may increase latency for lower priority transactions from another ccb master. note that the e500 core must also have streaming enabled (through hid1[astme]) for the ccb to stream.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 8-12 freescale semiconductor e500 coherency module
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-1 chapter 9 ddr memory controller 9.1 introduction the fully programmable ddr sdram controller supports most first-generation jedec standard 8 or 16 ddr memories available, including buffered and unbuffered dimms. however, mixing unbuffered and registered dimms in the same system is not supported. built-in error checking and correction (ecc) ensures very low bit-error rates for reliable high-frequency operation. dynamic power management and auto-precharge modes simplify memory system design. a large set of special features, including dll software override, crawl mode, and ecc error injection support rapid system debug. note in this chapter, the word ?bank? refers to a physical bank specified by a chip select; ?logical bank? refers to one of the four sub-banks in each sdram chip. a sub-bank is specified by the two least significant bits (lsbs) of a bank address. figure 9-1 is a high-level block diagram of the ddr memory controller with its associated interfaces. section 9.5, ?functional description,? contains detailed figures of the controller.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-2 freescale semiconductor ddr memory controller figure 9-1. ddr memory controller simplified block diagram 9.2 features the ddr memory controller includes these distinctive features:  support for ddr sdram  64-/72-bit sdram data bus  programmable settings for meeting all sdram timing parameters  the following sdram configurations are supported ? as many as four physical banks (chip selects), each bank independently addressable ? 64-mbit to 1-gbit devices with 8/ 16 data ports (no direct 4 support) ? unbuffered and registered dimms  support for data mask signals and read-modify-write for sub-double word writes. note that read-modify-write sequence is only necessary when ecc is enabled.  support for double-bit error detection and single-bit error correction ecc (8-bit check word across 64-bit data) address from ddr sdram data from data from ddr sdram data signals rmw ecc request from row physical bank, fifo sdram address open row address en en data qualifiers clocks to e rr o r ma[0:14] mba[0:1] mcs [0:3] mcas mras mwe mdm[0:8] mcke[0:1] mdqs[0:8] mdq[0:63] mecc[0:7] mck[0:5] msync_ou t msync_in decode control open logical bank, row table control dll input staging queue memory array memory contro l master master sdram master management mck [0:5] ecm ecc delay chain error signals sdram control
external signal descriptions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-3  two-entry input request queue  open page management (dedicated entry for each logical bank)  memory controller clock frequency of two times the sdram clock with support for sleep power management  support for error injection 9.2.1 modes of operation the ddr memory controller supports the following modes:  dynamic power management mode. the ddr memory controller can reduce power consumption by negating the sdram cke signal when no transactions are pending to the sdram.  auto-precharge mode. clearing ddr_sdram_interval[bstopre] causes the memory controller to issue an auto precharge command with every read or write transaction. auto precharge mode can be enabled for separate chip selects by setting cs n _config[ap_ n _en]. 9.3 external signal descriptions this section provides descriptions of the ddr memory controller?s external signals. it describes each signal?s behavior when the signal is asserted or negated and when the signal is an input or an output. note a bar over a signal name indicates that the signal is active low, such as as (address strobe). active-low signals are referred to as asserted (active) when they are low and negated when they are high. signals that are not active low, such as nmi (nonmaskable interrupt), are referred to as asserted when they are high and negated when they are low. 9.3.1 signals overview memory controller signals are grouped as follows:  memory interface signals  clock signals  debug signals
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-4 freescale semiconductor ddr memory controller table 9-1 shows how ddr memory controller external signals are grouped. the MPC8540 integrated host processor hardware specifications has a pinout diagram showing pin numbers. it also lists all electrical and mechanical specifications. table 9-2 shows the memory address signal mappings. table 9-1. ddr memory interface signal summary name function/description reset pin s i/o mdq[0:63] data bus all zeros 64 i/o mdqs[0:8] data strobes all zeros 9 i/o mecc[0:7] error checking and correcting all zeros 8 i/o mcas column address strobe one 1 o ma[0:14] address bus all zeros 15 o mba[0:1] logical bank address all zeros 2 o mcs [0:3] chip select all ones 4 o mwe write enable one 1 o mras row address strobe one 1 o mdm[0:8] data mask all zeros 9 o mck[0:5] dram clock outputs all zeros 6 o mck [0:5] dram clock outputs (complement) all ones 6 o mcke[0:1] dram clock enable all zeros 2 o msync_in dram dll synchronization in zero 1 i msync_out dram dll synchronization out one 1 o mdval memory debug data valid zero 1 o msrcid[0:4] memory debug source id all zeros 5 o table 9-2. memory address signal mappings signal name (outputs) jedec ddr dimm signals (inputs) signal name (outputs) jedec ddr dimm signals (inputs) sdram 168-pin dimm sdram 168-pin dimm msb ma14 ? ma5 a5 ma13 a13 ma4 a4 ma12 a12 ma3 a3 ma11 a11 ma2 a2 ma10 a10(ap) ma1 a1 ma9 a9 ma0 a0 ma8 a8 mba1 ba1 ma7 a7 lsb mba0 ba0 ma6 a6
external signal descriptions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-5 9.3.2 detailed signal descriptions the following sections describe the ddr sdram controller input and output signals, the meaning of their different states, and relative timing information for assertion and negation. 9.3.2.1 memory interface signals table 9-3 describes the ddr controller memory interface signals. table 9-3. memory interface signals?detailed signal descriptions signal(s) i/o description mdq[0:63] i/o data bus. both input and output signals on the ddr memory controller. o as outputs for the bidirectional data bus, these signals operate as described below. state meaning asserted/negated?represent the value of data being driven by the ddr memory controller. timing assertion/negation?driven coincident with corresponding data strobes (mdqs) signal. high-impedance?no read or write command is in progress; data is not being driven by the memory controller or the dram. i as inputs for the bidirectional data bus, these signals operate as described below. state meaning asserted/negated?represents the state of data being driven by the external ddr sdrams. timing assertion/negation?the ddr dimm drives data during a read transaction. high-impedance?no read or write command in progress; data is not being driven by the memory controller or the dram. mdqs[0:8] i/o data strobes. inputs with read data and as outputs with write data. o as outputs, the data strobes are driven by the ddr memory controller during a write transaction. the memory controller always drives these signals low unless a read has been issued and incoming data strobes are expected. this keeps the data strobes from floating high when there are no transactions on the dram interface. state meaning asserted/negated?driven high when positive capture data is transmitted/received and driven low when negative capture data is transmitted/received. centered in the data ?eye? for writes; coincident with the data eye for reads. treated as a clock. data is valid when signals toggle. see tab le 9 -2 5 for byte lane assignments. timing assertion/negation?if a write command is registered at clock edge n , data strobes at the dram assert centered in the data ?eye? on clock edge n + 1. see the jedec ddr sdram specification for more information. i as inputs, the data strobes are driven by the external ddr sdrams during a read transaction. the data strobes are used by the memory controller to synchronize data latching. state meaning asserted/negated?driven high when positive capture data is transmitted/received and driven low when negative capture data is transmitted/received. centered in the data ?eye? for writes; coincident with the data eye for reads. treated as a clock. data is valid when signals toggle. see tab le 9 -2 5 for byte lane assignments. timing assertion/negation?if a read command is registered at clock edge n , and the latency is programmed in timing_cfg_1[caslat] to be m clocks, data strobes at the dram assert coincident with the data on clock edge n+m . see the jedec ddr sdram specification for more information.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-6 freescale semiconductor ddr memory controller mecc[0:7] i/o error checking and correcting codes. input and output signals for the ddr controller?s bidirectional ecc bus. mecc[0:5] function in both normal and debug modes. o as normal mode outputs the ecc signals represent the state of ecc driven by the ddr controller on writes. as debug mode outputs mecc[0:5] provide source id and data-valid information. see section 20.4.3.2, ?debug information on ecc pins,? for more details. state meaning asserted/negated?represents the state of ecc being driven by the ddr controller on writes. timing assertion/negation?same timing as mdq high-impedance?same timing as mdq i as inputs, the ecc signals represent the state of ecc driven by the sdram devices on reads. state meaning asserted/negated?represents the state of ecc being driven by the ddr sdrams on reads. timing assertion/negation?same timing as mdq high-impedance?same timing as mdq ma[0:14] o address bus. memory controller outputs for the address to the dram. ma[0:14] carry 15 of the address bits for the ddr memory interface corresponding to the row and column address bits. ma[0] is the lsb of the address output from the memory controller. state meaning asserted/negated?represents the address driven by the ddr memory controller. contains different portions of the address depending on the memory size and the dram command being issued by the memory controller. see table 9-27 for a complete description of the mapping of these signals. timing assertion/negation?the address is always driven when the memory controller is active. it is valid when a transaction is driven to dram (when mcs n is negated). high-impedance?when the memory controller is idle. mba[0:1] o logical bank address. outputs that drive the logical (or internal) bank address pins of the sdram. each sdram supports four addressable logical sub-banks. bit zero of the memory controller?s output bank address must be connected to bit zero of the sdram?s input bank address. mba[0] is asserted during the mode register set command to specify the extended mode register. state meaning asserted/negated?selects the ddr sdram logical (or internal) bank to be activated during the row address phase and selects the sdram internal bank for the read or write operation during the column address phase of the memory access. table 9-27 describes the mapping of these signals in all cases. timing assertion/negation?same timing as ma n high-impedance?same timing as ma n mcas o column address strobe. active-low sdram address multiplexing signal. mcas is asserted for read or write transactions and for mode register set, refresh, and precharge commands. state meaning asserted?indicates that a valid sdram column address is on the address bus for read and write transactions. see tab l e 9 -2 8 for more information on the states required on mcas for various other sdram commands. negated?the column address is not guaranteed to be valid. timing assertion/negation?assertion and negation timing is directed by the values described in section 9.4.1.3, ?ddr sdram timing configuration 1 (timing_cfg_1).? high-impedance?mcas is always driven unless the memory controller is idle. table 9-3. memory interface signals?detailed signal descriptions (continued) signal(s) i/o description
external signal descriptions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-7 mras o row address strobe. active-low sdram address multiplexing signal. asserted for activate commands. in addition; used for mode register set commands and refresh commands. state meaning asserted?indicates that a valid sdram row address is on the address bus for read and write transactions. see tab l e 9 -2 8 for more information on the states required on mras for various other sdram commands. negated?the row address is not guaranteed to be valid. timing assertion/negation?timing is directed by the values described in section 9.4.1.3, ?ddr sdram timing configuration 1 (timing_cfg_1).? high impedance?mras is always driven unless the memory controller is idle. mcs [0:3] o chip select. four chip selects supported by the memory controller. state meaning asserted?selects a physical sdram bank to perform a memory operation as described in section 9.4.1.1, ?chip select memory bounds (csn_bnds),? and section 9.4.1.2, ?chip select configuration (csn_config).? the ddr controller asserts one of the mcs [0:3] signals to begin a memory cycle. negated?indicates no sdram action during the current cycle timing assertion/negation?asserted to signal any new transaction to the sdram. the transaction must adhere to the timing constraints set in timing_cfg_1. high impedance?always driven unless the memory controller is disabled mwe o write enable. asserted when a write transaction is issued to the sdram. this is also used for mode registers set commands and precharge commands. state meaning asserted?indicates a memory write operation. see table 9-28 for more information on the states required on mwe for various other sdram commands. negated?indicates a memory read operation timing assertion/negation?similar timing as mras and mcas . used for write commands. high impedance?mwe is always driven unless the memory controller is idle. mdm[0:8] o ddr sdram data output mask. masks unwanted bytes of data transferred during a burst write. they are needed to support sub-burst-size transactions (such as single-byte writes) on sdram where all i/o occurs in multi-byte bursts. mdm0 corresponds to the most significant byte (msb); mdm7 corresponds to the lsb. mdm8 corresponds to the ecc byte. tab l e 9 -2 5 shows byte lane encodings. state meaning asserted?prevents writing to ddr sdram. asserted when data is written to dram if the corresponding byte(s) should be masked for the write. note that the mdm n signals are active-high for the ddr controller. mdm n is part of the ddr command encoding. negated?allows the corresponding byte to be read from or written to the sdram timing assertion/negation?same timing as mdqx as outputs high impedance?always driven unless the memory controller is disabled table 9-3. memory interface signals?detailed signal descriptions (continued) signal(s) i/o description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-8 freescale semiconductor ddr memory controller 9.3.2.2 clock interface signals table 9-4 contains the detailed descriptions of the clock signals of the ddr controller. 9.3.2.3 debug signals the debug signals msrcid[0:4] and mdval have no function in normal ddr controller operation. a detailed description of these signals can be found in section 20.4.3, ?ddr sdram interface debug.? table 9-4. clock signals?detailed signal descriptions signal(s) i/ o description mck[0:5], mck [0:5] o dram clock outputs and their complements. see section 9.5.4.1, ?clock distribution.? state meanin g asserted/negated?the jedec ddr sdram specifications require true and complement clocks. a clock edge is seen by the sdram when the true and complement cross. timing assertion/negation?should be synchronized at the sdram with the internal clocks of the MPC8540. this is done with the dll. mcke[0:1] o clock enable. two identical output signals (each hereafter referred to simply as mcke) used as the clock enable to one or more sdrams. mcke can be negated to stop clocking the ddr sdram. while this results in system power savings, the user is cautioned to disable sdram clocking only when there are no transactions on the interface. state meanin g asserted?clocking to the sdram is enabled. negated?clocking to the sdram is disabled and the sdram should ignore signal transitions on mck or mck . mck/mck are don?t cares while mcke is negated. timing assertion/negation?similar timing to ma n high impedance?always driven msync_in i dram dll synchronization input. the dll uses this input from the feedback loop to synchronize sdram clocks with the internal clocks of the MPC8540. see section 9.5.4.1, ?clock distribution.? state meanin g asserted/negated?toggles at the same frequency as the applied sdram clocks (mckx), but is not in phase with mck n timing assertion/negation?this is used for locking the dll. msync_ou t o dram dll synchronization output. output for the dll feedback loop. see section 9.5.4.1, ?clock distribution.? state meanin g asserted/negated?see msync_in description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-9 9.4 memory map/register definition table 9-5 shows the register memory map for the ddr memory controller. undefined 4-byte address spaces within offset 0x000?0xfff are reserved. 9.4.1 register descriptions this section describes the ddr memory controller registers. shading indicates reserved fields that should not be written. table 9-5. ddr memory controller memory map offset register access reset section/page 0x0_2000 cs0_bnds?chip select 0 memory bounds r/w 0x0000_0000 9.4.1.1/9-10 0x0_2008 cs1_bnds?chip select 1 memory bounds 0x0_2010 cs2_bnds?chip select 2 memory bounds 0x0_2018 cs3_bnds?chip select 3 memory bounds 0x0_2080 cs0_config?chip select 0 configuration r/w 0x0000_0000 9.4.1.2/9-10 0x0_2084 cs1_config?chip select 1 configuration 0x0_2088 cs2_config?chip select 2 configuration 0x0_208c cs3_config?chip select 3 configuration 0x0_2108 timing_cfg_1?ddr sdram timing configuration 1 r/w 0x0000_0000 9.4.1.3/9-11 0x0_210c timing_cfg_2?ddr sdram timing configuration 2 r/w 0x0000_0000 9.4.1.4/9-13 0x0_2110 ddr_sdram_cfg?ddr sdram control configuration r/w 0x0200_0000 9.4.1.5/9-14 0x0_2118 ddr_sdram_mode?ddr sdram mode configuration r/w 0x0000_0000 9.4.1.6/9-16 0x0_2124 ddr_sdram_interval?ddr sdram interval configuration r/w 0x0000_0000 9.4.1.7/9-16 0x0_2e00 data_err_inject_hi?memory data path error injection mask high r/w 0x0000_0000 9.4.1.8/9-17 0x0_2e04 data_err_inject_lo?memory data path error injection mask low r/w 0x0000_0000 9.4.1.9/9-18 0x0_2e08 ecc_err_inject?memory data path error injection mask ecc r/w 0x0000_0000 9.4.1.10/9-18 0x0_2e20 capture_data_hi?memory data path read capture high r/w 0x0000_0000 9.4.1.11/9-19 0x0_2e24 capture_data_lo?memory data path read capture low r/w 0x0000_0000 9.4.1.12/9-20 0x0_2e28 capture_ecc?memory data path read capture ecc r/w 0x0000_0000 9.4.1.13/9-20 0x0_2e40 err_detect?memory error detect special 0x0000_0000 9.4.1.14/9-21 0x0_2e44 err_disable?memory error disable r/w 0x0000_0000 9.4.1.15/9-21 0x0_2e48 err_int_en?memory error interrupt enable r/w 0x0000_0000 9.4.1.16/9-22 0x0_2e4c capture_attributes?memory error attributes capture r/w 0x0000_0000 9.4.1.17/9-23 0x0_2e50 capture_address?memory error address capture r/w 0x0000_0000 9.4.1.18/9-24 0x0_2e58 err_sbe?single-bit ecc memory error management r/w 0x0000_0000 9.4.1.19/9-25
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-10 freescale semiconductor ddr memory controller 9.4.1.1 chip select memory bounds (cs n _bnds) the chip select bounds registers (cs n _bnds) shown in figure 9-2 define the starting and ending address of the memory space that corresponds to the individual chip selects. note that the size specified in cs n _bnds should equal the size of physical dram. also, note that ea n must be greater than or equal to sa n . if the high-order 8 bits of an address are greater than or equal to sa n , and they are less than or equal to ea n , then chip select n will be used. table 9-6 describes the cs n _bnds register fields. 9.4.1.2 chip select configuration (cs n _config) the chip select configuration (cs n _config) registers shown in figure 9-3 enable the ddr chip selects and set the number of row and column bits used for each chip select. these registers should be loaded with the correct number of row and column bits for each sdram. because cs n _config[row_bits_cs_ n ,col_bits_cs_ n ] establish address multiplexing, the user should take great care to set these values correctly. 0781516232431 r00000000 sa n 00000000 ea n w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_2000, 0x0_2008, 0x0_2010, 0x0_2018 figure 9-2. chip select bounds registers (cs n _bnds) table 9-6. cs n_ bnds field descriptions bits name description 0?7 ? reserved 8?15 sa n starting address for chip select (bank) n. this value is compared against the 8 msbs of the address. 16?23 ? reserved 24?31 ea n ending address for chip select (bank) n. this value is compared against the 8 msbs of the address. 0 1 7 8 9 20 21 23 24 28 29 31 r cs_ n _ en 0000000 ap_n_en 00000000000 0 row_bits_cs_ n 00000 col_bits_cs_ n w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_2080, 0x0_2084, 0x0_2088, 0x0_208c figure 9-3. chip select configuration register (cs n _config)
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-11 table 9-7 describes the cs n _config register fields. 9.4.1.3 ddr sdram timing configuration 1 (timing_cfg_1) ddr sdram timing configuration register 1, shown in figure 9-4 , sets the number of clock cycles between various sdram control commands. table 9-7. cs n _config field descriptions bits name description 0cs_ n _en chip select n enable 0 chip select n is not active. 1 chip select n is active and assumes the state set in csn_bnds. 1?7 ? reserved 8 ap_n_en chip select n auto precharge enable 0 chip select n is auto precharged only if global auto precharge mode is enabled (ddr_sdram_interval[bstopre] = 0). 1 chip select n always issues an auto precharge for read and write transactions. 9?20 ? reserved 21?23 row_bits_cs_ n number of row bits for sdram on chip select n 000 12 row bits 001 13 row bits 010 14 row bits 011?111 reserved 24?28 ? reserved 29?31 col_bits_cs_ n number of column bits for sdram on chip select n 000 8 column bits 001 9 column bits 010 10 column bits 011 11 column bits 011?111 reserved 0 1 3 4 7 8 9 11 1213 1516 192021 2324 25 27 28 29 31 r0 pretoact acttopre 0 acttorw 0 caslat refrec 0 wrrec 0 acttoact 0 wrtord w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_2108 figure 9-4. ddr sdram timing configuration register 1 (timing_cfg_1)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-12 freescale semiconductor ddr memory controller table 9-8 describes timing_cfg_1 fields. table 9-8. timing_cfg_1 field descriptions bits name description 0 ? reserved, should be cleared. 1?3 pretoac t precharge-to-activate interval (t rp ). determines the number of clock cycles from a precharge command until an activate or refresh command is allowed. 000 reserved 001 1 clock 010 2 clocks 011 3 clocks 100 4 clocks 101 5 clocks 110 6 clocks 111 7 clocks 4?7 acttopr e activate to precharge interval (t ras ). determines the number of clock cycles from an activate command until a precharge command is allowed. 0000 reserved 0001 1 clock 0010 2 clocks 0010 2 clocks ? 1111 15 clocks 8 ? reserved, should be cleared. 9?11 acttorw activate to read/write interval for sdram (t rcd ). controls the number of clock cycles from an activate command until a read or write command is allowed. 000 reserved 001 1 clock 010 2 clocks 011 3 clocks 100 4 clocks 101 5 clocks 110 6 clocks 111 7 clocks 12 ? reserved, should be cleared. 13?15 caslat mcas latency from read command. number of clock cycles between registration of a read command by the sdram and the availability of the first output data. if a read command is registered at clock edge n and the latency is m clocks, data is available nominally coincident with clock edge n + m . this value must be programmed at initialization as described in section 9.4.1.6, ?ddr sdram mode configuration (ddr_sdram_mode).? ) 000 reserved 001 1 clock 010 1 . 5 clocks 011 2 clocks 100 2 . 5 clocks 101 3 clocks 110 3 . 5 clocks 111 4 clocks 16?19 refrec refresh recovery time (t rfc ). controls the number of clock cycles from a refresh command until an activate command is allowed. refresh recovery time is equal to eight plus the refrec value. 0000 reserved 0001 9 clocks 0010 10 clocks 0011 11 clocks ? 1111 23 clocks 20 ? reserved, should be cleared. 21?23 wrrec last data to precharge minimum interval (t wr ). determines the number of clock cycles from the last data associated with a write command until a precharge command is allowed. 000 0 clock 001 1 clock 010 2 clocks 011 3 clocks 100 4 clocks 101 5 clocks 110 6 clocks 111 7 clocks 24 ? reserved, should be cleared.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-13 9.4.1.4 ddr sdram timing configuration 2 (timing_cfg_2) ddr sdram timing configuration 2, shown in figure 9-5 , sets the clock delay to data for writes. figure 9-5. ddr sdram timing configuration register 2 (timing_cfg_2) table 9-9 describes the timing_cfg_2 fields. 25?27 acttoac t activate-to-activate interval ( t rrd ). number of clock cycles from an activate command until another activate command is allowed for a different logical bank in the same physical bank (chip select). 000 reserved 001 1 clock 010 2 clocks 011 3 clocks 100 4 clocks 101?111 reserved 28 ? reserved, should be cleared. 29?31 wrtord last write data pair to read command issue interval (t wtr ). number of clock cycles between the last write data pair and the subsequent read command to the same physical bank. 000 reserved 001 1 clock 010 2 clocks 011 3 clocks 100 4 clocks 101 5 clocks 110 6 clocks 111 7 clocks 034 78111213 1819 2122 31 r0000 cpo 0000 acsm 000000 wr_data_delay 0000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_210c table 9-9. timing_cfg_2 register field descriptions bits name description 0?3 ? reserved 4?7 cpo mcas -to-preamble override. defines the number of dram cycles between when a read is issued and when the corresponding dqs preamble is valid for the memory controller. 0000 default. mcas to preamble is defined as caslat + 1 0001 0010 + 1/2 0011 + 1 0100 + 3/2 0101 + 2 0110 + 5/2 0111 + 3 1000 + 7/2 1001 + 4 1010 + 9/2 1011 + 5 1100?1111 reserved 8?11 ? reserved table 9-8. timing_cfg_1 field descriptions (continued) bits name description caslat caslat caslat caslat caslat caslat caslat caslat caslat caslat caslat
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-14 freescale semiconductor ddr memory controller 9.4.1.5 ddr sdram control configuration (ddr_sdram_cfg) the ddr sdram control configuration register, shown in figure 9-6 , enables the interface logic and specifies certain operating features such as self refreshing, error checking and correcting, registered dimms, and dynamic power management. figure 9-6. ddr sdram control configuration register (ddr_sdram_cfg) 12 acsm address and control shift mode 0 the dram address and control buses are output in the default mode. 1 the dram address and control buses are delayed by 1/2 dram cycle before being driven onto the pins. 13?1 8 ? reserved 19?2 1 wr_data_dela y write command to write data strobe timing adjustment. controls the amount of delay applied to the data and data strobes for writes. 000 0 clock delay 001 2/8 clock delay (recommended) 010 4/8 clock delay 011 6/8 clock delay 100 1 clock delay 101?111 reserved 22?3 1 ? reserved 0 1 2 3 45 6 7 89 10 11 13 14 15 r mem_en sren ecc_en rd_en 0 0 sdram_type 0 0 dyn_pwr 000 ncap 0 w reset 0000_0010_0000_0000 16 17 31 2t_en 0 0 0 000 000 0 00000 0000_0000_0000_0000 offset 0x0_2110 table 9-9. timing_cfg_2 register field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-15 table 9-10 describes the ddr_sdram_cfg fields. table 9-10. ddr_sdram_cfg field descriptions bits name description 0 mem_en ddr sdram interface logic enable 0 sdram interface logic is disabled 1 sdram interface logic is enabled. must not be set until all other memory configuration parameters have been appropriately configured by initialization code. 1 sren self refresh enable (during sleep) 0 sdram self refresh is disabled during sleep or soft-stop. whenever self-refresh is disabled, the system is responsible for preserving the integrity of sdram during sleep or soft-stop. 1 sdram self refresh is enabled during sleep or soft-stop 2 ecc_en ecc enable. note that uncorrectable read errors may cause the assertion of core_fault_in , which causes the core to generate a machine check interrupt unless it is disabled (by clearing hid1[rfxe]). if rfxe is zero and this error occurs, err_disable[mbed] must be zero and err_int_en[mbee] and ecc_en must be one to ensure an interrupt is generated. see section 6.10.2, ?hardware implementation-dependent register 1 (hid1).? 0 no ecc errors are reported. no ecc interrupts are generated. 1 ecc is enabled. 3 rd_en registered dimm enable. specifies the type of dimm used in the system. 0 indicates unbuffered dimms. 1 indicates registered dimms. 4?5 ? reserved 6?7 sdram_type type of sdram device to be used 00?01 reserved 10 ddr sdram 11 reserved 8?9 ? reserved 10 dyn_pwr dynamic power management mode 0 dynamic power management mode is disabled. 1 dynamic power management mode is enabled. if there is no ongoing memory activity, the sdram cke signal is negated. 11?13 ? reserved 14 ncap non-concurrent auto precharge 0 sdrams in system support concurrent auto precharge. 1 sdrams in system do not support concurrent auto precharge. 15 ? reserved 16 2t_en 2t timing enable 0 1t timing is used. the sdram command/address are held for only 1 cycle on the sdram bus. 1 2t timing is enabled. the sdram command/address are held for 2 full cycles on the sdram bus for every sdram transaction. however, the chip select is only held for the second cycle. 17?31 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-16 freescale semiconductor ddr memory controller 9.4.1.6 ddr sdram mode configuration (ddr_sdram_mode) the ddr sdram mode configuration register, shown in figure 9-7 , sets the values loaded into the ddr?s mode registers. figure 9-7. ddr sdram mode configuration register (ddr_sdram_mode) table 9-11 describes the ddr_sdram_mode fields. 9.4.1.7 ddr sdram interval configuration (ddr_sdram_interval) the ddr sdram interval configuration register, shown in figure 9-8 , sets the number of dram clock cycles between bank refreshes issued to the ddr sdrams. in addition, the number of dram cycles that a page is maintained after it is accessed is provided here. 0151631 r esdmode sdmode w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_2118 table 9-11. ddr_sdram_mode field descriptions bits name description 0?15 esdmod e[0:15] extended sdram mode. specifies the initial value loaded into the ddr sdram extended mode register. the range and meaning of legal values is specified by the ddr sdram manufacturer. the value of esdmode[1:15] is driven onto ma[14:0] during the extended mode register set operation of the intialization sequence. the lsb of esdmode (esdmode[15]) is driven onto ma[0] and esdmode[1] is driven onto ma[14]. 16?3 1 sdmode [0:15] sdram mode. specifies the initial value loaded into the ddr sdram mode register. the range of legal values of legal values is specified by the ddr sdram manufacturer. the value of sdmode[1:15] is driven onto ma[14:0] during the mode register set operation of the intialization sequence. the lsb of sdmode (sdmode[15]) is driven onto ma[0] and sdmode[1] is driven onto ma[14]. because the memory controller forces sdmode[3?8] to certain values depending upon the state of the initialization sequence (for resetting the sdram?s dll) the corresponding bits of this field is ignored by the memory controller. 0 1 2 15161718 31 r0 0 refint 00 bstopre w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_2124 figure 9-8. ddr sdram interval configuration register (ddr_sdram_interval)
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-17 table 9-12 describes the ddr_sdram_interval fields. 9.4.1.8 memory data path error injection mask high (data_err_inject_hi) the memory data path error injection mask high register is shown in figure 9-9 . figure 9-9. memory data path error injection mask high register (data_err_inject_hi) table 9-13 describes the data_err_inject_hi fields. table 9-12. ddr_sdram_interval field descriptions bits name description 0?1 ? reserved 2?15 refint refresh interval. represents the number of memory bus clock cycles between refresh cycles. one row is refreshed in each ddr sdram physical bank during each refresh cycle. the value for refint depends on the specific sdrams used and the interface clock frequency. note that refint must be set to a non-zero value in order for the ddr to enter sleep mode. see section 18.5.1.5.3, ?sleep mode ,? for additional details. 16?17 ? reserved 18?31 bstopre precharge interval. sets the duration (in memory bus clocks) that a page is retained after a ddr sdram access. if bstopre is zero, the ddr memory controller uses auto precharge read and write commands rather than operating in page mode. this is called global auto precharge mode. 0 31 r eimh w reset 0000_0000_0000_0000 offset 0x0_2e00 table 9-13. data_err_inject_hi field descriptions bits nam e description 0?31 eimh error injection mask high data path. used to test ecc by forcing errors on the high word of the data path. setting a bit causes the corresponding data path bit to be inverted on memory bus writes.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-18 freescale semiconductor ddr memory controller 9.4.1.9 memory data path error injection mask low (data_err_inject_lo) the memory data path error injection mask low register is shown in figure 9-10 . figure 9-10. memory data path error injection mask low register (data_err_inject_lo) table 9-14 describes the data_err_inject_lo fields. 9.4.1.10 memory data path error injection mask ecc (ecc_err_inject) the memory data path error injection mask ecc register, shown in figure 9-11 , sets the ecc mask, enables errors to be written to ecc memory, and allows the ecc byte to mirror the most significant data byte. figure 9-11. memory data path error injection mask ecc register (ecc_err_inject) 0 31 r eiml w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_2e04 table 9-14. data_err_inject_lo field descriptions bits name description 0?31 eiml error injection mask low data path. used to test ecc by forcing errors on the low word of the data path. setting a bit causes the corresponding data path bit to be inverted on memory bus writes. 0 21 22 23 24 31 r0000000000000000000000 emb eien eeim w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_2e08
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-19 table 9-15 describes the ecc_err_inject fields. 9.4.1.11 memory data path read capture high (capture_data_hi) the memory data path read capture high register, shown in figure 9-12 , stores the high word of the read data path during error capture. figure 9-12. memory data path read capture high register (capture_data_hi) table 9-16 describes the capture_data_hi fields. table 9-15. ecc_err_inject field descriptions bits name description 0?21 ? reserved 22 emb ecc mirror byte 0 mirror byte functionality disabled 1 mirror the most significant data path byte onto the ecc byte. 23 eien error injection enable 0 error injection disabled 1 error injection enabled. this applies to the data mask bits, the ecc mask bits, and the ecc mirror bit. 24?31 eeim ecc error injection mask. setting a mask bit causes the corresponding ecc bit to be inverted on memory bus writes. 0 31 r echd w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_2e20 table 9-16. capture_data_hi field descriptions bits name description 0?31 echd error capture high data path. captures the high word of the data path when errors are detected.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-20 freescale semiconductor ddr memory controller 9.4.1.12 memory data path read capture low (capture_data_lo) the memory data path read capture low register, shown in figure 9-13 , stores the low word of the read data path during error capture. figure 9-13. memory data path read capture low register (capture_data_lo) table 9-17 describes the capture_data_lo fields. 9.4.1.13 memory data path read capture ecc (capture_ecc) the memory data path read capture ecc register, shown in figure 9-14 , stores the ecc syndrome bits that were on the data bus when an error was detected. figure 9-14. memory data path read capture ecc register (capture_ecc) table 9-18 describes the capture_ecc fields. 0 31 r ecld w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_2e24 table 9-17. capture_data_lo field descriptions bits name description 0?31 ecld error capture low data path. captures the low word of the data path when errors are detected. 0 23 24 31 r000000000000000000000000 ece w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_2e28 table 9-18. capture_ecc field descriptions bits name description 0?23 ? reserved 24?31 ece error capture ecc. captures the ecc bits on the data path whenever errors are detected.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-21 9.4.1.14 memory error detect (err_detect) the memory error detect register, shown in figure 9-15 , stores the detection bits for multiple memory errors, single- and multiple-bit ecc errors, and memory select errors. it is a read/write register. a bit can be cleared by writing a high value to the bit. system software can determine the type of memory error by examining the contents of this register. if an error is disabled with err_disable, the corresponding error is never detected or captured in err_detect. table 9-19 describes the err_detect fields. 9.4.1.15 memory error disable (err_disable) the memory error disable register, shown in figure 9-16 , allows selective disabling of the ddr controller?s error detection circuitry. disabled errors are not detected or reported. 01 27 28 29 30 31 r mme 000000000000000000000000000 mbe sbe 0 mse w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_2e40 figure 9-15. memory error detect register (err_detect) table 9-19. err_detect field descriptions bits name description 0 mme multiple memory errors. this bit is cleared by software writing a 1. 0 multiple memory errors of the same type were not detected. 1 multiple memory errors of the same type were detected. 1?27 ? reserved 28 mbe multiple-bit error. this bit is cleared by software writing a 1. 0 a multiple-bit error has not been detected. 1 a multiple-bit error has been detected. 29 sbe single-bit ecc error. this bit is cleared by software writing a 1. 0 the number of single-bit ecc errors detected has not crossed the threshold set in err_sbe[sbet]. 1 the number of single-bit ecc errors detected crossed the threshold set in err_sbe[sbet]. 30 ? reserved 31 mse memory select error. this bit is cleared by software writing a 1. 0 a memory select error has not been detected. 1 a memory select error has been detected.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-22 freescale semiconductor ddr memory controller figure 9-16. memory error disable register (err_disable) table 9-20 describes the err_disable fields. 9.4.1.16 memory error interrupt enable (err_int_en) the memory error interrupt enable register, shown in figure 9-17 , enables ecc interrupts or memory select error interrupts. when an enabled interrupt condition occurs, the internal int signal is asserted to the programmable interrupt controller (pic). figure 9-17. memory error interrupt enable register (err_int_en) 0 27 28 29 30 31 r0000000000000000000000000000 mbed sbed 0 msed w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_2e44 table 9-20. err_disable field descriptions bits name description 0?27 ? reserved 28 mbed multiple-bit ecc error disable 0 multiple-bit ecc errors are detected if ddr_sdram_cfg[ecc_en] is set. they are reported if err_int_en[mbee] is set. note that uncorrectable read errors cause the assertion of core_fault_in , which causes the core to generate a machine check interrupt, unless it is disabled (by clearing hid1[rfxe]). if rfxe is zero and this error occurs, mbed must be zero and err_int_en[mbee] and ecc_en must be one to ensure that an interrupt is generated. 1 multiple-bit ecc errors are not detected or reported. 29 sbed single-bit ecc error disable 0 single-bit ecc errors are enabled. 1 single-bit ecc errors are disabled. 30 ? reserved 31 msed memory select error disable 0 memory select errors are enabled. 1 memory select errors are disabled. 0 27 28 29 30 31 r0000000000000000000000000000 mbee sbee 0 msee w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_2e48
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-23 table 9-21 describes the err_int_en fields. 9.4.1.17 memory error attributes capture (capture_attributes) the memory error attributes capture register, shown in figure 9-18 , sets attributes for errors including type, size, source, and others. figure 9-18. memory error attributes capture register (capture_attributes) table 9-22 describes the capture_attributes fields. table 9-21. err_int_en field descriptions bits name description 0?27 ? reserved 28 mbee multiple-bit ecc error interrupt enable. note that uncorrectable read errors may cause the assertion of core_fault_in , which causes the core to generate a machine check interrupt, unless it is disabled (by clearing hid1[rfxe]). if rfxe is zero and this error occurs, err_disable[mbed] must be zero and mbee and ddr_sdram_cfg[ecc_en] must be set to ensure that an interrupt is generated. for more information, see section 6.10.2, ?hardware implementation-dependent register 1 (hid1).? 0 multiple-bit ecc errors cannot generate interrupts. 1 multiple-bit ecc errors generate interrupts. 29 sbee single-bit ecc error interrupt enable 0 single-bit ecc errors cannot generate interrupts. 1 single-bit ecc errors generate interrupts. 30 ? reserved 31 msee memory select error interrupt enable 0 memory select errors do not cause interrupts. 1 memory select errors generate interrupts. 0 1 3 4 5 7 8 1011 151617181920 30 31 r0 bnum 0 tsiz 000 tsrc 00 ttyp 00000000000 vld w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_2e4c table 9-22. capture_attributes field descriptions bits name description 0?reserved 1?3 bnum data beat number. captures the data beat number for the detected error. relevant only for ecc errors. 4?reserved 5?7 tsiz transaction size for the error. captures the transaction size in double words. 8?10 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-24 freescale semiconductor ddr memory controller 9.4.1.18 memory error address capture (capture_address) the memory error address capture register, shown in figure 9-19 , holds the 32 lsbs of a transaction when a ddr ecc error is detected. figure 9-19. memory error address capture register (capture_address) table 9-23 describes the capture_address fields. 11?15 tsrc transaction source for the error 00000 pci 00001?00011 reserved 00100 local bus 00101?00111 reserved 01000 configuration space 01001 reserved 01010 boot sequencer 01011 reserved 01100 rapidio 01101?01111 reserved 10000 processor (instruction) 10001 processor (data) 10010?10011 reserved 10100 reserved 10101 dma 10110 reserved 10111 sap 11000 tsec1 11001 tsec2 11010 fec 11011 reserved 11100 rapidio message units 11101 rapidio doorbell units 11110 rapidio port?write units 11111 reserved 16?17 ? reserved 18?19 ttyp transaction type for the error 00 reserved 01 write 10 read 11 read-modify-write 20?30 ? reserved 31 vld valid. set as soon as valid information is captured in the error capture registers. 0 31 r caddr w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_2e50 table 9-23. capture_address field descriptions bits name description 0?31 caddr captured address. captures the 32 lsbs of the transaction address when an error is detected. table 9-22. capture_attributes field descriptions (continued) bits name description
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-25 9.4.1.19 single-bit ecc memory error management (err_sbe) the single-bit ecc memory error management register, shown in figure 9-20 , stores the threshold value for reporting single-bit errors and the number of single-bit errors counted since the last error report. when the counter field reaches the threshold, it wraps back to the reset value (0). if necessary, software must clear the counter after it has managed the error. figure 9-20. single-bit ecc memory error management register (err_sbe) table 9-24 describes the err_sbe fields. 9.5 functional description the ddr sdram controller controls processor and i/o interactions with system memory. it provides support for jedec-compliant ddr sdrams (first generation dual data rate). the memory system allows a wide range of memory devices to be mapped to any arbitrary chip select. however, registered dimms cannot be mixed with unbuffered dimms. figure 9-21 is a high-level block diagram of the ddr memory controller. requests are received from the internal mastering device and the address is decoded to generate the physical bank, logical bank, row, and column addresses. the transaction is then loaded into the input staging queue with the decoded information. the lower two entries of the input queue are compared with values in the row open table to determine if the address maps to an open page. if the address from either entry does not map to an open page, an activate command is issued for the entry that did not hit an open page, with the lowest entry having priority over the next lowest. commands are always issued from the lowest input queue entry. 0 78 1516232431 r00000000 sbet 00000000 sbec w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_2e58 table 9-24. err_sbe field descriptions bits name description 0?7 ? reserved 8?15 sbet single-bit error threshold. establishes the number of single-bit errors that must be detected before an error condition is reported. 16?23 ? reserved 24?31 sbec single-bit error counter. indicates the number of single-bit errors detected and corrected since the last error report. if single-bit error reporting is enabled, an error is reported and an interrupt is generated when this value equals sbet. sbec is automatically cleared when the threshold value is reached.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-26 freescale semiconductor ddr memory controller figure 9-21. ddr memory controller block diagram the ddr sdram interface supports as many as four physical banks of 64/72 bit-wide memory. a bank size up to 1 gbyte is supported, providing up to a maximum of 4 gbytes of ddr main memory. however, 4 gbytes would span the entire 32-bit address space, and some space must be reserved for boot rom, configuration registers, and other important addressable locations. programmable parameters allow for a variety of memory organizations and timings. optional error checking and correcting (ecc) protection is provided for the ddr sdram data bus. using ecc, the ddr memory controller detects and corrects all single-bit errors within the 64-bit data bus, detects all double-bit errors within the 64-bit data bus, and detects all errors within a nibble. the controller allows as many as 16 pages to be open simultaneously. the amount of time (in clock cycles) the pages remain open is programmable with ddr_sdram_interval[bstopre]. read and write accesses to the ddr sdram are burst oriented; accesses start at a selected location and continue for a programmed number of higher locations (2, 4, or 8) in a programmed sequence, (sequential or interleaved). accesses to closed pages start with the registration of an address decode r equest from master input staging queue physical bank, logical bank, row row open address control ddr sdram memory array: ma[0:14] mbaa[0:1] debug signals: msrcid[0:4] mdval ddr sdram memory contro l: mcs [0:3] mcas mras mwe mdm[0:8] mcke[0:1] data strobes: mdqs[0:8] data signals: mdq[0:63] mecc[0:7] address from master sdram control row open table delay chain neg dq ecc error signals dq dq ecc rmw ecm to e r ro r management data from sdram data from master en en clocks: mck [0:5] mck[0:5] msync_out msync_in dll fifo pos fifo
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-27 active command followed by a read or write. (accessing open pages does not require an active command.) the address bits registered coincident with the activate command specifies the logical bank and row to be accessed. the address coincident with the read or write command specify the logical bank and starting column for the burst access. the data interface is source synchronous, meaning whatever sources the data also provides a clocking signal to synchronize data reception. these bidirectional data strobes (mdqs[0:8]) are inputs to the controller during reads, and outputs during writes. the ddr sdram specification requires the data strobe signals to be centered within the data tenure during writes and to be offset by the controller to the center of the data tenure during reads. this is implemented in the controller with delay chains for the data strobe signals during reads and a delay chain on the data multiplexer select during writes. when ecc is enabled, one clock cycle is added to the read path to check ecc and correct single-bit errors. ecc generation does not add a cycle to the write path. figure 9-22 shows how the on-chip dll can be used with the memory controller. figure 9-22. controller dll timing loop l 2 -- - dll ddr controller ck dll_sync_out ddr sdram internal clock ck dll dll_sync_in dll timing loop clock pcb trace length ?l?
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-28 freescale semiconductor ddr memory controller figure 9-23 shows an example ddr sdram configuration with four physical banks. figure 9-23. typical dual data rate sdram internal organization figure 9-24 shows some typical signal connections. figure 9-24. typical ddr sdram interface signals figure 9-25 shows an example ddr sdram configuration with four physical banks each comprised of nine 8m 8 ddr modules for a total of 256 mbytes of system memory. one of the nine modules is used for the memory?s ecc checking function. certain address and control lines may require buffering. analysis of the MPC8540 device?s ac timing specifications, desired memory operating frequency, capacitive loads, and board routing loads, can assist the system designer in deciding signal buffering requirements. the MPC8540 ddr memory controller drives 15 address pins, but in this example the ddr sdram devices use only 12 bits. logical bank 0 logical bank 1 logical bank 2 logical bank 3 mux, mask, read data latch data-out registers data-in registers data bus addr command: dqm ba1,ba0 cke, mck, mck mcs , mras , mcas , mwe control sdram a[12:0] write enable dq[7:0] dqs 64m 1 byte ck command bus 512 mbit ba[1:0] data data 8 addr mras mcas mwe mcs dm cke mck mck 13 2 ?sub? bank addr strobe
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-29 figure 9-25. example 256-mbyte ddr sdram configuration with ecc cas cs ras cke clk dm a[0-11] 2 mx8 sdram dq[0-7] ba[0-1] cas cs ras cke clk dm a[0-11] 2mx8 sdram dq[0-7] ba[0-1] cas cs ras cke clk dm a[0-11] 2mx8 sdram dq[0-7] ba[0-1] cas cs ras cke clk dm a[0-11] 2mx8 sdram dq[0-7] ba[0-1] cas cs ras cke clk dm a(11-0) 2 mx8 sdram dq(7-0) ba(1-0) cas cs ras cke clk dm a(11-0) 2mx8 sdram dq(7-0) ba(1-0) cas cs ras cke clk dm a[0-11] 2mx8 sdram dq[0-7] ba[0-1] cas cs ras we cke ck dm a[11:0] 8m 8 sdram dq[7:0] ba[1:0] 0 mdq[0:7] mdq[8:15] mdq[16:23] mdq[24:31] mdq[32:39] mdq[40:47] mdq[48:55] mdq[56:63] 1 2 3 4 5 6 7 0 mdq[0:7] 1 2 3 4 5 6 7 cas cs ras cke ck dm a[11:0] 8m 8 sdram dq[7:0] ba[1:0] 8 ecc[0:7] mras mcas mwe mcke mck[0:5] mcs [0:3] mba[0:1] ma[0:14] mdq[0:63] mecc[0:7] mdm[0:8] mcs0 mcs1 bank 1 8m 72 (64 mbytes) to all sdram devices in common memory data bus and strobes bank 0 8m 72 (64 mbytes) cas cs ras cke clk dm a[0-11] 2mx8 sdram dq[0-7] ba[0-1] cas cs ras cke clk dm a[0-11] 2 mx8 sdram dq[0-7] ba[0-1] cas cs ras cke clk dm a[0-11] 2mx8 sdram dq[0-7] ba[0-1] cas cs ras cke clk dm a[0-11] 2mx8 sdram dq[0-7] ba[0-1] cas cs ras cke clk dm a(11-0) 2mx8 sdram dq(7-0) ba(1-0) cas cs ras cke clk dm a(11-0) 2 mx8 sdram dq(7-0) ba(1-0) cas cs ras cke clk dm a[0-11] 2mx8 sdram dq[0-7] ba[0-1] cas cs ras cke ck dm a[11:0] 8m 8 sdram dq[7:0] ba[1:0] mdq[8:15] mdq[16:23] mdq[24:31] mdq[32:39] mdq[40:47] mdq[48:55] mdq[56:31] banks 2? 3 mdqs[0] mdqs mdqs[7] mdqs[8] mdqs mdqs[0] mdqs mdqs[7] mdqs[0:8] 4. mck[0:5] may be apportioned among all memory devices. complementary bus is not shown. 3. buffering may be needed if large memory arrays are used. 2. each of the mcs [0:3] signals correspond with a separate physical bank of memory. 1. all signals are connected in common (in parallel) except for mcs [0:3],mck[0:5], mdm[0:8], and the data bus signals . ddr controller cas cs ras cke ck dm a[11:0] 8m 8 sdram dq[7:0] ba[1:0] 8 ecc[0:7] mdqs[8] mdqs mck [0:5] we we we
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-30 freescale semiconductor ddr memory controller section 9.5.12, ?error management,? explains how the ddr memory controller handles errors. 9.5.1 ddr sdram interface operation the ddr memory controller supports many different ddr sdram configurations. sdrams with different sizes can be used in the same system. fourteen multiplexed address signals and two logical bank select signals support device densities from 64 mbit to 1 gbit. four chip select (cs ) signals support up to two dimms of memory. the ddr sdram physical banks can be built from standard memory modules or directly-attached memory devices. the data path to individual physical banks is 64 bits wide, 72 bits with ecc. the MPC8540 ddr memory controller supports physical bank sizes from 32 mbytes to 1 gbytes. the physical banks can be constructed using 8, or 16 memory devices. the memory technologies supported are 64, 128, 256, and 512 mbit, and 1 gbit. nine data qualifier (dqm) signals provide byte selection for memory accesses. note an 8-bit ddr sdram device has a dqm signal and 8 data signals (dq[0:7]). a 16-bit ddr sdram device has 2 dqm signals associated with specific halves of the 16 data signals (dq[0:7] and dq[8:15]). when ecc is enabled, all memory accesses are performed on double-word boundaries (that is, all dqm signals are set simultaneously). however, when ecc is disabled, the memory system uses the dqm signals for byte lane selection. table 9-25 shows the ddr memory controller?s relationships between data byte lane 0?7, mdm[0:7], mdqs[0:7], and mdq[0:63]. table 9-25. byte lane to data relationship data byte lane data bus mask data bus strobe data bus 64-bit mode 0 (msb) mdm[0] mdqs[0] mdq[0:7] 1 mdm[1] mdqs[1] mdq[8:15] 2 mdm[2] mdqs[2] mdq[16:23] 3 mdm[3] mdqs[3] mdq[24:31] 4 mdm[4] mdqs[4] mdq[32:39] 5 mdm[5] mdqs[5] mdq[40:47] 6 mdm[6] mdqs[6] mdq[48:55] 7 (lsb) mdm[7] mdqs[7] mdq[56:63]
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-31 9.5.1.1 supported ddr sdram organizations although the ddr memory controller multiplexes row and column address bits onto 14 memory address signals and 2 logical bank select signals, individual physical banks may be implemented with memory devices requiring fewer than 28 address bits. each physical bank may be individually configured to provide from 12 to 14 row address bits, plus 2 logical bank-select bits and from 8?11 column address bits. table 9-26 describes ddr sdram device configurations supported by the ddr memory controller. note ddr sdram is limited to 27 total address bits. if a transaction request is issued to the ddr memory controller and the address does not lie within any of the programmed address ranges for an enabled chip select, a memory select error is flagged. errors are described in detail in section 9.5.12, ?error management.? by using a memory-polling algorithm at power-on reset or by querying the jedec serial presence detect capability of memory modules, system firmware uses the memory-boundary registers to configure the ddr memory controller to map the size of each bank in memory. the memory controller uses its bank map to assert the appropriate mcs n signal for memory accesses according to the provided bank starting and ending addresses. the memory banks are not required to be mapped to a contiguous address space. 9.5.2 ddr sdram address multiplexing table 9-27 shows the address bit encodings for each ddr sdram configuration. the address presented at the memory controller signals ma[14:0] use ma[14] as the msb and ma[0] as the lsb. also, ma[10] is used as the auto precharge bit for reads and writes, so the column address can never use ma[10]. table 9-26. supported ddr sdram device configurations sdram device device configuration row column bits 64-bit bank size four banks of memory 64 mbits 8 mbits 812 9 64 mbytes 256 mbytes 64 mbits 4 mbits 16 12 8 32 mbytes 128 mbytes 128 mbits 16 mbits 8 12 10 128 mbytes 512 mbytes 128 mbits 8 mbits 16 12 9 64 mbytes 256 mbytes 256 mbits 32 mbits 8 13 10 256 mbytes 1 gbytes 256 mbits 16 mbits 16 13 9 128 mbytes 512 mbytes 512 mbits 64 mbits 813 11 512 mbytes 2 gbytes 512 mbits 32 mbits 16 13 10 256 mbytes 1 gbytes 1 gbits 128 mbits 814 11 1 gbytes 4 gbytes 1 gbits 64 mbits 16 14 10 512 mbytes 2 gbytes
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-32 freescale semiconductor ddr memory controller 9.5.3 jedec standard ddr sdram interface commands all read or write accesses to ddr sdram are performed by the ddr memory controller using jedec standard ddr sdram interface commands. the sdram device samples command and address inputs on rising edges of the memory clock; data is sampled using both the rising and falling edges of dqs. data read from the ddr sdram is also sampled on both edges of dqs. table 9-27. ddr sdram address multiplexing row x col msb address from core master lsb 0 12345678910111213141516171819202122232425262728 29?31 14 11 mras 131211109876543210 mba 10 mcas 119876543210 14 10 mras 131211109876543210 mba 10 mcas 9876543210 13 11 mras 1211109876543210 mba 10 mcas 119876543210 13 10 mras 1211109876543210 mba 10 mcas 9876543210 13 9 mras 1211109876543210 mba 10 mcas 876543210 12 10 mras 11109876543210 mba 10 mcas 9876543210 12 9 mras 11109876543210 mba 10 mcas 876543210 12 8 mras 11109876543210 mba 10 mcas 76543210
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-33 the following ddr sdram interface commands (summarized in table 9-28 ) are provided by the ddr controller. all actions for these commands are described from the perspective of the sdram device.  row activate?latches row address and initiates memory read of that row. row data is latched in sdram sense amplifiers and must be restored by a precharge command before another row activate occurs.  precharge?restores data from the sense amplifiers to the appropriate row. also initializes the sense amplifiers in preparation for reading another row in the memory array, (performing another activate command). precharge must occur after read or write, if the row address changes on the next open page mode access.  read?latches column address and transfers data from the selected sense amplifier to the output buffer as determined by the column address. during each succeeding clock edge, additional data is driven without additional read commands. the amount of data transferred is determined by the burst size which defaults to 4.  write?latches column address and transfers data from the data pins to the selected sense amplifier as determined by the column address. during each succeeding clock edge, additional data is transferred to the sense amplifiers from the data pins without additional write commands. the amount of data transferred is determined by the burst size, which is set to four by the ddr memory controller.  refresh (similar to mcas before mras )?causes a row to be read in all logical banks (jedec sdram) as determined by the refresh, row address counter. this refresh row address counter is internal to the sdram. after being read, the row is automatically rewritten in the memory array. all logical banks must be in a precharged state before executing a refresh.  mode register set (for configuration)?allows setting of ddr sdram options. these options are: mcas latency, burst type, and burst length. mcas latency may be chosen as provided by the preferred sdram (some sdrams provide mcas latency {1,2,3}, some provide mcas latency {1,2,3,4}, and so on). burst type is always sequential. although some sdrams provide burst lengths of 1, 2, 4, 8, and page size, this memory controller supports a burst length of 4. the mode register set command is performed by the ddr memory controller during system initialization. parameters such as mode register data, mcas latency, burst length, and burst type, are set by software in ddr_sdram_mode[sdmode] and transferred to the sdram array by the ddr memory controller after ddr_sdram_cfg[mem_en] is set.  self refresh (for long periods of standby)?used when the device is in standby for very long periods of time. automatically generates internal refresh cycles to keep the data in all memory banks refreshed. before execution of this command, all logical banks are in a precharged state.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-34 freescale semiconductor ddr memory controller 9.5.4 sdram interface timing the ddr memory controller supports four-beat bursts to sdram. for single-beat reads, the ddr memory controller performs a four-beat burst read, but ignores the last three beats. single-beat writes are performed by masking the last three beats of the four-beat burst using the data mask mdm[0:8]. if ecc is disabled, writes smaller than double words are performed by appropriately activating the data mask. if ecc is enabled, the controller performs a read-modify write. note if a second read or write is pending, reads shorter than four beats are not terminated early even if some data is irrelevant. to accommodate available memory technologies across a wide spectrum of operating frequencies, the ddr memory controller allows the setting of the intervals defined in table 9-29 with granularity of one memory clock cycle, except for caslat, which can be programmed with 1/2 clock granularity. table 9-28. sdram command table operation cke prev. cke current mcs mras mcas mwe mba ma10 ma activate h h l l h h logical bank select row row precharge select logical bank h h l l h l logical bank select lx precharge all logical banks hhllhl x h x read h h l h l h logical bank select l column read with auto precharge h h l h l h logical bank select h column write h h l h l l logical bank select l column write with auto precharge h h l h l l logical bank select h column mode register set h h l l l l opcode opcode opcode and mode auto refresh h h l l l h x x x self refresh h l l l l h x x x
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-35 the value of the above parameters (in whole clock cycles) must be set by boot code at system start-up (in the timing_cfg_1 and timing_cfg_2 registers as described in section 9.4.1.3, ?ddr sdram timing configuration 1 (timing_cfg_1),? and section 9.4.1.4, ?ddr sdram timing configuration 2 (timing_cfg_2)? ) and be kept in the ddr memory controller configuration register space. the following figures show sdram timing for various types of accesses. system software is responsible (at reset) for optimally configuring sdram timing parameters. the programmable timing parameters apply to both read and write timing configuration. the configuration process table 9-29. ddr sdram interface timing intervals timing intervals definition acttoact the number of clock cycles from a bank-activate command until another bank-activate command within a physical bank. this interval is listed in the ac specifications of the sdram. actopre the number of clock cycles from an activate command until a precharge command is allowed. this interval is listed in the ac specifications of the sdram. actorw the number of clock cycles from an activate command until a read or write command is allowed. this interval is listed in the ac specifications of the sdram. bstopre the number of clock cycles to maintain a page open after an access. the page open duration counter is reloaded with bstopre each time the page is accessed (including page hits). when the counter expires, the open page is closed with a sdram precharge bank command as soon as possible. caslat read latency. the number of clock cycles between the registration of a read command by the sdram and the availability of the first piece of output data. if a read comm and is registered at clock edge n , and the latency is m clocks, the data is available nominally coincident with clock edge n + m . pretoact the number of clock cycles from a precharge command until an activate or a refresh command is allowed. this interval is listed in the ac specifications of the sdram. refint refresh interval. represents the number of memory bus clock cycles between refresh cycles. one row is refreshed in each sdram bank during each refresh cycle. the value of refint depends on the specific sdrams used and the frequency of the interface. refrec the number of clock cycles from the refresh command until an activate command is allowed. this can be calculated by referring to the ac specification of the sdram device. the ac specification indicates a maximum refresh to activate interval in nanoseconds. wr_data_ delay provides different options for the timing between a write command and the write data strobe. this allows write data to be sent later than the nominal time to meet the sdram timing requirement between the registration of a write command and the reception of a data strobe associated with the write command. the specification dictates that the data strobe may not be received earlier than 75% of a cycle, or later than 125% of a cycle, from the registration of a write command. this parameter is not defined in the sdram specification. it is implementation-specific, defined for the ddr memory controller in timing_cfg_2. wrrec the number of clock cycles from the last beat of a write until a precharge command is allowed. this interval, write recovery time, is listed in the ac specifications of the sdram. wrtord last write pair to read command. controls the number of clock cycles from the last write data pair to the subsequent read command to the same bank.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-36 freescale semiconductor ddr memory controller must be completed and the ddr sdram initialized before any accesses to sdram are attempted. figure 9-26 through figure 9-28 show ddr sdram timing for various types of accesses; see figure 9-26 for a back-to-back burst read operation, figure 9-27 for a single-beat write operation, and figure 9-28 for a burst-write operation. note that all signal transitions occur on the rising edge of the memory bus clock and that single-beat read operations are identical to burst-reads. figure 9-26. ddr sdram burst read timing?acttorw = 3, mcas latency = 2 acttorw row col sdram clock mcs mcas ma[13:0] mdq[0:63] mwe mras mdqs col d1 d2 d3 d1 d2 d0 d3 d0 01 2345 67 89101112 caslat
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-37 figure 9-27. ddr sdram single-beat (double-word) write timing?acttorw = 3 figure 9-28. ddr sdram burst write timing?acttorw = 4 acttorw row col sdram clock mcs mcas ma[0:13] mdq[0:63] mwe mras mdqs d0 d1 d2 d3 00 mdm[0:7] wrrec a10=0 precharge pretoact row 01 2345 67 89101112 ff ff ff row col sdram clock mcs0 mcas ma[0:13] mdq[0:63] mwe mras mdqs mdm[0:7] 00 col mcs1 row? col? col? d1 d2 d3 d1 d2 d0 d3 d0 d1 d2 d3 d1 d2 d0 d3 d0 01 2345 67 89101112 acttorw
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-38 freescale semiconductor ddr memory controller 9.5.4.1 clock distribution  if running with many devices, zero-delay pll clock buffers, jedec-jesd82 standard, should be used. these buffers were designed for ddr applications.  the dll timing loop pcb route should mimic the mck route as closely as possible, although clock edges can be intentionally advanced or retarded by modifying this loop. with all ddr clocks as nearly identical as possible, the single dll timing loop can be finely adjusted to advance or retard all of them.  a 72 bit 64 mbytes ddr bank has 9-byte-wide ddr chips, resulting in 18 ddr chips in a two-bank system. in this case, each mck/mck signal pair should drive exactly three devices.  pcb traces for ddr clock signals should be short, all on the same layer, and of equal length and loading as the dll timing loop.  ddr sdram manufacturers provide detailed information on pcb layout and termination issues. figure 9-29. ddr sdram clock distribution example 9.5.5 ddr sdram mode-set command timing the ddr memory controller transfers the extended mode and base mode register data ddr_sdram_mode[esdmode,sdmode] to the sdram array by issuing two mode-set commands separated by two sdram clock periods. figure 9-30 shows the timing of the mode-set command. the first transfer corresponds to the esdmode code; the second corresponds to sdmode. following commands must wait two sdram cycles. mck[1], mck [1] mck[2], mck [2] mck[0], mck [0] dq[0:7], dqs[0], dm[0] dq[8:15], dqs[1], dm[1] dq[16:23], dqs[2], dm[2] dq[24:31], dqs[3], dm[3] dq[32:39], dqs[4], dm[4] dq[40:47], dqs[5], dm[5] dq[48:55], dqs[6], dm[6] dq[56:63], dqs[7], dm[7] ecc[0:7], dqs[8], dm[8] ddr cs [0] a[13:0], ba[1:0], mras , mcas , mwe , cke mck[4], mck [4 ] mck[5], mck [5 ] mck[3], mck [3 ] cs [1]
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-39 figure 9-30. ddr sdram mode-set command timing 9.5.6 ddr sdram registered dimm mode to reduce loading, registered dimms latch the ddr sdram control signals internally before using them to access the array. setting ddr_sdram_cfg[rd_en] compensates for this delay on the dimms? control bus by delaying the data and data mask writes (on sdram buses) by an extra sdram clock cycle. enabling registered dimm mode does not affect bus timing for ddr reads. however to compensate for latch delay on the registered dimms? control signals, the programmed sdram read latency value (timing_cfg_1[caslat]) must be one greater than the value needed for non-registered dimms. figure 9-31 shows the registered ddr sdram dimm back-to-back burst write timing. code code s dram clock mcs mcas ma[0:14] mdq[0:63] mwe mras mdqs 0x1 0x0 mba[0:1] 01 2345 67 89101112
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-40 freescale semiconductor ddr memory controller figure 9-31. registered ddr sdram dimm burst write timing 9.5.7 ddr sdram write timing adjustments the ddr memory controller facilitates system design flexibility by providing a write timing adjustment parameter, write data delay, (timing_cfg_2[wr_data_delay]) for data and dqs. the ddr sdram specification requires dqs be received no sooner than 75% of an sdram clock period?and no later than 125% of a clock period?from the capturing clock edge of the command/address at the sdram. the wr_data_delay parameter may be used to meet this timing requirement for a variety of system configurations, ranging from a system with one dimm to a fully populated system with two dimms. timing_cfg_2[wr_data_delay] specifies how much to delay the launching of dqs and data from the first clock edge occurring one sdram clock cycle after the command is launched. the delay increment step sizes are in 1/4 th sdram clock periods starting with the default value of 1/4 th period delay. figure 9-32 shows the use of the wr_data_delay parameter. acttorw row col sdram clock mcs mcas ma[13:0] mdq[0:63] mwe mras mdqs mdm[0:7] 00 col d1 d2 d3 d1 d2 d0 d3 d0 01 2345 67 89101112
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-41 figure 9-32. write timing adjustments example 9.5.8 ddr sdram refresh the ddr memory controller supports auto-refresh and self-refresh. auto refresh is used during normal operation and is controlled by the ddr_sdram_interval[refint] value; self-refresh is used only when the ddr memory controller is set to enter a sleep power management state or a soft-stop state. the refint value, which represents the number of memory bus clock cycles between refresh cycles, must allow for possible outstanding transactions to complete before a refresh request is sent to the memory after the refint value is reached. if a memory transaction is in progress when the refresh interval is reached, the refresh cycle waits for the transaction to complete. in the worst case, the refresh cycle must wait the number of bus clock cycles required by the longest programmed access. to ensure that the latency caused by a memory transaction does not violate the device refresh period, it is recommended that the programmed value of refint be less than that required by the sdram. acttorw row col sdram clock mcs mcas ma[13:0] mwe mras 00 mdq[0:63] mdqs mdm[0:7] 1/4 delay col mdq[0:63] mdqs mdm[0:7] 1/2 delay 01 2345 67 89101112 d0 d1 d2 d3 d0 d1 d2 d3 d0 d1 d2 d3 d0 d1 d2 d3 00
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-42 freescale semiconductor ddr memory controller when a refresh cycle is required, the ddr memory controller does the following: 1. completes all current memory requests 2. closes all open pages with a precharge-all command to each ddr sdram bank with an open page (as indicated by the row open table) 3. issues an auto-refresh command to each ddr sdram bank (as identified by its chip select) to refresh one row in each logical bank of the selected physical bank the auto-refresh commands are staggered across the four possible banks to reduce the system?s instantaneous power requirements. three sets of auto refresh commands must be issued on consecutive cycles when the memory is fully populated with two dimms. the initial precharge-all commands are also staggered in three groups for convenience. it is important to note that when entering self-refresh mode, only one refresh command is issued simultaneously to all physical banks. cke is negated at this time, so it would not be possible to stagger two more refresh commands. for this entire refresh sequence, no cycle optimization occurs for the usual case where fewer than four banks are installed. after the refresh sequence completes, any pending memory request is initiated after an inactive period specified by timing_cfg_1 [refrec]. 9.5.8.1 ddr sdram refresh timing refresh timing for the ddr sdram is controlled by the programmable timing parameter timing_cfg_1 [refrec], which specifies the number of memory bus clock cycles from the refresh command until a logical bank activate command is allowed. the ddr memory controller implements bank staggering for refreshes, as shown in figure 9-33 (timing_cfg_1 [refrec] = 10 in this example). figure 9-33. ddr sdram bank-staggered auto-refresh timing sdram clock mcs (0,3) mcas mras mcs (1) mcs (2) ma[13:0] row cke refrec 01 2345 67 89101112 13 14
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-43 system software is responsible for optimal configuration of timing_cfg_1 [refrec] at reset. configuration must be completed before ddr sdram accesses are attempted. 9.5.8.2 ddr sdram refresh and power-saving modes in full-on mode, the ddr memory controller supplies the normal auto refresh to sdram. in sleep mode, the ddr memory controller can be configured to take advantage of self-refreshing sdrams or to provide no refresh support. self-refresh support is enabled with the sren memory control parameter of the ddr_sdram_cfg register. table 9-30 summarizes the refresh types available in each power-saving mode. note that in the absence of refresh support, system software must preserve ddr sdram data (such as by copying the data to disk) before entering the power-saving mode. all open pages are precharged before self refresh mode is entered. the dynamic power-saving mode uses the cke ddr sdram pin to dynamically power down when there is no system memory activity. the cke pin is negated when both of the following conditions are met:  no memory refreshes are scheduled.  no memory accesses are scheduled. cke is reasserted when a new access or refresh is scheduled or the dynamic power mode is disabled. this mode is controlled with ddr_sdram_cfg[dyn_pwr]. dynamic power management mode offers tight control of the memory system?s power consumption by trading power for performance through the use of ddr_sdram_interval[bstopre]. powering up the ddr sdram when a new memory reference is scheduled causes a one-clock access latency penalty, as shown in figure 9-34 . figure 9-34. ddr sdram power-down mode table 9-30. ddr sdram power-saving modes refresh configuration power saving mode refresh type sren sleep self 1 none 0 mem bus clock nop nop command act cke
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-44 freescale semiconductor ddr memory controller 9.5.8.2.1 self-refresh in sleep mode the entry and exit timing for self-refreshing sdrams is shown in figure 9-35 and figure 9-36 . figure 9-35. ddr sdram self-refresh entry timing figure 9-36. ddr sdram self-refresh exit timing s dram clock mcs mcas ma[13:0] mdq[0:63] mwe mras mdqs (high impedance) cke 01 2345 67 89101112 (high impedance) 200 cycles s dram clock mcs mcas ma[13:0] mdq[0:63] mwe mras mdqs 01 2345 67 202203204205206
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-45 9.5.9 ddr data beat ordering transfers to and from memory are always performed in four-beat bursts (four beats = 32 bytes). for transfer sizes other than four beats, the data transfers are still operated as four-beat bursts. if ecc is enabled for a sub-doubleword write transaction, a full read-modify-write is performed to properly update ecc bits. if ecc is disabled then no read-modify-write is required for sub-doubleword writes, and the data masks (mdm[0:8]) are used to prevent writing unwanted data to sdram. the ddr memory controller also uses data masks to prevent all unintended full double words from writing to sdram. for example, if a write transaction is desired with a size of one double word (8 bytes), then the 2 nd , 3 rd , and 4 th beats of data are not written to dram. table 9-31 lists the data beat sequencing to and from the ddr sdram and the data queues for each of the possible transfer sizes with each of the possible starting double-word offsets. all underlined double-word offsets are valid for the transaction. 9.5.10 page mode and logical bank retention the ddr memory controller supports an open/closed page mode with an allowable open page for each logical bank of dram used. in closed page mode, the ddr memory controller uses the sdram auto precharge feature, which allows the controller to indicate that the page must be automatically closed by the ddr sdram after the read or write access. this is performed by using ma[10] of the address during the command phase of the access to enable auto precharge. auto precharge is non-persistent in that it is either enabled or disabled for each individual read or write command. it can however, be enabled or disabled separately for each chip select. table 9-31. memory controller?data beat ordering transfer size starting double-word offset double-word sequence 1 to/from dram and queues 1 all underlined double-word offsets are valid for the transaction. 1 double word 0 1 2 3 0 - 1 - 2 - 3 1 - 2 - 3 - 0 2 - 3 - 0 - 1 3 - 0 - 1 - 2 2 double words 0 1 2 0 - 1 - 2 - 3 1 - 2 - 3 - 0 2 - 3 - 0 - 1 3 double words 0 1 0 - 1 - 2 - 3 1 - 2 - 3 - 0 4 double words 0 1 2 3 0 - 1 - 2 - 3 1 - 2 - 3 - 0 2 - 3 - 0 - 1 3 - 0 - 1 - 2
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-46 freescale semiconductor ddr memory controller when the ddr memory controller operates in open page mode, it retains the currently active sdram page by not issuing a precharge command. the page remains opens until one of the following conditions occurs:  refresh interval is met  the user-programmable ddr_sdram_interval[bstopre] value is exceeded.  there is a logical bank row collision with another transaction that must be issued. page mode can dramatically reduce access latencies for page hits. depending on the memory system design and timing parameters, using page mode can save two to three clock cycles for subsequent burst accesses that hit in an active page. also, better performance can be obtained by using more banks, especially in systems which use many different channels. page mode is disabled by clearing ddr_sdram_interval[bstopre] and cs_n_config[ap_n_en] 9.5.11 error checking and correcting (ecc) the ddr memory controller supports error checking and correcting (ecc) for the data path between the core master and system memory. the memory detects all double-bit errors, detects all multi-bit errors within a nibble, and corrects all single-bit errors. other errors may be detected, but are not guaranteed to be corrected or detected. multiple-bit errors are always reported when error reporting is enabled. when a single-bit error occurs, the single-bit error counter register is incremented, and its value compared to the single-bit error trigger register. an error is reported when these values are equal. the single-bit error registers can be programmed such that minor memory faults are corrected and ignored, but a catastrophic memory failure generates an interrupt. for writes that are smaller than 64 bits, the ddr memory controller performs a double-word read from system memory of the address for the write (checking for errors), and merges the write data with the data read from memory. then, a new ecc code is generated for the merged double word. the data and ecc code is then written to memory. if a multi-bit error is detected on the read, the transaction completes the read-modify-write to keep the ddr memory controller from hanging. this read-modify-write operation is performed as an atomic transaction in the ddr controller. the write command is then issued 3?5 memory clocks after the completion of the read, depending on various system parameters. however, the corrupt data is masked on the write, so the original contents in sdram remain unchanged. the syndrome encodings for the ecc code are shown in table 9-32 and table 9-33 . table 9-32. ddr sdram ecc syndrome encoding data bit syndrome bit data bit syndrome bit 01234567 01234567 0   32   1   33   2   34 
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-47 3  35   4   36   5   37  6  38  7  39    8   40   9   41  10  42  11  43    12   44   13   45  14  46  15  47   16   48  17   49  18  50  19   51  20   52  21  53  22  54  23    55  24   56  25   57  26  58  27    59  28   60   29  61  30  62  31   63   table 9-32. ddr sdram ecc syndrome encoding (continued) data bit syndrome bit data bit syndrome bit 01234567 01234567
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-48 freescale semiconductor ddr memory controller 9.5.12 error management the ddr memory controller detects three different kinds of errors: single-bit, multi-bit, and memory select errors. the following discussion assumes all the relevant error detection, correction, and reporting functions are enabled as described in section 9.4.1.16, ?memory error interrupt enable (err_int_en),? section 9.4.1.15, ?memory error disable (err_disable),? and section 9.4.1.14, ?memory error detect (err_detect).? single-bit errors are counted and reported based on the err_sbe value. when a single-bit error is detected, the ddr memory controller does the following:  corrects the data  increments the single-bit error counter err_sbe[sbec]  generates an interrupt if the counter value err_sbe[sbec] equals the programmable threshold err_sbe[sbet]  completes the transaction normally if a multi-bit error is detected for a read, the ddr memory controller logs the error and generates an interrupt (if enabled, as described in section 9.4.1.15, ?memory error disable (err_disable)? ). the final error the ddr memory controller detects is a memory select error, which causes the ddr memory controller to log the error and generate an interrupt (if enabled, as described in section 9.4.1.14, ?memory error detect (err_detect)? ). this error is detected if the address from the memory request does not fall into any of the enabled, programmed chip select address ranges. table 9-34 shows the errors with their descriptions. table 9-33. ddr sdram ecc syndrome encoding (check bits) check bit syndrome bit 01234567 0  1  2  3  4  5  6  7 
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 9-49 9.6 initialization/application information system software must configure the ddr memory controller, using a memory polling algorithm at system start-up, to correctly map the size of each bank in memory. then, the ddr memory controller uses its bank map to assert the appropriate mcs [0:3] signal for memory accesses according to the provided bank depths. system software must also configure the ddr memory controller at system start-up to multiplex appropriately the row and column address bits for each bank. refer to row-address configuration in section 9.4.1.2, ?chip select configuration (csn_config).? address multiplexing occurs according to these configuration bits. at system reset, initialization software (bootcode) must set up the programmable parameters in the memory interface configuration registers (micrs). see section 9.4.1, ?register descriptions,? for more detailed descriptions of the configuration registers. these parameters are shown in table 9-35 . table 9-34. memory controller errors category error descriptions action detect register notification single-bit ecc threshold the number of ecc errors has reached the threshold specified in the err_sbe. the error is reported through an interrupt if enabled the error control register only logs read versus write, not full type. access error multi-bit ecc error a multi-bit ecc error is detected during a read, or read-modify-write memory operation. memory select error read, or write, address does not fall within the address range of any of the memory banks. table 9-35. memory interface configuration register initialization parameters name description parameter section/pag e cs n _bnds chip select memory bounds sa n ea n 9.4.1.1/9-10 cs n _config chip select configuration cs_ n _en row_bits_cs_ n col_bits_cs_ n 9.4.1.2/9-10 timing_cfg_1 ddr sdram timing configuration pretoact acttopre acttorw caslat refrec wrrec acttoact wrtord wr_data_delay 9.4.1.3/9-11
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 9-50 freescale semiconductor ddr memory controller 9.6.1 ddr sdram initialization sequence after configuration of all parameters is complete, system software must set ddr_sdram_cfg[mem_en] to enable the memory interface. note that 200 s must elapse after the memory clocks are stable (that is, the dll has locked or initialization is complete of all clock related configuration registers) before mem_en can be set, so a delay loop in the initialization code may be necessary if software is enabling the memory controller. after mem_en has been set, the ddr memory controller automatically performs the jedec-compliant initialization sequence to initialize memories according to the information in the sdmode and esdmode fields of the ddr_sdram_mode register. the initialization sequence is as follows: 1. precharge all 2. mode register set for extended mode register 3. mode register set for mode register 4. precharge all 5. two auto refresh commands 6. mode register set for mode register with reset dll bit deactivated note that the ba0 and ba1 bits are automatically driven appropriately during the mode register set commands. after this automatic initialization is complete the memory array is ready for access and the memory controller begins processing memory transactions as they arrive. ddr_sdram_cfg ddr sdram control configuration sren ecc_en rd_en sdram_type dyn_pwr 9.4.1.5/9-14 ddr_sdram_mode ddr sdram mode configuration esdmode sdmode 9.4.1.6/9-16 ddr_sdram_interval ddr sdram interval configuration refint bstopre 9.4.1.7/9-16 table 9-35. memory interface configuration regi ster initialization parameters (continued) name description parameter section/pag e
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-1 chapter 10 programmable interrupt controller this chapter describes the programmable interrupt controller (pic) interrupt protocol, various types of interrupt sources controlled by the pic unit, and the pic registers with some programming guidelines. 10.1 introduction a block diagram of portions of the MPC8540 showing the relationship of the various functional blocks and external signals to the pic unit is shown in figure 10-1 . the pic unit receives interrupt signals from the following sources:  external interrupts. triggered by signals external to the integrated device, namely irq[0:11]  internal interrupts. triggered by signal internal to the integrated device, typically representing major blocks by from the l2 cache, the ecm, the ddr controller, the local bus controller (lbc), the 4-channel dma controller, the pci/pci-x block, the rapidio interface, the dual three-speed ethernet controllers (tsecs), the 10/100 ethernet controller, the duart, the performance monitor, and the i 2 c controller.  interrupts generated from within the pic itself. names the messaging, global timer, and interprocessor interrupts defined by the openpic specification the pic can be configured such that interrupts can be directed as follows:  to the core through the external interrupt signal, int . for interrupts signalled through the int signal, the pic unit prioritizes and manages interrupts such that the highest priority interrupt is always recognized and taken, and that any lower priority interrupt that is deferred when a higher priority interrupt is taken, resumes execution as soon as all higher priority interrupts have been handled.  to the core through the critical interrupt signal, cint  to an external interrupt controller, through the irq_out signal
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-2 freescale semiconductor programmable interrupt controller table 10-1 shows which signalling mechanisms are available to each interrupt source. note that the pic can be disabled, in which case internal interrupts are passed through irq_out . all other interrupts are disabled. 10.1.1 overview the pic is compliant with the openpic architecture. the interrupt controller provides interrupt management, and is responsible for receiving hardware-generated interrupts from different sources (both internal and external), prioritizing them, and delivering them to the cpu for servicing. table 10-1. interrupt source signalling options source in t cin t irq_ou t internal ? external ? message ? interprocessor xx global timer xx
introduction MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-3 figure 10-1. MPC8540 interrupt sources block diagram 10.1.2 features  programming model compliant with the openpic architecture  support for 12 external and 23 internal interrupt sources. serial interrupts are not supported.  four interprocessor interrupt channels pic global timer (4) inter- processor (4) irq_out irq[0:8] dma_dreq3 /irq9 dma_dack3 /irq10 dma_ddone3 /irq11 external interrupts cint int wake up core/ interrupts ckstp_in ckstp_out hreset hreset_req sreset mcp ude service interrupt e500 core core_wrs_[0:1] core_hreset core_hreset_req core_ude core_mcp core_halt core_tbint core_ckstop_out core_fault timer facility watchdog timer pir[p0] pic-defined messaging (4) internal interrupts l2 cache e500 coherency model (ecm) ddr dram local bus controller (lbc) dma channels 0?3 pci/pci-x rapidio inbound port write/ error interrupt rapidio doorbell inbound interrupt rapidio outbound message interrupt rapidio inbound message interrupt tsec 1/2 transmit interrupts tsec 1/2 receive interrupts tsec 1/2 receive/transmit error interrupts fast ethernet controller (fec) duart i2c controller performance monitor interrupt global utilities core_reset
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-4 freescale semiconductor programmable interrupt controller  four 32-bit messaging interrupt channels  four global high resolution timers that can be clocked with the ccb (platform) clock or the rtc input.  fully-nested interrupt delivery  processor initialization control  programmable resetting of the pic unit through the global configuration register  16 programmable interrupt priority levels  support for connection of external interrupt controller device such as an 8259 programmable interrupt controller  in 8259 mode, it generates a local (internal) interrupt output signal, irq_out .  recovery from spurious interrupts 10.1.3 interrupts to the processor core the int signal, which causes the external interrupt exception, is the main interrupt output from the pic unit to the processor core. external, internal, and message interrupts can alternately be configured as critical interrupts (in the destination registers); these are reported to the core through the cint signal and do not use the pic logic described in section 10.4.1, ?flow of interrupt control.? the book e architecture implemented by the e500 core defines a separate critical interrupt type with its own save and restore registers (csrr0 and csrr1) and return instruction (return from critical interrupt, rfci ). in addition to the external and critical interrupts that are generated by the pic, other MPC8540 conditions (shown in table 10-2 ) cause interrupts to the core (and wake up the core when it is in a low-power state). table 10-2. processor interrupts generated outside the core?types and sources core interrupt type signaled by (input to core) sources pic-programmable interrupts external interrupt int generated by the pic, as described in section 10.1.5, ?interrupt sources.? critical interrupt cint generated by the pic, as described in section 10.1.5, ?interrupt sources.? other interrupts generated outside the core machine check core_mcp (MPC8540 causes)  mcp  sreset  assertion of core_mcp by global utilities block
introduction MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-5 the global utilities block monitors two additional interrupt conditions generated by the e500 core ( core_tbint and core_fault_out signals), as shown in figure 10-1 . assertion of either of these signals causes the processor to exit a low-power state. these cases are caused by core conditions, and after the global utilities logic wakes up the core, they are handled by the core as shown in table 10-3 . 10.1.4 modes of operation mixed or pass-through mode can be chosen by setting or clearing gcr[m] as described in section 10.3.1.2, ?global configuration register (gcr).? 10.1.4.1 mixed mode (gcr[m] = 1) in mixed mode, the external and internal interrupts are delivered using the normal priority and delivery mechanisms detailed in section 10.3.6.1, ?external interrupt vector/priority registers (eivpr0?eivpr11),? through section 10.3.6.4, ?internal interrupt destination registers (iidr0?iidr31).? unconditional debug event core_ude ude . asserting ude generates an unconditional debug exception type debug interrupt and sets a bit in the debug status register, dbsr[ude], as described in section 6.13.2, ?debug status register (dbsr).? reset core_hreset  hreset assertion (and negation)  core_hreset_req . output from core?caused by writing to the core dbcr0[rst]. this condition is additionally qualified with msr[de] and dbcr0[idm] bits. note that assertion of this signal causes a hard reset of the core only.  core_hreset_req can also be caused by a second timer timeout condition as described in section 6.6.1, ?timer control register (tcr).?  core_reset . output from pic. see section 10.3.1.4, ?processor initialization register (pir).? table 10-3. e500 core-generated interrupts that cause a wake-up core interrupt type signaled by (output from core) sources fixed interval timer core_tbint the source of both of these interrupts is the time base facility within the e500 core. the MPC8540 monitors this core output signal and considers it a processor interrupt for the purposes of power management (causes the core to exit a low-power state). for more information about the interaction between core-generated signals and power management, see chapter 18, ?global utilities.? decrementer machine check core_fault_out occurs when the l1 cache has a parity error on a snoop push operation, which can occur while the core is halted. the MPC8540 monitors this signal and considers it a processor interrupt for the purposes of power management (causes the core to exit a low-power state). table 10-2. processor interrupts generated outside the core?types and sources (continued) core interrupt type signaled by (input to core) sources
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-6 freescale semiconductor programmable interrupt controller 10.1.4.2 pass-through mode (gcr[m] = 0) the pic unit provides a mechanism to support alternate external interrupt controllers such as the pc/at compatible 8259 interrupt controller architecture. after a hard reset, the pic unit defaults to pass-through mode, in which active-high interrupts from external source irq0 are passed directly to the e500 core, as shown in table 10-2 , all other external interrupt signals are ignored. thus, the interrupt signal from an external interrupt controller can be connected to irq0 and cause direct interrupts to the processor. the pic does not perform a vector fetch from an 8259 interrupt controller. figure 10-2. pass-through mode example when pass-through mode is enabled, the internally-generated interrupts shown in table 10-4 are not forwarded to the e500 core. instead, the pic passes the raw interrupts from the internal sources to irq_out . note that in pass-through mode, interrupts generated by the pic itself (global timers, interprocessor, and message register interrupts) cannot be used. if internal or pic-generated interrupts must be reported internally to the processor, pass-through mode must be disabled. 10.1.5 interrupt sources aside from the sources of machine check, unconditional debug event, and reset interrupts to the core described in table 10-2 , the pic unit can receive 47 separate interrupts from five different sources as follows:  12 external?off-chip signals, irq[0:11]  23 internal?on-chip. sources are l2, ecm, ddr, local bus controller, dma, pci/pci-x, rapidio, tsec, fec, duart, performance monitor, and i 2 c  4 global timers?from inside the pic irq_out MPC8540 internal interrupts (see table 10-4 ) (not including pic-generated interrupts) pic e500 core irq0 external pc/at-compatible 8259 interrupt controller MPC8540 gcr[m] = 0 irq[1:11] (disabled) int
introduction MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-7  4 inter-processor (ipi)?intended for communication between different processor cores on the same device. used only for self-interrupt in a single-core device such as the MPC8540  4 message registers?from inside the pic. triggered on register write, cleared on read. used for inter-process communication 10.1.5.1 interrupt routing?mixed mode when the pic receives an internal or external interrupt, its destination register is checked to determine if it should be routed off-chip to the external irq_out signal (if the incoming interrupt has its xidr[ep] bit set). alternatively, if the incoming interrupt has been configured in xidr[ci] as a critical interrupt, the pic completes its processing of the interrupt by asserting the cint input to the core, causing it to be serviced as a critical interrupt. as a third alternative (if neither xidr[ci] or xidr[ep] are set), the interrupt can be serviced as a normal external interrupt by the processor core (through the int signal). in this case, the interrupt is latched by the interrupt pending register (ipr) and the interrupt flow described in section 10.4.1, ?flow of interrupt control,? is followed. 10.1.5.2 internal interrupt sources table 10-4 shows the assignments of the 23 internal interrupt sources for the MPC8540. note that this list does not include the interrupts generated by the pic unit. table 10-4. internal interrupt assignments internal interrupt number interrupt source internal interrupt number interrupt source 0 l2 cache 14 tsec 1 receive interrupt 1 ecm 15?17 reserved 2 ddr dram 18 tsec 1 receive/transmit error interrupt 3 lbc 19 tsec 2 transmit interrupt 4 dma channel 0 20 tsec 2 receive interrupt 5 dma channel 1 21?23 reserved 6 dma channel 2 24 tsec 2 receive/transmit error interrupt 7 dma channel 3 25 fast ethernet controller (fec) 8 pci/pci-x 26 duart 9 rapidio inbound port write/ error interrupt 27 i 2 c controller 10 rapidio doorbell inbound interrupt 28 performance monitor interrupt 11 rapidio outbound message interrupt 29 unused 12 rapidio inbound message interrupt 30 unused 13 tsec 1 transmit interrupt 31 unused
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-8 freescale semiconductor programmable interrupt controller 10.2 external signal descriptions the following sections provide an overview and detailed descriptions of the pic signals. 10.2.1 signal overview pic interface signals are described in table 10-5 . there are 12 distinct external interrupt request input signals (irq[0:11]) and 1 interrupt request output signal (irq_out ). as table 10-5 shows, three irq inputs are multiplexed with dma signals for dma channel 3. 10.2.2 detailed signal descriptions table 10-6 provides detailed descriptions of the external pic signals. table 10-5. pic interface signals signal name i/o description irq[0:8] i external interrupts irq9/dma_dreq3 1 1 irq9?irq11 are multiplexed with dma3 signals. these functions are mutually exclusive; the active function is specified in pmuxcr of the global utilities block as described in section 18.4.1.10, ?alternate function signal multiplex control register (pmuxcr).? i external interrupt/dma channel 3 request irq10/dma_dack3 1 i or o external interrupt (input)/dma channel 3 acknowledge (output) irq11/dma_ddone3 1 i or o external interrupt (input)/dma channel 3 done (output) irq_out o interrupt request out mcp i processor machine check ude i unconditional debug event table 10-6. interrupt signals?detailed signal descriptions signal i/ o description irq[0:11] i interrupt request 0?11. the polarity and sense of each of these signals is programmable. all of these inputs can be driven completely asynchronously. state meaning asserted?when an external interrupt signal is asserted (according to the programmed polarity), the priority is checked by the pic unit, and the interrupt is conditionally passed to the processor. in pass-through mode, only interrupts detected on irq0 are passed directly to the processor core. negated?there is no incoming interrupt from that source. timing assertion?all of these inputs can be asserted completely asynchronously. negation?interrupts programmed as level-sensitive must remain asserted until serviced.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-9 10.3 memory map/register definition the pic programmable register map occupies 256 kbytes of memory-mapped space. reading undefined portions of the memory map returns all zeros; writing has no effect. all pic registers are 32 bits wide and, although located on 128-bit address boundaries, should only be accessed as 32-bit quantities. irq_out o interrupt request out. active-low, open drain. when the pic is programmed in pass-through mode, this output reflects the raw interrupts generated by on-chip sources. see section 10.1.4, ?modes of operation,? for more details. state meaning asserted?at least one interrupt is currently being signalled to the external system. negated?indicates no interrupt source currently routed to irq_out . timing because external interrupts are asynchronous with respect to the system clock, both assertion and negation of irq_out occurs asynchronously with respect to the interrupt source. all timing given here is approximate. assertion?internal interrupt source: 2 ccb clock cycles after interrupt occurs. external interrupt source: 4 cycles after interrupt occurs. message interrupts: 2 cycles after write to message register. negation?follows interrupt source negation with the following delay: internal interrupt: 2 ccb clock cycles external interrupt: 4 cycles. message interrupts: 2 cycles after message register cleared. mcp i machine check processor. assertion causes a machine check interrupt to the e500 core. note that if the e500 core is not configured to process machine check interrupts (msr[me] = 0), assertion of mcp causes a checkstop condition. note that internal sources for the internal core_mcp signal can also cause a machine check interrupt to the processor core, as described in section 18.4.1.13, ?machine check summary register (mcpsumr) ,? tab l e 1 0- 2 and table 10-3 . state meaning asserted?the MPC8540 should initiate a machine check interrupt or enter the checkstop state as directed by the msr. negated?machine check handling is not being requested by the external system. timing assertion?may occur at any time, asynchronous to any clock. negation?because mcp is edge-triggered, it can be negated one clock after its assertion. ude i unconditional debug event. assertion signal causes an unconditional debug exception to the e500 core. state meaning asserted?indicates that the MPC8540 should initiate an unconditional debug event interrupt to the processor core. negated?indicates that unconditional debug event handling is not being requested by ude . timing assertion?may occur at any time, asynchronous to any clock. negation?should remain asserted until software in the unconditional debug event interrupt handler causes the external device asserting the ude signal to negate it. table 10-6. interrupt signals?detailed signal descriptions (continued) signal i/ o description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-10 freescale semiconductor programmable interrupt controller the pic address offset map, shown in table 10-7 , is divided into three areas: 0x nn 4_0000?0x nn 4_fff0?global registers 0x nn 5_0000?0x nn 5_fff0?interrupt source configuration registers 0x nn 6_0000?0x nn 7_fff0?per-cpu registers table 10-7. pic register address map offset register access reset section/page pic register address map?global registers 0x4_0000? 0x4_0030 reserved ? ? ? 0x4_0040 ipidr0?interprocessor interrupt 0 (ipi 0) dispatch register 1 w 0x0000_0000 10.3.7.1/10-39 0x4_0050 ipidr1?ipi 1 dispatch register 0x4_0060 ipidr2?ipi 2 dispatch register 0x4_0070 ipidr3?ipi 3 dispatch register 0x4_0080 ctpr?current task priority register r/w 0x0000_000f 10.3.7.2/10-40 0x4_0090 whoami?who am i register r 0x0000_0000 10.3.7.3/10-41 0x4_00a0 iack?interrupt acknowledge register r 0x0000_0000 10.3.7.4/10-41 0x4_00b0 eoi?end of interrupt register w 0x0000_0000 10.3.7.5/10-42 0x4_00c0? 0x4_0ff0 reserved ? ? ? 0x4_1000 frr?feature reporting register r 0x0037_0002 10.3.1.1/10-16 0x4_1010 reserved ? ? ? 0x4_1020 gcr?global configuration register r/w 0x0000_0000 10.3.1.2/10-17 0x4_1030 reserved ? ? ? 0x4_1040? 0x4_1070 vendor reserved ? ? ? 0x4_1080 vir?vendor identification register r 0x0000_0000 10.3.1.3/10-17 0x4_1090 pir?processor initialization register r/w 0x0000_0000 10.3.1.4/10-18 0x4_10a0 ipivpr0?ipi 0 vector/priority register r/w 0x8000_0000 10.3.1.5/10-19 0x4_10b0 ipivpr1?ipi 1 vector/priority register 0x4_10c0 ipivpr2?ipi 2 vector/priority register 0x4_10d0 ipivpr3?ipi 3 vector/priority register 0x4_10e0 svr?spurious vector register r/w 0x0000_ffff 10.3.1.6/10-19 0x4_10f0 tfrr?timer frequency reporting register r/w 0x0000_0000 10.3.2.1/10-20 0x4_1100 gtccr0?global timer 0 current count register r 0x0000_0000 10.3.2.2/10-21 0x4_1110 gtbcr0?global timer 0 base count register r/w 0x8000_0000 10.3.2.3/10-21
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-11 0x4_1120 gtvpr0?global timer 0 vector/priority register r/w 0x8000_0000 10.3.2.4/10-22 0x4_1130 gtdr0?global timer 0 destination register r/w 0x0000_0001 10.3.2.5/10-23 0x4_1140 gtccr1?global timer 1 current count register r 0x0000_0000 10.3.2.2/10-21 0x4_1150 gtbcr1?global timer 1 base count register r/w 0x8000_0000 10.3.2.3/10-21 0x4_1160 gtvpr1?global timer 1 vector/priority register r/w 0x8000_0000 10.3.2.4/10-22 0x4_1170 gtdr1?global timer 1 destination register r/w 0x0000_0001 10.3.2.5/10-23 0x4_1180 gtccr2?global timer 2 current count register r 0x0000_0000 10.3.2.2/10-21 0x4_1190 gtbcr2?global timer 2 base count register r/w 0x8000_0000 10.3.2.3/10-21 0x4_11a0 gtvpr2?global timer 2 vector/priority register r/w 0x8000_0000 10.3.2.4/10-22 0x4_11b0 gtdr2?global timer 2 destination register r/w 0x0000_0001 10.3.2.5/10-23 0x4_11c0 gtccr3?global timer 3 current count register r 0x0000_0000 10.3.2.2/10-21 0x4_11d0 gtbcr3?global timer 3 base count register r/w 0x8000_0000 10.3.2.3/10-21 0x4_11e0 gtvpr3?global timer 3 vector/priority register r/w 0x8000_0000 10.3.2.4/10-22 0x4_11f0 gtdr3?global timer 3 destination register r/w 0x0000_0001 10.3.2.5/10-23 0x4_1200? 0x4_12f0 reserved ? ? ? 0x4_1300 tcr?timer control register r/w 0x0000_0000 10.3.2.6/10-24 0x4_1310 irqsr0?irq_out summary register 0 r 0x0000_0000 10.3.3.1/10-26 0x4_1320 irqsr1?irq_out summary register 1 r 0x0000_0000 10.3.3.2/10-27 0x4_1330 cisr0?critical interrupt summary register 0 r 0x0000_0000 10.3.3.3/10-27 0x4_1340 cisr1?critical interrupt summary register 1 r 0x0000_0000 10.3.3.4/10-28 0x4_1350 pm0mr0?performance monitor 0 mask register 0 r/w 0x00ff_ffff 10.3.4.1/10-29 0x4_1360 pm0mr1?performance monitor 0 mask register 1 r/w 0xffff_ffff 10.3.4.2/10-30 0x4_1370 pm1mr0?performance monitor 1 mask register 0 r/w 0x00ff_ffff 10.3.4.1/10-29 0x4_1380 pm1mr1?performance monitor 1 mask register 1 r/w 0xffff_ffff 10.3.4.2/10-30 0x4_1390 pm2mr0?performance monitor 2 mask register 0 r/w 0x00ff_ffff 10.3.4.1/10-29 0x4_13a0 pm2mr1?performance monitor 2 mask register 1 r/w 0xffff_ffff 10.3.4.2/10-30 0x4_13b0 pm3mr0?performance monitor 3 mask register 0 r/w 0x00ff_ffff 10.3.4.1/10-29 0x4_13c0 pm3mr1?performance monitor 3 mask register 1 r/w 0xffff_ffff 10.3.4.2/10-30 0x4_13d0? 0x4_13f0 reserved ? ? ? table 10-7. pic register address map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-12 freescale semiconductor programmable interrupt controller 0x4_1400 msgr0?message register 0 r/w 0x0000_0000 10.3.5.1/10-30 0x4_1410 msgr1?message register 1 0x4_1420 msgr2?message register 2 0x4_1430 msgr3?message register 3 0x4_1440? 0x4_14f0 reserved ? ? ? 0x4_1500 mer?message enable register r/w 0x0000_0000 10.3.5.2/10-31 0x4_1510 msr?message status register r/w 0x0000_0000 10.3.5.3/10-31 0x4_1520? 0x4_fff0 reserved ? ? ? pic register address map?interrupt source configuration registers 0x5_0000 eivpr0?external interrupt 0 (irq0) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_0010 eidr0?external interrupt 0 (irq0) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_0020 eivpr1?external interrupt 1 (irq1) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_0030 eidr1?external interrupt 1 (irq1) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_0040 eivpr2?external interrupt 2 (irq2) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_0050 eidr2?external interrupt 2 (irq2) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_0060 eivpr3?external interrupt 3 (irq3) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_0070 eidr3?external interrupt 3 (irq3) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_0080 eivpr4?external interrupt 4 (irq4) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_0090 eidr4?external interrupt 4 (irq4) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_00a0 eivpr5?external interrupt 5 (irq5) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_00b0 eidr5?external interrupt 5 (irq5) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_00c0 eivpr6?external interrupt 6 (irq6) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_00d0 eidr6?external interrupt 6 (irq6) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_00e0 eivpr7?external interrupt 7 (irq7) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_00f0 eidr7?external interrupt 7 (irq7) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_0100 eivpr8?external interrupt 8 (irq8) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_0110 eidr8?external interrupt 8 (irq8) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_0120 eivpr9?external interrupt 9 (irq9) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_0130 eidr9?external interrupt 9 (irq9) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_0140 eivpr10?external interrupt 10 (irq10) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 table 10-7. pic register address map (continued) offset register access reset section/page
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-13 0x5_0150 eidr10?external interrupt 10 (irq10) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_0160 eivpr11?external interrupt 11 (irq11) vector/priority register r/w 0x8000_0000 10.3.6.1/10-32 0x5_0170 eidr11?external interrupt 11 (irq11) destination register r/w 0x0000_0001 10.3.6.2/10-33 0x5_0180? 0x5_01f0 reserved ? ? ? 0x5_0200 iivpr0?internal interrupt 0 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0210 iidr0?internal interrupt 0 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0220 iivpr1?internal interrupt 1 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0230 iidr1?internal interrupt 1 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0240 iivpr2?internal interrupt 2 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0250 iidr2?internal interrupt 2 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0260 iivpr3?internal interrupt 3 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0270 iidr3?internal interrupt 3 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0280 iivpr4?internal interrupt 4 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0290 iidr4?internal interrupt 4 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_02a0 iivpr5?internal interrupt 5 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_02b0 iidr5?internal interrupt 5 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_02c0 iivpr6?internal interrupt 6 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_02d0 iidr6?internal interrupt 6 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_02e0 iivpr7?internal interrupt 7 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_02f0 iidr7?internal interrupt 7 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0300 iivpr8?internal interrupt 8 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0310 iidr8?internal interrupt 8 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0320 iivpr9?internal interrupt 9 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0330 iidr9?internal interrupt 9 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0340 iivpr10?internal interrupt 10 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0350 iidr10?internal interrupt 10 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0360 iivpr11?internal interrupt 11 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0370 iidr11?internal interrupt 11 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0380 iivpr12?internal interrupt 12 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0390 iidr12?internal interrupt 12 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_03a0 iivpr13?internal interrupt 13 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 table 10-7. pic register address map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-14 freescale semiconductor programmable interrupt controller 0x5_03b0 iidr13?internal interrupt 13 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_03c0 iivpr14?internal interrupt 14 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_03d0 iidr14?internal interrupt 14 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_03e0 iivpr15?internal interrupt 15 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_03f0 iidr15?internal interrupt 15 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0400 iivpr16?internal interrupt 16 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0410 iidr16?internal interrupt 16 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0420 iivpr17?internal interrupt 17 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0430 iidr17?internal interrupt 17 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0440 iivpr18?internal interrupt 18 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0450 iidr18?internal interrupt 18 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0460 iivpr19?internal interrupt 19 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0470 iidr19?internal interrupt 19 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0480 iivpr20?internal interrupt 20 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0490 iidr20?internal interrupt 20 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_04a0 iivpr21?internal interrupt 21 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_04b0 iidr21?internal interrupt 21 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_04c0 iivpr22?internal interrupt 22 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_04d0 iidr22?internal interrupt 22 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_04e0 iivpr23?internal interrupt 23 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_04f0 iidr23?internal interrupt 23 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0500 iivpr24?internal interrupt 24 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0510 iidr24?internal interrupt 24 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0520 iivpr25?internal interrupt 25 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0530 iidr25?internal interrupt 25 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0540 iivpr26?internal interrupt 26 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0550 iidr126?internal interrupt 26 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0560 iivpr27?internal interrupt 27 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0570 iidr27?internal interrupt 27 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0580 iivpr28?internal interrupt 28 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_0590 iidr28?internal interrupt 28 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_05a0 iivpr29?internal interrupt 29 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 table 10-7. pic register address map (continued) offset register access reset section/page
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-15 0x5_05b0 iidr29?internal interrupt 29 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_05c0 iivpr30?internal interrupt 30 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_05d0 iidr30?internal interrupt 30 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_05e0 iivpr31?internal interrupt 31 vector/priority register r/w 0x8080_0000 10.3.6.3/10-34 0x5_05f0 iidr31?internal interrupt 31 destination register r/w 0x0000_0001 10.3.6.4/10-35 0x5_0600? 0x5_15f0 reserved ? ? ? 0x5_1600 mivpr0?messaging interrupt 0 (msg 0) vector/priority register r/w 0x8000_0000 10.3.6.5/10-36 0x5_1610 midr0?messaging interrupt 0 (msg 0) destination register r/w 0x0000_0001 10.3.6.6/10-37 0x5_1620 mivpr1?messaging interrupt 1 (msg 1) vector/priority register r/w 0x8000_0000 10.3.6.5/10-36 0x5_1630 midr1?messaging interrupt 1 (msg 1) destination register r/w 0x0000_0001 10.3.6.6/10-37 0x5_1640 mivpr2?messaging interrupt 2 (msg 2) vector/priority register r/w 0x8000_0000 10.3.6.5/10-36 0x5_1650 midr2?messaging interrupt 2 (msg 2) destination register r/w 0x0000_0001 10.3.6.6/10-37 0x5_1660 mivpr3?messaging interrupt 3 (msg 3) vector/priority register r/w 0x8000_0000 10.3.6.5/10-36 0x5_1670 midr3?messaging interrupt 3 (msg 3) destination register r/w 0x0000_0001 10.3.6.6/10-37 0x5_1680? 0x5_fff0 reserved ? ? ? pic register address map?per-cpu registers 0x6_0000? 0x6_0030 reserved ? ? ? 0x6_0040 ipidr0?p0 ipi 0 dispatch register w all zeros 10.3.7.1/10-39 0x6_0050 ipidr1?p0 ipi 1 dispatch register 0x6_0060 ipidr2?p0 ipi 2 dispatch register 0x6_0070 ipidr3?p0 ipi 3 dispatch register 0x6_0080 ctpr0?p0 current task priority register r/w 0x0000_000f 10.3.7.2/10-40 0x6_0090 whoami0?p0 who am i register r all zeros 10.3.7.3/10-41 0x6_00a0 iack0?p0 interrupt acknowledge register r all zeros 10.3.7.4/10-41 0x6_00b0 eoi0?p0 end of interrupt register w all zeros 10.3.7.5/10-42 1 note that these registers provider private access space to the same set of registers at offset 0x6_xxxx. this private access is described in section 10.3.7, ?per-cpu registers .? table 10-7. pic register address map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-16 freescale semiconductor programmable interrupt controller 10.3.1 global registers most registers have one address. some registers are replicated for each processor in a multiprocessor device. in this case, each processor accesses its separate registers using the same address, the address decoding being sensitive to the processor id. a copy of the per-cpu registers is available to each processor core at the same physical address, that is, the private access address space. the private access address space acts like an alias to a processor?s own copy of the per-cpu registers. as shown in figure 10-31 , the id of the processor initiating the read/write transaction is used to determine which processor?s per-cpu registers to access. for more information on per-cpu registers, see section 10.3.7, ?per-cpu registers.? note register fields designated as write-one-to-clear are cleared only by writing ones to them. writing zeros to them has no effect. 10.3.1.1 feature reporting register (frr) the feature reporting register (frr) shown in figure 10-3 provides information about interrupt and processor configurations. it also informs the programming environment of the controller version. figure 10-3. feature reporting register (frr) table 10-8 describes the frr fields. 0 4 5 1516 1819 2324 31 r00000 nirq 000 ncpu vid w reset 0000_0000_0011_0111_0000_0000_0000_0010 offset 0x4_1000 table 10-8. frr field descriptions bits name description 0?4 ? reserved. 5?15 nirq number of interrupts. contains the binary value of the maximum number of interrupt sources supported minus one. the value is 55 (0x37) because this device supports 56 interrupts: 12 external sources, 32 internal sources (only 23 used), four timer sources, four ipi sources and four messaging sources. a zero in this field corresponds to one source. 16?18 ? reserved. 19?23 ncpu number of cpus. the number of the highest physical cpu supported. the MPC8540 implements one cpu (the processor core), referenced as p0. 24?31 vid version id. version id for this interrupt controller. reports the openpic specification revision level supported by this implementation. a value of two corresponds to revision 1.2 which is the revision level currently supported.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-17 10.3.1.2 global configuration register (gcr) the global configuration register (gcr) shown in figure 10-4 controls the pic?s operating mode, and allows software to reset the pic. figure 10-4. global configuration register (gcr) table 10-9 describes the gcr fields. 10.3.1.3 vendor identification register (vir) the vendor identification register (vir) shown in figure 10-5 has specific read-only information about the vendor and the device revision. figure 10-5. vendor identification register (vir) 0123 31 r rst 0 m 00000000000000000000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x4_1020 table 10-9. gcr field descriptions bits name description 0 rst reset. setting this field forces the pic to be reset. cleared automatically when the reset sequence is complete. see section 10.4.7, ?reset of the pic,? for more information on resetting the pic. 1 ? reserved 2m mode. pic operating mode. 0 pass-through mode. on-chip pic is disabled and interrupts detected on irq0 are passed directly to the processor core. see section 10.1.4, ?modes of operation,? for more details. 1 mixed mode. interrupts are handled by the normal priority and delivery mechanisms of the pic. see section 10.1.4, ?modes of operation,? for more details. 3?31 ? reserved 0 78 1516232431 r00000000 step device id vendor id w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x4_1080
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-18 freescale semiconductor programmable interrupt controller table 10-10 describes the vir fields. 10.3.1.4 processor initialization register (pir) the processor initialization register in the pic provides a mechanism for software to reset the processor. the core_reset signal to the processor is held active until a zero is written to the processor initialization register field. thus, pir should only be written by an external host and the external host should wait at least 100 sec to clear this field after writing it. the processor should not attempt to write to pir because writing to it resets the core, and the core will not be able to clear the reset field, and so it would remain in reset indefinitely. note that although the architecture was designed to support multiple processing cores, only fields corresponding to processors on the device are implemented, as shown in figure 10-6 . in a uniprocessor system, only pir[p0] is implemented. figure 10-6. processor initialization register (pir) table 10-11 describes the pir fields. table 10-10. vir field descriptions bits name description 0?7 ? reserved 8?15 step stepping. indicates the silicon revision for this device. has no meaning when the vendor id value is zero. 16?23 device id device identification. vendor-specified identifier for this device. has no meaning when the vendor id value is zero. 24?31 vendor id vendor identification. specifies the manufacturer of this part. a value of zero implies a generic pic-compliant device. 0 30 31 r0000000000000000000000000000000 p0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x4_1090 table 10-11. pir field descriptions bits name description 0?30 ? reserved 31 p0 processor 0 core reset. setting this bit causes the pic unit to assert the core_reset signal to processor 0 (the e500 core).
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-19 10.3.1.5 ipi vector/priority registers (ipivpr n ) the interprocessor interrupt (ipi) vector/priority registers contain the interrupt vector and priority fields for the four interprocessor interrupt channels as shown in figure 10-7 . there is one ipi vector/priority register per channel. the vector and priority values should not be changed while ipivpr n [a] is set. figure 10-7. ipi vector/priority registers (ipivpr n ) table 10-12 describes the ipivpr n fields. 10.3.1.6 spurious vector register (svr) the spurious vector register (svr) shown in figure 10-8 contains the 16-bit vector returned to the processor when the iack register is read for a spurious interrupt. see section 10.4.4, ?spurious vector generation,? for more information about the events and conditions that may cause a spurious vector fetch. 012 1112 1516 31 r msk a0000000000 priority vector w reset 1000_0000_0000_0000_0000_0000_0000_0000 offset 0x4_10a0, 0x4_10b0, 0x4_10c0, 0x4_10d0 table 10-12. ipivpr n field descriptions bits name description 0 msk mask. mask interrupts from this source. always set following reset. 0 an interrupt request is generated if the corresponding ipr bit is set. 1 further interrupts from this source are disabled. 1 a activity. indicates an interrupt has been reported or is in-service. note that this field is read only. the vector and priority values should not be changed while ipivpr n [a] is set. 0 no current interrupt activity associated with this source. 1 the interrupt bit for this source in the ipr or isr is set. 2?11 ? reserved 12?15 priority priority. specifies the interrupt priority. the lowest priority is 0 and the highest priority is 15. a priority level of 0 disables interrupt reporting from this source. 16?31 vector vector. the vector value in this field is returned when the interrupt acknowledge (iack) register is read and this interrupt resides in the interrupt request register (irr) shown in figure 10-37 .
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-20 freescale semiconductor programmable interrupt controller figure 10-8. spurious vector register (svr) table 10-13 describes the svr fields. 10.3.2 global timer registers this section describes the global timer registers. note that each of the four timers have four individual configuration registers (gtccr n , gtbcr n , gtvpr n , gtdr n ), but they are only shown once in this section. 10.3.2.1 timer frequency reporting register (tfrr) the timer frequency reporting register (tfrr), shown in figure 10-9 , is written by software to report the clocking frequency of the pic timers. note that although tfrr is read/write, the value of this register is ignored by the pic unit. figure 10-9. timer frequency reporting register (tfrr) 0151631 r0000000000000000 vector w reset 0000_0000_0000_0000_ 1111_1111_1111_1111 offset 0x4_10e0 table 10-13. svr field descriptions bits name description 0?15 ? reserved 16?3 1 vecto r spurious interrupt vector. value returned when iack is read during a spurious vector fetch. 0 31 r freq w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x4_10f0
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-21 table 10-14 describes the tfrr register. 10.3.2.2 global timer current count registers (gtccr n ) the global timer current count registers (gtccrs), shown in figure 10-10 , contain the current count for each of the four pic timers. figure 10-10. global timer current count registers (gtccr n ) table 10-15 describes the gtccr n fields. 10.3.2.3 global timer base count registers (gtbcr n ) the global timer base count registers (gtbcr n ) contain the base counts for each of the four pic timers as shown in figure 10-11 . this value is reloaded into the corresponding gtccr n when the current count reaches zero. note that when zero is written to the base count field, (and gtccr n [ci] = 0), the timer generates an interrupt on every timer cycle. table 10-14. tfrr field descriptions bits name description 0?31 freq timer frequency (in ticks/second (hz)). used to communicate the frequency of the global timers? clock source (the core complex bus (ccb) clock) to user software. see section 4.4.4, ?clocking,? for more details. tfrr is set only by software for later use by other applications and its value in no way affects the operating frequency of the global timers. the timers operate at a ratio of this clock frequency set by tcr[clkr]. see section 10.3.2.6, ?timer control register (tcr).? 01 31 r tog count w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x4_1100, 0x4_1140, 0x4_1180, 0x4_11c0 table 10-15. gtccr n field descriptions bits name description 0 tog toggle. toggles when the current count decrements to zero. cleared when gtbcr n [ci] goes from 1 to 0. 1?31 coun t current count. decremented while gtbcr n [ci] is zero. when the timer count reaches zero, an interrupt is generated (provided it is not masked), the toggle bit is inverted, and the count is reloaded. for non-cascaded timers, the reload value is the contents of the corresponding base count register. cascaded timers are reloaded with either all ones, or the contents of the base count register, depending on the value of tcr[rovr]. see section 10.3.2.6, ?timer control register (tcr),? for more details.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-22 freescale semiconductor programmable interrupt controller figure 10-11. global timer base count registers (gtbcr n ) table 10-16 describes the gtbcr n fields. 10.3.2.4 global timer vector/priority registers (gtvpr n ) the global timer vector/priority registers (gtvpr n ) contain the interrupt vector and the interrupt priority as shown in figure 10-12 . they also contain the mask and activity fields. figure 10-12. global timer vector/priority registers (gtvpr n ) 01 31 r ci base cnt w reset 1000_0000_0000_0000_0000_0000_0000_0000 offset 0x4_1110, 0x4_1150, 0x4_1190, 0x4_11d0 table 10-16. gtbcr n field descriptions bits name description 0 ci count inhibit. always set following reset 0 counting enabled 1 counting inhibited 1?31 base cnt base count. when ci transitions from 1 to 0, this value is copied into the corresponding current count register and the toggle bit is cleared. if ci is already cleared (counting is in progress), the base count is copied to the current count register at the next zero crossing of the current count. 0 1 2 1112 1516 31 r msk a0000000000 priority vector w reset 1000_0000_0000_0000_0000_0000_0000_0000 offset 0x4_1120, 0x4_1160, 0x4_11a0, 0x4_11e0
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-23 table 10-17 describes the gtvpr n fields. 10.3.2.5 global timer destination registers (gtdr n ) the global timer destination register controls the destination processor for this timer?s interrupt, as shown in figure 10-13 . figure 10-13. global timer destination registers (gtdr n ) table 10-18 describes the gtdr n fields. table 10-17. gtvpr n field descriptions bits name description 0 msk mask. inhibits interrupts from this source. 0 interrupt requests are generated when the corresponding ipr bit is set. 1 further interrupts from this source are disabled. 1 a activity. this field is read-only. 0 no current interrupt activity associated with this source. 1 an interrupt has been requested by the corresponding source or is currently being serviced. the interrupt bit for this source is set in the ipr or isr. the vector and priority values should not be changed while the a bit is set. 2?11 ? reserved 12?15 priorit y priority. specifies the interrupt priority. the lowest priority is 0 and the highest priority is 15. a priority level of 0 disables interrupts from this source. 16?31 vector vector. the vector value in this field is returned when the interrupt acknowledge (iack) register is read and this interrupt resides in the interrupt request register shown in figure 10-37 . 0 30 31 r0000000000000000000000000000000p0 w reset 0000_0000_0000_0000_0000_0000_0000_0001 offset 0x4_1130, 0x4_1170, 0x4_11b0, 0x4_11f0 table 10-18. gtdr n field descriptions bits name description 0?30 ? reserved 31 p0 processor 0. indicates that processor 0 handles any interrupt. this bit is meaningful only in a multi-core device. because the MPC8540 is a single-core device, internally serviced interrupts are always directed to processor 0. permanently set and read only. 1 interrupt directed to processor 0.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-24 freescale semiconductor programmable interrupt controller 10.3.2.6 timer control register (tcr) the timer control register (tcr) shown in figure 10-15 provides various configuration options such as count frequency and roll-over behavior. there are two choices for the clock source for the timers: a selectable frequency ratio from the ccb clock, or the rtc signal. the tcr also provides the ability to create timers larger than the default 31-bit global timers. timer cascade fields allow configuration of up to two 63-bit timers, one 95-bit timer or one 127-bit timer. with one exception mentioned below, the value reloaded into a timer is determined by its roll-over control field tcr[rovr]. setting a timer?s roll-over field causes its current count register to roll over to all ones when the count reaches zero. this is equivalent to reloading the count register with 0xffff_ffff instead of its base count value. clearing a timer?s associated rovr bit ensures the timer always reloads with its base count value. when timers are cascaded the last (most significant) counter in the cascade also affects their roll-over behavior. cascaded timers always reload their base count when the most significant counter has decremented to zero, regardless of the settings in tcr[rovr]. for example, timers 0, 1, and 2 can be cascaded to generate one interrupt every hour. as shown in table 10-19 , given a ccb clock of 333 mhz, letting the timer clock frequency default to 1/8 the system clock, (tcr[clkr] = 0 sets a clock ratio of 8), provides a basic input of 41.625 mhz to timer 0. setting timer 0 to count 41,625,000 (0x27b_25a8) timer clock cycles will generate one output per second. setting both timers 1 and 2 to 59, and cascading all three timers, generates one interrupt every hour from timer 2. figure 10-14. example calculation for cascaded timers figure 10-15. timer control register (tcr) table 10-19. parameters for hourly interrupt timer cascade example system clock clock ratio timer clock timer 0 count timer 1 count timer 2 count 333 mhz 1 / 8 41.625 mhz 41.625 x 10 6 (0x027b_25a8) 59 1 (0x0000_0036) 1 counting down from 59 through 0 requires 60 ticks. 59 (0x0000_0036) 0 45 78 141516 21222324 2829 31 r00000 rovr 0000000 rtm 000000 clkr 00000 casc w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x4_1300 (41.625 x 106 ticks/sec) * (60 sec/min) * (60 min/hr) = total ticks/hr generating 1 interrupt/hr
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-25 table 10-20 describes the tcr fields. table 10-20. tcr field descriptions bits name description 0?4 ? reserved 5?7 rovr roll-over control for cascaded timers only. specifies behavior when count reaches zero by identifying the source of the reload value. cascaded timers are always reloaded with their base count value when the more significant timer in the cascade (the upstream timer) is zero. bits 5?7 correspond to timers 2?0. note that global timer 3 always reloads with its base count register. 0 timer does not roll over. when the count reaches zero, current count register is reloaded with the base count register value. 1 timer rolls over at zero to all ones. (when the count reaches zero, current count register is reloaded with 0xffff_ffff.) 000 all timers reload with base count. 001 timers 1 and 2 reload with base count, timer 0 rolls over (reloads with 0xffff_ffff). 010 timers 0 and 2 reload with base count, timer 1 rolls over (reloads with 0xffff_ffff). 011 timer 2 reloads with base count, timers 0 and 1 roll over (reload with 0xffff_ffff). 100 timers 0 and 1 reload with base count, timer 2 rolls over (reloads with 0xffff_ffff). 101 timer 1 reloads with base count, timers 0 and 2 roll over (reload with 0xffff_ffff). 110 timer 0 reloads with base count, timers 1 and 2 roll over (reload with 0xffff_ffff). 111 timers 0, 1, and 2 roll over (reload with 0xffff_ffff). 8?14 ? reserved 15 rtm real time mode. specifies the clock source for the pic timers. 0 timer clock frequency is a ratio of the frequency of the platform (ccb) clock as determined by the clkr field. this is the default value. 1 the rtc signal is used to clock the pic timers. if this bit is set, the clkr field has no meaning. 16?21 ? reserved 22?23 clkr clock ratio. specifies the ratio of the timer frequency to the platform (ccb) clock. the following clock ratios are supported: 00 default. divide by 8 01 divide by 16 10 divide by 32 11 divide by 64 24?28 ? reserved 29?31 casc cascade timers. specifies the output of particular global timers as input to others. 000 default. timers not cascaded 001 cascade timers 0 and 1 010 cascade timers 1 and 2 011 cascade timers 0, 1, and 2 100 cascade timers 2 and 3 101 cascade timers 0 and 1; timers 2 and 3 110 cascade timers 1, 2, and 3 111 cascade timers 0, 1, 2, and 3
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-26 freescale semiconductor programmable interrupt controller 10.3.3 irq_out and critical interrupt summary registers the summary registers indicate the interrupt sources directed to irq_out or cint . summary register bits are cleared when the corresponding interrupt that caused a bit to be sett is negated. note that only level-sensitive interrupts can be directed to irq_out or cint . 10.3.3.1 irq_out summary register 0 (irqsr0) the irq_out summary registers contain one bit for each interrupt source. the corresponding bit is set if the interrupt is active and is directed to irq_out (that is, if the corresponding x idr[ep] is set). figure 10-16 shows irqsr0. figure 10-16. irq_out summary register 0 (irqsr0) table 10-21 describes the irqsr0 fields. 0 151617181920 31 r0 0 0 0000000000000msg0msg1msg2msg3 ext n w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x4_1310 table 10-21. irqsr0 field descriptions bits name description 0?15 ? reserved 16 msg0 message interrupt 0 status 0 interrupt is not active or not directed to irq_out . 1 interrupt is active and is directed to the irq_out pin (that is, if the corresponding x idr[ep] is set. 17 msg1 message interrupt 1 status 0 interrupt is not active or not directed to irq_out . 1 interrupt is active and is directed to the irq_out pin (that is, if the corresponding x idr[ep] is set. 18 msg2 message interrupt 2 status 0 interrupt is not active or not directed to irq_out . 1 interrupt is active and is directed to irq_out (that is, if the ep corresponding x idr[ep] is set. 19 msg3 message interrupt 3 status 0 interrupt is not active or not directed to irq_out . 1 interrupt is active and is directed to irq_out (that is, if corresponding x idr[ep] is set. 20?31 ext n external interrupts 0?11. each bit corresponds to a different interrupt according to the following: bit interrupt 20irq0 21irq1 31irq11 0 the corresponding interrupt is not active or not directed to irq_out . 1 the corresponding interrupt is active and directed to irq_out (if the corresponding x idr[ep] is set.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-27 10.3.3.2 irq_out summary register 1 (irqsr1) figure 10-17 shows irqsr1. figure 10-17. irq_out summary register 1 (irqsr1) table 10-22 describes the irqsr1 fields. 10.3.3.3 critical interrupt summary register 0 (cisr0) the critical interrupt summary registers contain one bit for each interrupt source. the corresponding bit is set if the interrupt is active and is directed to the processor?s critical interrupt signal cint (if the ci field in its corresponding destination register is set). figure 10-18 shows cisr0. figure 10-18. critical interrupt summary register 0 (cisr0) 0 31 rint n w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x4_1320 table 10-22. irqsr1 field descriptions bits name description 0?31 int n internal interrupts 0?31 status. bit 0 represents int0. bit 31 represents int31. 0 the corresponding interrupt is not active or not directed to irq_out . 1 the corresponding interrupt is active and is directed to irq_out (that is, if the corresponding x idr[ep] is set). 01516192031 r0000000000000000 msg n ext n w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x4_1330
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-28 freescale semiconductor programmable interrupt controller table 10-23 describes the cisr0 fields. 10.3.3.4 critical interrupt summary register 1 (cisr1) figure 10-19 shows cisr1. figure 10-19. critical interrupt summary register 1 (cisr1) table 10-24 describes cisr1 register. 10.3.4 performance monitor mask registers (pmmrs) there are four pairs of performance monitor mask registers, pm n mr0 and pm n mr1. each pair can be configured to select one interrupt source (interprocessor, timer, message, external, or internal) to generate a performance monitor event. the performance monitor can be configured to track this event in the performance monitor local control registers. see section 19.3.2.2, ?performance monitor local control registers (pmlcan and pmlcbn).? table 10-23. cisr0 field descriptions bits name description 0?15 ? reserved 16?19 msg n message interrupts 0?3. bit 16 represents msg0; bit 19 represents msg3. 0 the corresponding interrupt is not active or not directed to cint . 1 the corresponding interrupt is active and is directed to the cint (if the corresponding xidr[ci] is set). 20?31 ext n external interrupts 0?11. bit 20 represents irq0. bit 31 represents irq11. 0 the corresponding interrupt is not active or not directed to cint . 1 the corresponding interrupt is active and is directed to the cint (if the corresponding xidr[ci] is set). 0 31 rint n w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x4_1340 table 10-24. cisr1 field descriptions bits name description 0?3 1 int n internal interrupts 0?31. bit 0 represents int0. bit 31 represents int31. 0 corresponding interrupt is not active or not directed to cint . 1 the corresponding interrupt is active and is directed to the cint (if the corresponding xidr[ci] is set).
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-29 10.3.4.1 performance monitor mask register (lower) (pm n mr0) figure 10-20 shows the pm n mr0 registers. each register is paired with a pm n mr1 register. because each unreserved bit in the 64-bit pair (pm n mr0/1) specifies a different interrupt, only one bit in each pair can be unmasked at a time. unmasking more than one bit per pair is considered a programming error and results in unpredictable behavior. figure 10-20. performance monitor mask registers (pm n mr0) table 10-25 describes the pm n mr0 fields. 078111215161920 31 r00000000 ipi timer msg ext w reset 0000_0000_1111_ 1111_1111_1111_1111_1111 offset pm0mr0 0x4_1350, pm1mr0 0x4_1370, pm2mr0 0x4_1390, pm3mr0 0x4_13b0 table 10-25. pm n mr0 field descriptions bits name description 0?7 ? reserved 8?11 ipi ipi interrupts 0?3 0 the corresponding interrupt source generates a performance monitor event when the interrupt occurs. 1 the corresponding interrupt does not generate a performance monitor event. 12?15 timer timer interrupts 0?3 0 the corresponding interrupt source generates a performance monitor event when the interrupt occurs. 1 the corresponding interrupt does not generate a performance monitor event. 16?19 msg message interrupts 0?3 0 the corresponding interrupt source generates a performance monitor event when the interrupt occurs. 1 the corresponding interrupt does not generate a performance monitor event. 20?31 ext external interrupts irq[0:11] 0 the corresponding interrupt source generates a performance monitor event when the interrupt occurs. 1 the corresponding interrupt does not generate a performance monitor event.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-30 freescale semiconductor programmable interrupt controller 10.3.4.2 performance monitor mask registers (upper) (pm n mr1) figure 10-21 shows the pm0mr1?pm3mr1 fields. figure 10-21. performance monitor mask registers (pm n mr1) table 10-26 describes the pm n mr1 registers. 10.3.5 message registers writing to one of the four message registers (msgr0?msgr3) causes a messaging interrupt to the processor. reading this register clears the messaging interrupt. note that a messaging interrupt can also be cleared by writing a one to the corresponding status field of the pic message status register (msr), shown in figure 10-24 . 10.3.5.1 message registers (msgr0?msgr3) the message registers (msgr0?msgr3) are shown in table 10-22 . figure 10-22. message registers (msgrs) table 10-27 describes the msgr registers. 0 31 r int w reset 1111_1111_1111_1111_1111_1111_1111_1111 offset pm0mr1 0x4_1360, pm1mr1 0x4_1380, pm2mr1 0x4_13a0, pm3mr1 0x4_13c0 table 10-26. pm n mr1 field descriptions bits nam e description 0?31 int internal interrupts 0?31 0 the corresponding interrupt source generates a performance monitor event when the interrupt occurs. 1 the corresponding interrupt does not generate a performance monitor event. 0 31 r msg w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset msgr0 0x4_1400, msgr1 0x4_1410, msgr2 0x4_1420, msgr3 0x4_1430 table 10-27. msgr n field descriptions bits name description 0?31 msg message. contains the 32-bit message data.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-31 10.3.5.2 message enable register (mer) the message enable register (mer) shown in figure 10-23 contains the enable bits for each message register. the enable bit must be set to enable interrupt generation when the corresponding message register is written. figure 10-23. message enable register (mer) table 10-28 describes the mer fields. 10.3.5.3 message status register (msr) the pic message status register (msr) shown in figure 10-24 contains status bits for each message register. the status bit is set when the corresponding messaging interrupt is active. reading the corresponding message register or writing a 1 to a status bit clears the corresponding message interrupt and the status bit. figure 10-24. message status register (msr) 0 27 28 29 30 31 r0000000000000000000000000000 e3 e2 e1 e0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x4_1500 table 10-28. mer field descriptions bits name description 0?27 ? reserved 28 e3 enable 3. used to enable interrupt generation for msgr3. 0 interrupt generation for msgr3 disabled. 1 interrupt generation for msgr3 enabled. 29 e2 enable 2. used to enable interrupt generation for msgr2. 0 interrupt generation for msgr2 disabled. 1 interrupt generation for msgr2 enabled. 30 e1 enable 1. used to enable interrupt generation for msgr1. 0 interrupt generation for msgr1 disabled. 1 interrupt generation for msgr1 enabled. 31 e0 enable 0. used to enable interrupt generation for msgr0. 0 interrupt generation for msgr0 disabled. 1 interrupt generation for msgr0 enabled. 0 27 28 29 30 31 r0000000000000000000000000000 s3 s2 s1 s0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x4_1510
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-32 freescale semiconductor programmable interrupt controller table 10-29 describes the msr fields. 10.3.6 interrupt source configuration registers the interrupt source configuration registers control the source of each interrupt, specifying parameters such as the interrupting event, signal polarity, and relative priority. 10.3.6.1 external interrupt vector/priority registers (eivpr0?eivpr11) the external interrupt vector/priority registers (eivprs) contain polarity and sense fields for the external interrupts caused by the assertion of any of irq[0:11]. the format of the eivprs is shown in figure 10-25 . figure 10-25. external interrupt vector/priority registers (eivpr0 ? eivpr11) table 10-29. msr field descriptions bits name description 0?27 ? reserved 28 s3 status 3. reports status of messaging interrupt 3. writing a 1 clears this field. 0 messaging interrupt 3 is not active. 1 messaging interrupt 3 is active. 29 s2 status 2. reports status of messaging interrupt 2. writing a 1 clears this field. 0 messaging interrupt 2 is not active. 1 messaging interrupt 2 is active. 30 s1 status 1. reports status of messaging interrupt 1. writing a 1 clears this field. 0 messaging interrupt 1 is not active. 1 messaging interrupt 1 is active. 31 s0 status 0. reports status of messaging interrupt 0. writing a 1 clears this field. 0 messaging interrupt 0 is not active. 1 messaging interrupt 0 is active. 0 1 2 7 8 9 10 11 12 15 16 31 r msk a000000 ps 00 priority vector w reset 1000_0000_0000_0000_0000_0000_0000_0000 offset eivpr0 0x5_0000, eivpr1 0x5_0020, eivpr2 0x5_0040, eivpr3 0x5_0060, eivpr4 0x5_0080, eivpr5 0x5_00a0, eivpr6 0x5_00c0, eivpr7 0x5_00e0, eivpr8 0x5_0100, eivpr9 0x5_0120, eivpr10 0x5_0140, eivpr11 0x5_0160
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-33 table 10-30 describes the eivpr fields. 10.3.6.2 external interrupt destination registers (eidr0?eidr11) the external interrupt destination registers (eidr n ), shown in figure 10-26 , control the destination of external interrupts caused by the assertion of any of irq[0:11]. all external interrupts are directed to the processor 0 interrupt, int , by default. external interrupts can be selectively directed to irq_out or to the processor 0 critical interrupt signal, cint , instead of int by writing to the appropriate eidr n fields. note the behavior of the pic unit is not defined if both the ep and ci bits of the same interrupt destination register are set. figure 10-26. external interrupt destination registers (eidr n ) table 10-30. eivpr n field descriptions bits name description 0 msk mask. masks interrupts from this source. 0 if the corresponding ipr bit is set an interrupt request is generated. 1 interrupts from this source are disabled. 1 a activity. a read-only field indicating that an interrupt has been requested or is in-service. note: the p (polarity), s (sense), vector and priority values should not be changed while the corresponding interrupt is active, that is, while eivpr n [a] is set. 0 no current interrupt activity associated with this source. 1 the interrupt bit for this source is set in the ipr or isr. 2?7 ? reserved. 8 p polarity. specifies the polarity for the external interrupt. 0 polarity is active-low or negative edge triggered. 1 polarity is active-high or positive edge-triggered. 9 s sense. specifies the sense for external interrupts. 0 the external interrupt is edge sensitive. 1 the external interrupt is level-sensitive. 10?11 ? reserved. 12?15 priorit y priority. specifies the interrupt priority. the lowest priority is 0 and the highest priority is 15. a priority level of 0 disables interrupts from this source. 16?31 vector vector. contains the value returned when the interrupt acknowledge (iack) register is read and this interrupt resides in the interrupt request register (irr) shown in figure 10-37 . 012 30 31 r ep ci 00000000000000000000000000000p0 w reset 0000_0000_0000_0000_0000_0000_0000_0001 offset eidr0 0x5_0010, eidr1 0x5_0030, eidr2 0x5_0050, eidr3 0x5_0070, eidr4 0x5_0090, eidr5 0x5_00b0, eidr6 0x5_00d0, eidr7 0x5_00f0, eidr8 0x5_0110, eidr9 0x5_0130, eidr10 0x5_0150, eidr11 0x5_0170
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-34 freescale semiconductor programmable interrupt controller table 10-31 describes the eidr fields. because external interrupts can be channeled only to processor 0, the p0 bit is permanently set. as shown in figure 10-37 , if either the ci or ep bits are set, the interrupt is not sent to the processor?s interrupt input. the ep or ci fields must be set only for level-sensitive interrupts. setting these fields for edge-sensitive interrupts does not provide reliable interrupt response. 10.3.6.3 internal interrupt vector/priority registers (iivpr0?iivpr31) the internal interrupt vector/priority registers (iivpr n ), shown in figure 10-27 , have the same fields and format as the gtvpr n , except that they apply to the internal interrupt sources listed in table 10-4 . these interrupts are all level-sensitive. note because all internal interrupts are active-high, clearing any iivpr n polarity field disables that interrupt. care should be taken to ensure this field is not inadvertently corrupted when loading or reloading iivprs with priority, mask, or vector data. figure 10-27. internal interrupt vector/priority registers (iivpr n ) table 10-31. eidr n field descriptions bits name description 0 ep external pin. allows external interrupt to be serviced externally. 0 external interrupt is serviced internally with int signal to the processor core. 1 external interrupt is directed to irq_out for external service. 1 ci critical interrupt. 0 external interrupt is serviced internally with int signal to the processor core. 1 external interrupt is directed to the processor 0 as a critical interrupt with the cint signal. 2?30 ? reserved 31 p0 processor 0. indicates that processor 0 handles any interrupt. this bit is meaningful only in a multi-core device. because the MPC8540 is a single-core device, all interrupts that are serviced internally are always directed to processor 0. permanently set and read only. 1 interrupt directed to processor 0. 0 1 2 7 8 9 11 12 15 16 31 r msk a000000 p 000 priority vector w reset 1000_0000_1000_0000_0000_0000_0000_0000 offset iivpr0?7: 0x5_0200, 0x5_0220, 0x5_0240, 0x5_0260, 0x5_0280, 0x5_02a0, 0x5_02c0, 0x5_02e0 iivpr8?15: 0x5_0300, 0x5_0320, 0x5_0340, 0x5_0360, 0x5_0380, 0x5_03a0, 0x5_03c0, 0x5_03e0 iivpr16?23: 0x5_0400, 0x5_0420, 0x5_0440, 0x5_0460, 0x5_0480, 0x5_04a0, 0x5_04c0, 0x5_04e0 iivpr24?31: 0x5_0500, 0x5_0520, 0x5_0540, 0x5_0560, 0x5_0580, 0x5_05a0, 0x5_05c0, 0x5_05e0
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-35 table 10-32 describes the iivpr n fields. 10.3.6.4 internal interrupt destination registers (iidr0?iidr31) internal interrupt destination registers (iidr n ), shown in figure 10-28 , have the same fields and format as eivdr n , except that they apply to the internal interrupt sources listed in table 10-4 . like external interrupts, internal interrupts can be directed only to processor 0. note the behavior of the pic unit is not defined if both the ep and ci bits of the same interrupt destination register are set. figure 10-28. internal interrupt destination registers (iidr n ) table 10-32. iivpr n field descriptions bits name description 0 msk mask. mask interrupts from this source. 0 an interrupt request is generated when the corresponding ipr field is set. 1 further interrupts from this source are disabled. 1 a activity. indicates an interrupt has been requested or is in-service. note this field is read only. the vector and priority values should not be changed while iivpr n [a] is set. 0 no current interrupt activity associated with this source. 1 the interrupt field for this source is set in the ipr or isr. 2?7 ? reserved 8 p polarity. specifies the polarity for the internal interrupt. note: because all internal interrupts are active-high, clearing this bit disables the interrupt. 0 interrupt polarity is active-low. this value disables the interrupt. 1 interrupt polarity is active-high. this is the reset value should not be changed. 9?11 ? reserved. 12?15 priorit y priority. specifies the interrupt priority. the lowest priority is 0 and the highest priority is 15. a priority level of 0 disables interrupts from this source. 16?31 vector vector. the vector value in this field is returned when the interrupt acknowledge (iack) register is read and this interrupt resides in the interrupt request register (irr) shown in figure 10-37 . 012 30 31 r ep ci 0000000000000000000000000000 0 p0 w reset 0000_0000_0000_0000_0000_0000_0000_0001 offset iidr0?7: 0x5_0210, 0x5_0230, 0x5_0250, 0x5_0270, 0x5_0290, 0x5_02b0, 0x5_02d0, 0x5_02f0 iidr8?15: 0x5_0310, 0x5_0330, 0x5_0350, 0x5_0370, 0x5_0390, 0x5_03b0, 0x5_03d0, 0x5_03f0 iidr16?23: 0x5_0410, 0x5_0430, 0x5_0450, 0x5_0470, 0x5_0490, 0x5_04b0, 0x5_04d0, 0x5_04f0 iidr24?31: 0x5_0510, 0x5_0530, 0x5_0550, 0x5_0570, 0x5_0590, 0x5_05b0, 0x5_05d0, 0x5_05f0
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-36 freescale semiconductor programmable interrupt controller table 10-33 describes the iidr n fields. 10.3.6.5 messaging interrupt vector/priority registers (mivpr0?mivpr3) the messaging interrupt vector/priority registers (mivpr n ), shown in figure 10-29 , have the same fields and format as the gtvpr n , except they apply to messaging interrupts. figure 10-29. messaging interrupt vector/priority registers (mivpr n ) table 10-34 describes the mivpr n fields. table 10-33. iidr n field descriptions bits name description 0 ep external pin. allows internal interrupt to be serviced externally. 0 internal interrupt is serviced internally with int signal to the processor core. 1 internal interrupt is directed to irq_out for external service. the behavior of the pic is not defined if both ep and ci are set on the same interrupt destination register. 1 ci critical interrupt. 0 internal interrupt is serviced internally with int signal to the processor core. 1 internal interrupt is directed to the processor 0 as a critical interrupt with the cint signal. the behavior of the pic is not defined if both ep and ci are set on the same interrupt destination register. 2?30 ? reserved 31 p0 processor 0. indicates that processor 0 handles any interrupt. this bit is meaningful only in a multi-core device. because the MPC8540 is a single-core device, all interrupts that are serviced internally are always directed to processor 0. permanently set and read only. 1 interrupt directed to processor 0. 012 1112 1516 31 r msk a0000000000 priority vector w reset 1000_0000_0000_0000_0000_0000_0000_0000 offset 0x5_1600, 0x5_1620, 0x5_1640, 0x5_1660, table 10-34. mivpr n field descriptions bits name description 0 msk mask. mask interrupts from this source. 0 an interrupt request is generated when the corresponding ipr field is set. 1 further interrupts from this source are disabled. 1 a activity. indicates an interrupt has been requested or is in-service. note this field is read only. the vector and priority values should not be changed while mivpr n [a] is set. 0 no current interrupt activity associated with this source. 1 the interrupt field for this source is set in the ipr or isr. 2?11 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-37 10.3.6.6 messaging interrupt destination registers (midr0?midr3) the messaging interrupt destination registers (midr n ), shown in figure 10-30 , control the destination for the messaging interrupts. midr enables the user to direct the interrupt to either the external interrupt output pin (irq_out ), the core?s critical interrupt input ( cint ), or to its normal interrupt input ( int ). note the behavior of the pic unit is not defined if both the ep and ci bits of the same interrupt destination register are set. figure 10-30. messaging interrupt destination registers (midr n ) table 10-35 describes the midr n fields. 12?15 priority priority. specifies the interrupt priority. the lowest priority is 0 and the highest priority is 15. a priority level of 0 disables interrupts from this source. 16?31 vector vector. the vector value in this field is returned when the interrupt acknowledge (iack) register is read and this interrupt resides in the interrupt request register (irr) shown in figure 10-37 . 012 30 31 r ep ci 00000000000000000000000000000p0 w reset 0000_0000_0000_0000_0000_0000_0000_0001 offset 0x5_1610, 0x5_1630, 0x5_1650, 0x5_1670 table 10-35. midr n field descriptions bits name description 0 ep external pin. allows message interrupt to be serviced externally. 0 message interrupt is serviced internally with int signal to the processor core. 1 message interrupt is directed to irq_out for external service. the behavior of the pic is not defined if both ep and ci are set on the same interrupt destination register. 1 ci critical interrupt 0 message interrupt is serviced internally with int signal to the processor core. 1 message interrupt is directed to the processor 0 as a critical interrupt with the cint signal. the behavior of the pic is not defined if both ep and ci are set on the same interrupt destination register. 2?30 ? reserved 31 p0 processor 0. indicates that processor 0 handles any interrupt. this bit is meaningful only in a multi-core device. because the MPC8540 is a single-core device, all interrupts that are serviced internally are always directed to processor 0. permanently set and read only. 1 interrupt directed to processor 0. table 10-34. mivpr n field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-38 freescale semiconductor programmable interrupt controller 10.3.7 per-cpu registers the openpic programming model supports multiprocessor systems of up to 32 separate processors. as such, the openpic interface specification provides for coordinating both the requesting and servicing of interrupts among several processor cores within a single integrated device. to fully comply with the openpic specification, the pic incorporates several of these multiprocessor capabilities. because the value of features such as private address space for per-cpu registers and interprocessor interrupts is fully realized only in a multi-core environment, their utility in this single-core device is not intuitive. the registers in table 10-36 are called per-cpu registers, because they would be duplicated for each core in a multi-core device. the openpic interface specifies that a copy of these registers be available to each core at the same physical address by using the id of the processor that initiates the transaction to determine the set of per-cpu registers to access. these addresses, shown in table 10-36 , appear in the memory map at the same offset for every processor, and are called the private access space. because the MPC8540 has only one core, there is only one set of per-cpu registers, each register having two addresses. for example, the ctpr is located normally at 0x6_0080 and at the private access address of 0x4_0080. while this double mapping seems superfluous on a single-core device, the purpose of this feature is to enable user code to execute correctly in an multiprocessor environment without needing to know which cpu it is running on. it is included on this device to simplify the porting of such code. an example of how the different registers are addressed in a four-core device is illustrated in figure 10-31 . note that when accessing a register normally, each core sources a different address. however, when accessing the same register using the per-cpu address space, each core sources the same address. table 10-36. per-cpu registers?private access address offsets register name offset ipi 0 dispatch register (ipidr0) 0x4_0040 ipi 1 dispatch register (ipidr1) 0x4_0050 ipi 2 dispatch register (ipidr2) 0x4_0060 ipi 3 dispatch register (ipidr3) 0x4_0070 current task priority register (ctpr) 0x4_0080 who am i register (whoami) 0x4_0090 interrupt acknowledge register (iack) 0x4_00a0 end of interrupt register (eoi) 0x4_00b0
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-39 figure 10-31. per-cpu register address decoding in a four-core device 10.3.7.1 interprocessor interrupt dispatch register (ipidr0?ipidr3) there are four interprocessor interrupt dispatch registers (ipidrs), one for each ipi channel, as shown in figure 10-32 . writing to an ipidr with a bit set causes a self interrupt. interprocessor interrupts are of limited usefulness in a single-core device; however, this feature can serve as a doorbell type interrupt because external bus masters can write to these registers. 0 30 31 r0000000000000000000000000000000 w p0 reset 0000_0000_0000_0000_0000_0000_0000_0000 offset ipidr0 0x6_0040, ipidr1 0x6_0050 ipidr2 0x6_0060, ipidr3 0x6_0070 (see section 10.3.7, ?per-cpu registers .? ) figure 10-32. interprocessor interrupt dispatch registers (ipidr0?ipidr3) reg 3 reg 2 reg 1 reg 0 id3 id2 id1 id0 0 x 6 3 0 x 6 2 0 x 6 1 0 x 6 0 0 x 4 0 + 3 0 x 4 0 + 2 0 x 4 0 + 1 0 x 4 0 + 0 per-cpu register normal register uses core id processor iack registers (one per core) address 0x40 0x40 0x40 0x40 address cores address decode address decode 0x61 0x62 0x63 0x60
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-40 freescale semiconductor programmable interrupt controller table 10-37 describes the ipidr n fields. 10.3.7.2 processor current task priority register (ctpr) there is one ctpr on this device (MPC8540) shown in figure 10-33 . software must write the priority of the current processor task in the ctpr. the pic uses this value for comparison with the priority of incoming interrupts. given several concurrent incoming interrupts, the highest priority interrupt is asserted to the core if the following apply:  the interrupt is not masked  the priority of the interrupt is higher than the values in the ctpr and isr priority levels from 0 (lowest) to 15 (highest) are supported. setting the task priority to 15 masks all external interrupts signaled through the int signal. hardware sets ctpr to 0x0000_000f during reset or when the px field of the processor initialization register is set. this effectively prevents the pic from signaling any interrupts through the int signal. figure 10-33. processor current task priority register (ctpr) table 10-38 describes the ctpr. table 10-37. ipidr n field descriptions bits name description 0?30 ? reserved 31 p0 processor 0. determines if processor 0 receives the interrupt. write only. 0 processor 0 does not receive the interrupt. 1 directs the interrupt to processor 0. 0 27 28 31 r0000000000000000000000000000 taskp w reset 0000_0000_0000_0000_0000_0000_0000_ 1111 offset 0x6_0080 (see section 10.3.7, ?per-cpu registers .? ) table 10-38. ctpr field descriptions bits name description 0?27 ? reserved 28?31 taskp task priority. this field is set from 0 to 15, where 15 corresponds to the highest priority for processor tasks. if ctpr[taskp] = 0xf, no interrupts are signaled to the processor.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-41 10.3.7.3 who am i register (whoami) the processor who am i register (whoami), shown in figure 10-34 , can be read by the processor to determine its physical connection to the pic. the value returned when reading this register may be used to determine the value for the destination masks used for dispatching interrupts. figure 10-34. processor who am i register (whoami) table 10-39 describes the whoami fields. 10.3.7.4 processor interrupt acknowledge register (iack) in systems based on processors that implement the powerpc architecture, the interrupt acknowledge function occurs as an explicit read operation to a memory-mapped interrupt acknowledge register (iack), shown in figure 10-35 . reading the interrupt acknowledge register returns the interrupt vector corresponding to the highest priority pending interrupt. reading iack also has the following side effects:  the associated field in the interrupt pending register (ipr) is cleared for edge-sensitive interrupts to indicated that the interrupt is no longer pending.  the corresponding field in the in-service register (isr) is set to indicated that the interrupt has been signaled to the core.  the interrupt signal ( int ) to the processor is negated. reading this register when there is no pending interrupt returns the spurious vector value as described in section 10.3.1.6, ?spurious vector register (svr).? 0 26 27 31 r0 000000000 0 0 000 0 0 0 0 0 0 0 0 0 0 0 0 id w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x6_0090 (see section 10.3.7, ?per-cpu registers .? ) table 10-39. whoami field descriptions bits name description 0?26 ? reserved 27?3 1 id id. returns the id of the processor reading this register. always returns zero. 00000processor core
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-42 freescale semiconductor programmable interrupt controller figure 10-35. processor interrupt acknowledge register (iack) table 10-40 describes the iack fields. 10.3.7.5 processor end of interrupt register (eoi) writing to the end of interrupt (eoi) register shown in figure 10-36 signals the end of processing for the highest-priority interrupt currently in-service by the processor. the write to the eoi updates the isr by retiring the highest priority interrupt. data values written to this register are ignored, and zero is assumed. figure 10-36. end of interrupt register (eoi) table 10-41 describes the eoi fields. 01516 31 r0 00000000000000 0 vector w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x6_00a0 (see section 10.3.7, ?per-cpu registers .? ) table 10-40. iack field descriptions bits name description 0?15 ? reserved 16?31 vector interrupt vector. vector of the highest pending interrupt (read only) 0 27 28 31 r000000000000000000000000000 0 w eoi code reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x6_00b0 (see section 10.3.7, ?per-cpu registers .? ) table 10-41. eoi field descriptions bits name description 0?27 ? reserved 28?31 eoi code 0000 (write only)
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-43 10.4 functional description this section is a functional description of the pic. 10.4.1 flow of interrupt control figure 10-37 is a block diagram of the pic unit showing the flow of interrupt processing. this figure is intended to aid in understanding and does not fully represent all internal circuitry of the actual implementation. the pic receives interrupt signals from both external and internal sources. these signals are qualified and latched in the interrupt pending register (ipr). the ipr feeds the interrupt selector (is). the interrupt router of the pic monitors the outputs of its internal interrupt request register (irr) and other configuration registers. when the priority of the interrupt latched in the irr is higher than the value in the processor?s task priority register, the interrupt router asserts the internal interrupt signal ( int ) to indicate an interrupt request to the processor. this causes the processor to vector to the external interrupt handler. note that the ipr, is, and irr are internal registers that are not accessible to the programmer.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-44 freescale semiconductor programmable interrupt controller figure 10-37. pic interrupt processing flow diagram the interrupt handler executing on the processor should then acknowledge the interrupt by explicitly reading iack (at which point the interrupt is considered to be in-service). the pic unit interprets this read as an interrupt acknowledge (iack) cycle; in response, the pic unit returns the pic configuration and status registers interrupt pending register internal, external, and interrupt selector in-service register int iack eoi cint mask critical interrupt xidr[ci] external pin xidr[ep] irq_out global timers (4) inter-processor message interrupts (is) to processor core note: all signal lines represent buses except for int , cint , and irq_out . the behavior of the pic unit is not defined if both the ep and ci bits of the same interrupt destination register are set. interrupt router to processor core end of interrupt register highest priority interrupt (isr) processor?s task priority register interrupt request register pipeline latch (irr) activity bit (ipr)
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-45 vector associated with the interrupt source to the interrupt handler routine. the handler can further vector to different branches of interrupt handling accordingly. note that reading iack also negates the interrupt signal to the processor. see section 10.3.7.4, ?processor interrupt acknowledge register (iack),? for more details. the internal in-service register (isr) tracks all interrupts that have caused int to be asserted and that have received an iack cycle. an interrupt is considered in-service from the time its vector is read (through an iack cycle) until the end of interrupt (eoi) register is written, generating what the pic considers an eoi signal. 10.4.1.1 interrupt source priority each interrupt source is assigned a priority value of 0?15 through its corresponding vector/priority register, where 15 is the highest priority. interrupts are delivered only when the priority in the vector/priority is greater than the priority programmed into the current task priority register, ctpr. setting a source priority to zero inhibits that interrupt. likewise, setting the ctpr value to 15 disables all interrupts directed to the int signal. the pic unit services simultaneous interrupts occurring with the same priority according to the following order: 1. msg0?msg3 2. ipi0?ipi3 3. timer0?timer3 4. irq[0:11] 5. internal0?internal31 for example, if msg0, msg2, and ipi0 have the same priority and generate simultaneous interrupts, they are serviced in the following order: 1. msg0 2. msg2 3. ipi0 10.4.1.2 processor current task priority the ctpr is set by system software to indicate the relative importance of the task running on the processor. the processor does not receive interrupts with a priority level equal to or lower than its current task priority. therefore setting the current task priority to 15 for a particular processor prevents the delivery of any interrupt to the processor.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-46 freescale semiconductor programmable interrupt controller 10.4.1.3 interrupt acknowledge the pic unit notifies the processor core of an interrupt by asserting the int signal. when the processor core acknowledges the interrupt request by reading the interrupt acknowledge register (iack) in the pic unit, the pic returns the 16-bit vector associated with the interrupt source to the processor. the interrupt is then considered to be in-service, and remains in-service until the processor performs a write to the pic unit end of interrupt register (eoi). writing to the eoi is referred to as an eoi cycle. 10.4.2 nesting of interrupts if the processor is servicing an interrupt, it can only be interrupted again if the pic receives an interrupt request from a source with higher priority than the one currently being serviced. this is true even if software, as part of its interrupt service routine, writes a new and lower value into the ctpr. thus, although several interrupts may be in-service simultaneously, the code currently executing is always handling the highest priority of all the interrupts that are in service. when the processor performs an eoi cycle, this highest priority interrupt is taken out-of-service. the next eoi cycle takes the next-highest priority interrupt out-of-service, and so on. an interrupt with lower priority than those currently in-service is not started until all higher priority interrupts complete even if its priority is greater than the ctpr value. 10.4.3 processor initialization the processor can reset itself by writing to the processor initialization register (pir). this causes the assertion of the core_reset output signal. when this occurs, the processor also gets written to 0x000f to disable the delivery of any interrupts. 10.4.4 spurious vector generation under certain circumstances, the pic has no valid vector to return to the processor during an interrupt acknowledge cycle. in these cases, the spurious vector from the spurious vector register is returned. the following cases cause a spurious vector fetch:  int is asserted in response to an externally sourced interrupt that is activated with level-sensitive logic and the source negates before the interrupt is acknowledged.  int is asserted for an interrupt source that is later masked (using the mask bit in the corresponding vector/priority register) before the interrupt is acknowledged.  int is asserted for an interrupt source that is later masked by an increase in the task priority level before the interrupt is acknowledged.  an interrupt acknowledge cycle is performed by the processor in spite of the fact that the pic did not assert the int signal.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-47 in all cases, a spurious vector is not returned if another pending interrupt has sufficient priority to interrupt the processor. if such an interrupt is available, the vector for that source is returned. the eoi register should not be written in response to the spurious vector. otherwise, a previously-accepted interrupt might be cleared unintentionally. 10.4.5 messaging interrupts there are four 32-bit message registers that can be used to send 32-bit messages to the processor. a messaging interrupt is generated by writing a message register if the corresponding enable bit in the message enable/status register is set, and the interrupt is not masked. reading the message register or writing a 1 to the status bit clears the interrupt. 10.4.6 global timers there are appropriate clock prescalers and synchronizers to provide a time base for the four internal timers of the pic unit. the timers can be individually programmed to generate a processor interrupt when they count down to zero and can be used to generate regular periodic interrupts. each timer has the following four configuration and control registers:  global timer current count register (gtccr n )  global timer base count register (gtbcr n )  global timer vector-priority register (gtvpr n )  global timer destination register (gtdr n ) the timer frequency should be written to the tfrr. (all of the timers operate at this frequency.) refer to section 10.3.2.1, ?timer frequency reporting register (tfrr),? for a description of this register. timer interrupts are all edge-triggered interrupts. if a timer period expires while a previous interrupt from the same source is pending or in-service, the subsequent interrupt is lost. the timer control register (tcr) provides users with the ability to create timers larger than the 31-bit global timers. the option also exists to change the timer frequency by setting the appropriate fields of the tcr. see section 10.3.2.6, ?timer control register (tcr).? 10.4.7 reset of the pic the pic unit is reset by a device power-on reset (por) or by software that sets the gcr[rst] bit. both of these actions cause the following:  all pending and in-service interrupts are cleared.  all interrupt mask bits are set.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-48 freescale semiconductor programmable interrupt controller  polarity, sense, external pin, critical interrupt, and activity fields are reset to their default values.  pir, tfrr, tcr, mer, msr, and msgr0?3 are cleared.  msg and timer destination fields are set.  the ipi dispatch registers are cleared.  all timer base count values are reset to zero and count inhibited.  the ctpr[taskp] is reset to 0xf, thus disabling interrupt delivery to the processor.  the spurious interrupt vector resets to 0xffff.  the pmmrs are reset to 0xffff.  the pic defaults to the pass-through mode (gcr[m] = 0).  all other registers remain at their pre-reset programmed values. the gcr[rst] bit is automatically cleared when the reset sequence is complete. 10.5 initialization/application information this section contains initialization and application information for the pic. 10.5.1 programming guidelines the following subsections contain information about programming pic registers. 10.5.1.1 pic registers most pic control and status registers are readable and return the last value written. the exceptions to this rule are as follows:  ipi dispatch registers and the eoi register, which return zeros on reads.  activity bit (a) of the vector/priority registers, which returns the value according to the status of the current interrupt source.  iack register, which returns the vector of highest priority which is currently pending, or the spurious vector.  reserved fields always return 0. the following guidelines are recommended when the pic unit is programmed in mixed mode (gcr[m] = 1):  all pic registers must be located in a cache-inhibited and guarded area (through the processor mmu).  the pic portion of the address map must be set-up appropriately.
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 10-49 in addition, the following initialization sequence is recommended: 1. write the vector, priority, and polarity values in each interrupt?s vector/priority register, leaving their msk (mask) bit set. this is required only if interrupts are used. 2. clear the ctpr (ctpr = 0x0000_0000). 3. program the pic to mixed mode by setting gcr[m]. 4. clear the msk bit in the vector/priority registers to be used. 5. perform a software loop to clear all pending interrupts: ? load counter with fpr[nirq]. ? while counter > 0, perform iack and eois to guarantee all the interrupt pending and in-service registers are cleared. 6. set the processor ctpr value to the desired value. depending on the interrupt system configuration, the pic may generate spurious interrupts to clear interrupts latched during power-up. a spurious or non-spurious vector is returned for an interrupt acknowledge cycle in this case. see the programming note below for the non-spurious case. note: because the default polarity/sense for external interrupts is edge-sensitive, and edge-sensitive interrupts are not cleared until they are acknowledged, it is possible for the pic to store spurious edges detected during power-up as pending external interrupts. if software permanently configures an external interrupt source to be edge-sensitive, it may receive the vector for the interrupt source and not a spurious interrupt vector when software clears the mask bit. this can occur once for any edge-sensitive interrupt when its mask bit is first cleared and the pic is in mixed mode. to avoid having to handle a false interrupt for this case, software can clear the pic interrupt pending register of these spurious edge detections by first configuring the polarity/sense of external interrupt sources to be level-sensitive; high-level if the input is a positive-edge source, low-level if it?s a negative-edge source (while the mask bit remains set). after this is complete, configuring the external interrupt source as edge-sensitive will not cause a false interrupt.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 10-50 freescale semiconductor programmable interrupt controller 10.5.1.2 changing interrupt source configuration to change the vector, priority, polarity, sense or destination of an active (unmasked) interrupt source, the following sequence should be performed: 1. mask the source using the mask (msk) bit in the vector/priority register. 2. wait for the activity (a) bit for that source to be cleared. 3. make the desired changes. 4. unmask the source. internal interrupts l2 cache e500 coherency model (ecm) ddr dram local bus controller (lbc) dma channels 0?3 pci/pci-x rapidio inbound port write/ error interrupt rapidio doorbell inbound interrupt rapidio outbound message interrupt rapidio inbound message interrupt tsec 1/2 transmit interrupts tsec 1/2 receive interrupts tsec 1/2 receive/transmit error interrupts fast ethernet controller (fec) duart i2c controller performance monitor interrupt pic global timer (4) inter- processor (4) irq_out irq[0:8] dma_dreq3/irq9 dma_dack3/irq10 dma_ddone3/irq11 external interrupts global utilities cint int wake up core/ interrupts ckstp_in ckstp_out hreset hreset_req sreset mcp ude service interrupt e500 core core_wrs_[0:1] core_hreset core_hreset_req core_ude core_mcp core_halt core_tbint core_ckstop_out core_fault timer facility watchdog timer core_reset pir[p0] pic-defined messaging (4)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 11-1 chapter 11 i 2 c interface this chapter describes the inter-ic (iic or i 2 c) bus interface implemented on this device. 11.1 introduction the i 2 c bus is a two-wire?serial data (sda) and serial clock (scl)? bidirectional serial bus that provides a simple efficient method of data exchange between this device and other devices, such as microcontrollers, eeproms, real-time clock devices, a/d converters, and lcds. figure 11-1 shows a block diagram of the i 2 c interface. figure 11-1. i 2 c block diagram i2cadr i2cfdr i2ccr i2csr i2cdr addr decode data mux address compare input sync in/out data shift register clock control sda address and control interrupt data arb_lost and digital filter start/ stop/ restart and arbitration control divide & i2cdsrr scl
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 11-2 freescale semiconductor i 2 c interface 11.1.1 overview the two-wire i 2 c bus minimizes interconnections between devices. the synchronous, multiple-master i 2 c bus allows the connection of additional devices to the bus for expansion and system development. the bus includes collision detection and arbitration that prevent data corruption if two or more masters attempt to control the bus simultaneously. 11.1.2 features the i 2 c interface includes the following features:  two-wire interface  multiple-master operation  arbitration lost interrupt with automatic mode switching from master to slave  calling address identification interrupt  start and stop signal generation/detection  acknowledge bit generation/detection  bus busy detection  software-programmable clock frequency  software-selectable acknowledge bit  on-chip filtering for spikes on the bus 11.1.3 modes of operation the i 2 c unit on this device can operate in one of the following modes:  master mode?the i 2 c is the driver of the sda line. it cannot use its own slave address as a calling address. the i 2 c cannot be a master and a slave simultaneously.  slave mode?the i 2 c is not the driver of the sda line. the module must be enabled before a start condition from a non-i 2 c master is detected.  interrupt-driven byte-to-byte data transfer?when successful slave addressing is achieved (and scl returns to zero), the data transfer can proceed on a byte-to-byte basis in the direction specified by the r/w bit sent by the calling master. each byte of data must be followed by an acknowledge bit, which is signalled from the receiving device. several bytes can be transferred during a data transfer session.  boot sequencer mode?this mode can be used to initialize the configuration registers in the device after the i 2 c module is initialized. note that the MPC8540 powers up with boot sequencer mode disabled as a default, but this mode can be selected with the cfg_boot_seq[0:1] power-on reset (por) configuration signals that are located on the lgpl3 and lgpl5 signals.
external signal descriptions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 11-3 additionally, the following three i 2 c-specific states are defined for the i 2 c interface:  start condition?this condition denotes the beginning of a new data transfer (each data transfer contains several bytes of data) and awakens all slaves.  repeated start condition?a start condition that is generated without a stop condition to terminate the previous transfer.  stop condition?the master can terminate the transfer by generating a stop condition to free the bus. 11.2 external signal descriptions the following sections give an overview of signals and provide detailed signal descriptions. 11.2.1 signal overview the i 2 c interface uses the sda and scl signals, described in table 11-1 , for data transfer. all devices connected to these two signals must have open-drain or open-collector outputs. a logical and function is performed on both signals with external pull-up resistors. note that the signal patterns driven on sda represent address, data, or read/write information at different stages of the protocol. 11.2.2 detailed signal descriptions sda and scl, described in table 11-2 , serve as a communication interconnect with other devices. all devices connected to these two signals must have open-drain or open-collector outputs. the logic and function is performed on both of these signals with external pull-up resistors. refer to the MPC8540 integrated host processor hardware specifications for the electrical characteristics of these signals. table 11-1. i 2 c interface signal description signal name idle state i/o state meaning serial clock (scl) high i when the i 2 c module is idle or acts as a slave, scl defaults as an input. the unit uses scl to synchronize incoming data on sda. the bus is assumed to be busy when scl is detected low. o as a master, the i 2 c module drives scl along with sda when transmitting. as a slave, the i 2 c module drives scl low for data pacing. serial data (sda) high i when the i 2 c module is idle or in a receiving mode, sda defaults as an input. the unit receives data from other i 2 c devices on sda. the bus is assumed to be busy when sda is detected low. o when writing as a master or slave, the i 2 c module drives data on sda synchronous to scl.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 11-4 freescale semiconductor i 2 c interface 11.3 memory map/register definition table 11-3 lists the i 2 c?specific registers and their addresses. 11.3.1 register descriptions this section describes the i 2 c registers in detail. note reserved bits should always be written with the value they returned when read. that is, the register should be programmed by reading the value, modifying appropriate fields, and writi ng back the value. the return value of the reserved fields should not be assumed, even though the reserved fields return zero. this note does not apply to the i 2 c data register (i2cdr). table 11-2. i 2 c interface signal?detailed signal descriptions signal i/o description scl i/o serial clock. performs as an input when the MPC8540 is programmed as an i 2 c slave. scl also performs as an output when the MPC8540 is programmed as an i 2 c master. o as outputs for the bidirectional serial clock, these signals operate as described below. state meaning asserted/negated?driven along with sda as the clock for the data. i as inputs for the bidirectional serial clock, these signals operate as described below. state meaning asserted/negated?the i 2 c unit uses this signal to synchronize incoming data on sda. the bus is assumed to be busy when this signal is detected low. sda i/o serial data. performs as an input when the MPC8540 is in a receiving mode. sda also performs as an output signal when the MPC8540 is transmitting (as an i 2 c master or a slave). o as outputs for the bidirectional serial data, these signals operate as described below. state meaning asserted/negated? data is driven. i as inputs for the bidirectional serial data, these signals operate as described below. state meaning asserted/negated?used to receive data from other devices. the bus is assumed to be busy when sda is detected low. table 11-3. i 2 c memory map address i 2 c register access reset section/page 0x0_3000 i2cadr?i 2 c address register r/w 0x00 11.3.1.1/11-5 0x0_3004 i2cfdr?i 2 c frequency divider register r/w 0x00 11.3.1.2/11-5 0x0_3008 i2ccr?i 2 c control register r/w 0x00 11.3.1.3/11-6 0x0_300c i2csr?i 2 c status register r/w 0x81 11.3.1.4/11-7 0x0_3010 i2cdr?i 2 c data register r/w 0x00 11.3.1.5/11-9 0x0_3014 i2cdfsrr?i 2 c digital filter sampling rate register r/w 0x10 11.3.1.6/11-10
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 11-5 11.3.1.1 i 2 c address register (i2cadr) figure 11-2 shows the i2cadr register, which contains the address to which the i 2 c interface responds when addressed as a slave. note that this is not the address that is sent on the bus during the address-calling cycle when the i 2 c module is in master mode. figure 11-2. i 2 c address register (i2cadr) table 11-4 describes the bit settings of i2cadr. 11.3.1.2 i 2 c frequency divider register (i2cfdr) figure 11-3 shows the bits of the i 2 c frequency divider register. figure 11-3. i 2 c frequency divider register (i2cfdr) 0 67 r addr w reset 0000_0000 offset 0x0_3000 table 11-4. i2cadr field descriptions bits name description 0?6 addr slave address. contains the specific slave address that is used by the i 2 c interface. note that the default mode of the i 2 c interface is slave mode for an address match. note that an address match is one of the conditions that can cause i2csr[mif] to be set, signaling an interrupt pending condition. 7?reserved 012 7 r fdr w reset 0000_0000 offset 0x0_3004
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 11-6 freescale semiconductor i 2 c interface table 11-5 describes the bit settings of i2cfdr. it also maps the i2cfdr[fdr] field to the clock divider values. 11.3.1.3 i 2 c control register (i2ccr) figure 11-4 shows the i 2 c control register. figure 11-4. i 2 c control register (i2ccr) table 11-5. i2cfdr field descriptions bits name description 0?1 ? reserved 2?7 fdr frequency divider ratio. used to prescale the clock for bit rate selection. the serial bit clock frequency of scl is equal to the ccb clock divided by the divider. note that the frequency divider value can be changed at any point in a program. the serial bit clock frequency divider selections are described as follows: fdr divider (decimal) 0x00 288 0x01 320 0x02 384 0x03 480 0x04 576 0x05 640 0x06 768 0x07 960 0x08 1152 0x09 1280 0x0a 1536 0x0b 1920 0x0c 2304 0x0d 2560 0x0e 3072 0x0f 3840 0x10 4608 0x11 5120 0x12 6144 0x13 7680 0x14 9216 0x15 10240 fdr divider (decimal) 0x16 12288 0x17 15360 0x18 18432 0x19 20480 0x1a 24576 0x1b 30720 0x1c 36864 0x1d 40960 0x1e 49152 0x1f 61440 0x20 160 0x21 192 0x22 224 0x23 256 0x24 320 0x25 384 0x26 448 0x27 512 0x28 640 0x29 768 0x2a 896 fdr divider (decimal) 0x2b 1024 0x2c 1280 0x2d 1536 0x2e 1792 0x2f 2048 0x30 2560 0x31 3072 0x32 3584 0x33 4096 0x34 5120 0x35 6144 0x36 7168 0x37 8192 0x38 10240 0x39 12288 0x3a 14336 0x3b 16384 0x3c 20480 0x3d 24576 0x3e 28672 0x3f 32768 01234567 r men mien msta mtx txak bcst wrsta reset 0000_0000 offset 0x0_3008
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 11-7 table 11-6 describes the bit settings of the i2ccr . 11.3.1.4 i 2 c status register (i2csr) the status register, shown in figure 11-5 , is read only with the exception of the mif and mal bits, which can be cleared by software. the mcf and rxak bits are set at reset; all other i2csr bits are cleared on reset. table 11-6. i2ccr field descriptions bits name description 0 men module enable. this bit controls the software reset of the i 2 c module. 0 the module is reset and disabled. when low, the interface is held in reset but the registers can still be accessed. 1the i 2 c module is enabled. this bit must be set before any other control register bits have any effect. all i 2 c registers for slave receive or master start can be initialized before setting this bit. 1 mien module interrupt enable 0 interrupts from the i 2 c module are disabled. this does not clear any pending interrupt conditions. 1 interrupts from the i 2 c module are enabled. an interrupt occurs provided i2csr[mif] is also set. 2 msta master/slave mode start 0 when this bit is changed from one to zero, a stop condition is generated and the mode changes from master to slave. 1 cleared without generating a stop condition when the master loses arbitration. when this bit is changed from zero to one, a start condition is generated on the bus, and master mode is selected. 3 mtx transmit/receive mode select. this bit selects the direction of the master and slave transfers. when configured as a slave, this bit should be set by software according to i2csr[srw]. in master mode, the bit should be set according to the type of transfer required. therefore, for address cycles, this bit will always be high. the mtx bit is cleared when the master loses arbitration. 0 receive mode 1 transmit mode 4 txak transfer acknowledge. this bit specifies the value driven onto the sda line during acknowledge cycles for both master and slave receivers. the value of this bit only applies when the i 2 c module is configured as a receiver, not a transmitter. it also does not apply to address cycles; when the device is addressed as a slave, an acknowledge is always sent. 0 an acknowledge signal (low value on sda) is sent out to the bus at the 9th clock bit after receiving one byte of data. 1 no acknowledge signal response (high value on sda) is sent. 5 rsta repeat start. setting this bit always generates a repeated start condition on the bus, provides the device with the current bus master. attempting a repeated start at the wrong time (or if the bus is owned by another master), results in loss of arbitration. note that this bit is not readable, which means if a read is performed to i2ccr[rsta], a zero value will be returned. 0 no start condition is generated 1 generates repeat start condition 6?reserved 7 bcst broadcast 0 disables the broadcast accept capability 1 enables the i 2 c to accept broadcast messages at address zero
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 11-8 freescale semiconductor i 2 c interface figure 11-5. i 2 c status register (i2csr) table 11-7 describes the bit settings of the i2csr. 01234567 r mcf maas mbb mal bcstm srw mif rxak w reset 1000_0001 offset 0x0_300c table 11-7. i2csr field descriptions bits name description 0 mcf data transfer. when one byte of data is transferred, the bit is cleared. it is set by the falling edge of the 9th clock of a byte transfer. 0 byte transfer in progress. mcf is cleared under the following conditions: when i2csr is read in receive mode or when i2cdr is written in transmit mode 1 byte transfer is completed 1 maas addressed as a slave. when the value in i2cdr matches with the calling address, this bit is set. the processor is interrupted, if i2ccr[mien] is set. next, the processor must check the srw bit and set i2ccr[mtx] accordingly. writing to the i2ccr automatically clears this bit. 0 not addressed as a slave 1 addressed as a slave 2 mbb bus busy. indicates the status of the bus. when a start condition is detected, mbb is set. if a stop condition is detected, it is cleared. 0i 2 c bus is idle 1i 2 c bus is busy 3 mal arbitration lost. automatically set when the arbitration procedure is lost. note that the device does not automatically retry a failed transfer attempt. 0 arbitration is not lost. can only be cleared by software 1 arbitration is lost 4 bcstm broadcast match 0 there has not been a broadcast match. 1 the calling address matches with the broadcast address instead of the programmed slave address. this will also be set if this i 2 c drives an address of all 0s and broadcast mode is enabled. 5 srw slave read/write. when maas is set, srw indicates the value of the r/w command bit of the calling address, which is sent from the master. 0 slave receive, master writing to slave 1 slave transmit, master reading from slave. this bit is valid only when both of the following conditions are true: a complete transfer occurred and no other transfers have been initiated. the i 2 c interface is configured as a slave and has an address match. by checking this bit, the processor can select slave transmit/receive mode according to the command of the master.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 11-9 11.3.1.5 i 2 c data register (i2cdr) the i2c data register is shown in figure 11-6 . figure 11-6. i 2 c data register (i2cdr) table 11-8 shows the bit descriptions for i2cdr. 6 mif module interrupt. the mif bit is set when an interrupt is pending, causing a processor interrupt request (provided i2ccr[mien] is set). 0 no interrupt is pending. can be cleared only by software. 1 interrupt is pending. mif is set when one of the following events occurs: one byte of data is transferred (set at the falling edge of the 9th clock). the value in i2cadr matches with the calling address in slave-receive mode. arbitration is lost. 7 rxak received acknowledge. the value of sda during the reception of acknowledge bit of a bus cycle. if the received acknowledge bit (rxak) is low, it indicates that an acknowledge signal has been received after the completion of eight bits of data transmission on the bus. if rxak is high, it means no acknowledge signal has been detected at the 9th clock. 0 acknowledge received 1 no acknowledge received 0 7 r data w reset 0000_0000 offset 0x0_3010 table 11-8. i2cdr field description bits name description 0?7 data transmission starts when an address and the r/w bit are written to the data register and the i 2 c interface performs as the master. a data transfer is initiated when data is written to the i2cdr. the most significant bit is sent first in both cases. in the master receive mode, reading the data register allows the read to occur, but also allows the i 2 c module to receive the next byte of data on the i 2 c interface. in slave mode, the same function is available after it is addressed. note that the very first read is always a dummy read. table 11-7. i2csr field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 11-10 freescale semiconductor i 2 c interface 11.3.1.6 digital filter sampling rate register (i2cdfsrr) the digital filter sampling rate register (i2cdfsrr) is shown in figure 11-7 . figure 11-7. i 2 c digital filter sampling rate register (i2cdfsrr) table 11-9 shows the field descriptions for i2cdfsrr. 11.4 functional description the i 2 c unit always performs as a slave receiver as a default, unless explicitly programmed to be a master or slave transmitter. after the boot sequencer has completed (when powered up in boot sequencer mode), the i 2 c interface will perform as a slave receiver. 11.4.1 transaction protocol a standard i 2 c transfer consists of the following:  start condition  slave target address transmission  data transfer  stop condition figure 11-8 shows the interaction of these four parts with the calling address, data byte, and new calling address components of the i 2 c protocol. the details of the protocol are described in the following subsections. 012 7 r dfsr w reset 0001_0000 offset 0x0_3014 table 11-9. i2cdfsrr field descriptions bits name description 0?1 ? reserved 2?7 dfsr digital filter sampling rate. to assist in filtering out signal noise, the sample rate is programmed. this field is used to prescale the frequency at which the digital filter takes samples from the i 2 c bus. the resulting sampling rate is calculated by dividing the platform (ccb clock) frequency by the non-zero value of dfsr. if i2cdfsrr is set to zero, the i 2 c bus sample points default to the reset divisor 0x10.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 11-11 figure 11-8. i 2 c interface transaction protocol 11.4.1.1 start condition when the i 2 c bus is not engaged (both sda and scl lines are at logic high), a master can initiate a transfer by sending a start condition. as shown in figure 11-8 , a start condition is defined as a high-to-low transition of sda while scl is high. this condition denotes the beginning of a new data transfer. each data transfer can contain several bytes and awakens all slaves. the start condition is initiated by a software write that sets i2ccr[msta]. 11.4.1.2 slave address transmission the first byte of data is transferred by the master immediately after the start condition is the slave address. this is a seven-bit calling address followed by a r/w bit, which indicates the direction of the data being transferred to the slave. each slave in the system has a unique address. in addition, when the i 2 c module is operating as a master, it must not transmit an address that is the same as its slave address. an i 2 c device cannot be master and slave at the same time. only the slave with a calling address that matches the one transmitted by the master responds by returning an acknowledge bit (pulling the sda signal low at the 9th clock) as shown in figure 11-8 . if no slave acknowledges the address, the master should generate a stop condition or a repeated start condition. when slave addressing is successful (and scl returns to zero), the data transfer can proceed on a byte-to-byte basis in the direction specified by the r/w bit sent by the calling master. 123456789 123456789 a0 a1 a2 a3 a4 a5 a6 r/w a0 a1 a2 a3 a4 a5 a6 r/w d0 d1 d2 d3 d4 d5 d6 d7 xx xx scl sda start stop no ack read/ write calling address data byte 12 345678 9 12 345678 9 a0 a1 a2 a3 a4 a5 a6 r/w scl sda start stop ack no ack read/ write calling address new calling address repeat start ack
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 11-12 freescale semiconductor i 2 c interface the i 2 c module responds to a general call (broadcast) command when i2ccr[bcst] is set. a broadcast address is always zero; however the i 2 c module will not check the r/w bit. the second byte of the broadcast message is the master address. because the second byte is automatically acknowledged by hardware, the receiver device software must verify that the broadcast message is intended for itself by reading the second byte of the message. if the master address is for another receiver device and the third byte is a write command, software can ignore the third byte during the broadcast. if the master address is for another receiver device and the third byte is a read command, software must write 0xff to i2cdr with i2ccr[txak] = 1, so that it does not interfere with the data written from the addressed device. each data byte is 8 bits long. data bits can be changed only while scl is low and must be held stable while scl is high, as shown in figure 11-8 . there is one clock pulse on scl for each data bit, and the most significant bit (msb) is transmitted first. each byte of data must be followed by an acknowledge bit, which is signaled from the receiving device by pulling the sda line low at the 9th clock. therefore, one complete data byte transfer takes 9 clock pulses. several bytes can be transferred during a data transfer session. if the slave receiver does not acknowledge the master, the sda line must be left high by the slave. the master can then generate a stop condition to abort the data transfer or a start condition (repeated start) to begin a new calling. if the master receiver does not acknowledge the slave transmitter after a byte of transmission, the slave interprets that the end-of-data has been reached. then the slave releases the sda line for the master to generate a stop or a start condition. 11.4.1.3 repeated start condition figure 11-8 shows a repeated start condition, which is generated without a stop condition that can terminate the previous transfer. the master uses this method to communicate with another slave or with the same slave in a different mode (transmit/receive mode) without releasing the bus. 11.4.1.4 stop condition the master can terminate the transfer by generating a stop condition to free the bus. a stop condition is defined as a low-to-high transition of the sda signal while scl is high. for more information, see figure 11-8 . note that a master can generate a stop even if the slave has transmitted an acknowledge bit, at which point the slave must release the bus. the stop condition is initiated by a software write that clears i2ccr[msta]. as described in section 11.4.1.3, ?repeated start condition,? the master can generate a start condition followed by a calling address without generating a stop condition for the previous transfer. this is called a repeated start condition.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 11-13 11.4.1.5 protocol implementation details the following sections give details of how aspects of the protocol are implemented in this i 2 c module. 11.4.1.5.1 transaction monitoring?implementation details the different conditions of the i 2 c data transfers are monitored as follows:  start conditions are detected when an sda fall occurs while scl is high.  stop conditions are detected when an sda rise occurs while scl is high.  data transfers in progress are canceled when a stop condition is detected or if there is a slave address mismatch. cancellation of data transactions resets the clock module.  the bus is detected to be busy upon the detection of a start condition, and idle upon the detection of a stop condition. 11.4.1.5.2 control transfer?implementation details the i 2 c module contains logic that controls the output to the serial data (sda) and serial clock (scl) lines of the i 2 c. the scl output is pulled low as determined by the internal clock generated in the clock module. the sda output can only change at the midpoint of a low cycle of the scl, unless it is performing a start, stop, or restart condition. otherwise, the sda output is held constant. the sda signal is pulled low when one or more of the following conditions are true in either master or slave mode:  master mode ? data bit (transmit) ? ack bit (receive) ? start condition ? stop condition ? restart condition  slave mode ? acknowledging address match ? data bit (transmit) ? ack bit (receive)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 11-14 freescale semiconductor i 2 c interface the scl signal corresponds to the internal scl signal when one or more of the following conditions are true in either master or slave mode:  master mode ? bus owner ? lost arbitration ? start condition ? stop condition ? restart condition begin ? restart condition end  slave mode ? address cycle ? transmit cycle ? ack cycle 11.4.1.6 address compare?implementation details address compare block determines if a slave has been properly addressed, either by its slave address or by the general broadcast address (which addresses all slaves). the three performed address comparisons are described as follows:  whether a broadcast message has been received, to update the i2csr  whether the module has been addressed as a slave, to update the i2csr and to generate an interrupt  if the address transmitted by the current master matches the general broadcast address 11.4.2 arbitration procedure the i 2 c interface is a true multiple-master bus that allows more than one master device to be connected on it. if two or more masters simultaneously try to control the bus, each master?s clock synchronization procedure (including the i 2 c module) determines the bus clock?the low period is equal to the longest clock low period and the high is equal to the shortest one among the masters. a bus master loses arbitration if it transmits a logic 1 on sda while another master transmits a logic 0. the losing masters immediately switch to slave-receive mode and stop driving the sda line. in this case, the transition from master to slave mode does not generate a stop condition. meanwhile, the i 2 c unit sets the i2csr[mal] status bit to indicate the loss of arbitration and, as a slave, services the transaction if it is directed to itself.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 11-15 if the i 2 c module is enabled in the middle of an ongoing byte transfer, the interface behaves as follows:  slave mode?the i 2 c module ignores the current transfer on the bus and starts operating whenever a subsequent start condition is detected.  master mode?the i 2 c module cannot tell whether the bus is busy; therefore, if a start condition is initiated, the current bus cycle can be corrupted. this ultimately results in the current bus master of the i 2 c interface losing arbitration, after which bus operations return to normal. 11.4.2.1 arbitration control the arbitration control block controls the arbitration procedure of the master mode. a loss of arbitration occurs whenever the master detects a 0 on the external sda line while attempting to drive a 1, tries to generate a start or restart at an inappropriate time, or detects an unexpected stop request on the line. in master mode, arbitration by the master is lost (and i2csr[mal] is set) under the following conditions:  sda samples low when the master drives high during an address or data-transmit cycle (transmit).  sda samples low when the master drives high during a data-receive cycle of the acknowledge (ack) bit (receive).  a start condition is attempted when the bus is busy.  a repeated start condition is requested in slave mode.  a start condition is attempted when the requesting device is not the bus owner  unexpected stop condition detected note that the i 2 c module does not automatically retry a failed transfer attempt. 11.4.3 handshaking the clock synchronization mechanism can be used as a handshake in data transfer. slave devices can hold scl low after completion of a 1-byte transfer (9 bits). in such cases, it halts the bus clock and forces the master clock into wait states until the slave releases the scl line. 11.4.4 clock control the clock control block handles requests from the clock signal for transferring and controlling data for multiple tasks.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 11-16 freescale semiconductor i 2 c interface a 9-cycle data transfer clock is requested for the following conditions:  master mode ? transmit slave address after start condition ? transmit slave address after restart condition ? transmit data ? receive data  slave mode ? transmit data ? receive data ? receive slave address after start or restart condition 11.4.4.1 clock synchronization due to the wire and logic on the scl line, a high-to-low transition on the scl line affects all devices connected on the bus. the devices begin counting their low period when the master drives the scl line low. after a device has driven scl low, it holds the scl line low until the clock high state is reached. however, the change of low-to-high in a device clock may not change the state of the scl line if another device is still within its low period. therefore, the synchronized clock signal, scl, is held low by the device with the longest low period. devices with shorter low periods enter a high wait state during this time. when all devices concerned have counted off their low period, the synchronized scl line is released and pulled high. then there is no difference between the devices? clocks and the state of the scl line, and all the devices begin counting their high periods. the first device to complete its high period pulls the scl line low again. 11.4.4.2 input synchronization and digital filter the following sections describes the synchronizing of the input signals, and the filtering of the scl and sda lines in detail. 11.4.4.2.1 input signal synchronization the input synchronization block synchronizes the input scl and sda signals to the system clock and detects transitions of these signals. 11.4.4.2.2 filtering of scl and sda lines the scl and sda inputs are filtered to eliminate noise. three consecutive samples of the scl and sda lines are compared to a pre-determined sampling rate. if they are all high, the output of the filter is high. if they are all low, the output is low. if they are any combination of highs and lows, the output is whatever the value of the line was in the previous clock cycle.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 11-17 the sampling rate is equal to a binary value stored in the frequency register i2cdfsrr. the duration of the sampling cycle is controlled by a down counter. this allows a software write to the frequency register to control the filtered sampling rate. 11.4.4.3 clock stretching slaves can use the clock synchronization mechanism to slow down the transfer bit rate. after the master has driven the scl line low, the slave can drive scl low for the required period and then release it. if the slave scl low period is greater than the master scl low period, then the resulting scl bus signal low period is stretched. 11.4.5 boot sequencer mode if boot sequencer mode is selected on por (by the settings on the lgpl3 and lgpl5 reset configuration signals, as described in section 4.4.3.6, ?boot sequencer configuration? ), the i 2 c module communicates with one or more eeproms through the i 2 c interface. the eeprom(s) can be programmed to initialize one or more configuration registers of this integrated device. the boot sequencer mode also supports an extension of the standard i 2 c interface that uses more address bits to allow for eeprom devices that have more than 256 bytes, and this extended addressing mode is selectable during por with a different encoding on the lgpl3 and lgpl5 reset configuration signals (see section 4.4.3.6, ?boot sequencer configuration? ). in this mode, only one eeprom device may be used, and the maximum number of registers is limited by the size of the eeprom. if the standard i 2 c interface is used, the i 2 c module addresses the first eeprom, and reads 256 bytes. then it issues a repeated start and addresses the next eeprom address. this sequence continues until the cont bit is cleared. if the last register is not detected before wrapping back to the first address, an error condition is detected. in other words, if the cont bit for not cleared on the final 7 bytes, an error condition is detected, causing the device to hang and the hreset_req signal to assert externally. the i 2 c module continues to read from the eeprom as long as the continue (cont) bit is set in the eeprom. the cont bit resides in the address/attributes field that is transferred from the eeprom, as described in section 11.4.5.1, ?eeprom calling address.? there should be no other i 2 c traffic when the boot sequencer is active. note that as described in section 4.4.3.6, ?boot sequencer configuration,? the default value for the lgpl3 and lgpl5 reset configuration pins is 0b11, which corresponds to the i 2 c boot sequencer being disabled at power-up. 11.4.5.1 eeprom calling address the MPC8540 uses 0b101_0000 for the eeprom calling address. the first eeprom to be addressed must be programmed to respond to this address, or an error is generated. if more eeproms are used, they are addressed in sequential order.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 11-18 freescale semiconductor i 2 c interface 11.4.5.2 eeprom data format the i 2 c module expects that a particular data format be used for data in the eeprom. a preamble should be the first 3 bytes programmed into the eeprom. it should have a value of 0xaa55aa. the i 2 c module checks to ensure that this preamble is correctly detected before proceeding further. following the preamble, there should be a series of configuration registers (known as register preloads) programmed into the eeprom. each configuration register should be programmed according to a particular format, as shown in figure 11-9 . the first 3 bytes hold the attributes and address offset, as follows. the attributes contained are alternate configuration space (acs), byte enables, and continue (cont). the boot sequencer expects the address offset to be a 32-bit (word) offset, that is, the 2 low-order bits are not included in the boot sequencer command. for example, to access lawbar0 (byte offset of 0x00c08), the boot sequencer addr[0:17] should be set to 0x00302. after the first 3 bytes, 4 bytes of data should hold the desired value of the configuration register, regardless of the size of the transaction. byte enables should be asserted for any byte that will be written to the configuration register, and they should be asserted contiguously, creating a 1-, 2-, or 4-byte write to a register. the boot sequencer assumes that a big-endian address is stored in the eeprom. in addition, byte enable bit 0 (bit 1 of the byte) corresponds to the most-significant byte of data (data[0:7]), and byte enable bit 3 (bit 4 of the byte) corresponds to the lsb of data (data[24:31]). by setting acs, an alternate configuration space address is prepended to the write request from the boot sequencer. otherwise, ccsrbar is prepended to the eeprom address. if cont is cleared, the first 3 bytes, including acs, the byte enables, and the address, must also be cleared. also, the data contains the final cyclic redundancy check (crc). a crc-32 algorithm is used to check the integrity of the data. the polynomial used is: 1 + x 1 + x 2 + x 4 + x 5 + x 7 + x 8 + x 10 + x 11 + x 12 + x 16 + x 22 + x 23 + x 26 + x 32 crc values are calculated using the above polynomial with a start value of 0xffff_ffff and an xor with 0x0000_0000. the crc should cover all bytes stored in the eeprom prior to the crc. this includes the preamble, all register preloads, and the first 3 bytes of the last 7-byte preload (which should be all zeros). if a preamble or crc fail is detected, the device hangs and the external hreset_req signal asserts. if there is a preamble fail, the boot sequencer may continue to pull i 2 c pins low until a hard reset occurs.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 11-19 figure 11-10 shows an example of the eeprom contents, including the preamble, data format, and crc. 01 4 5 67 acs byte_en cont addr[0?1] addr[2?9] addr[10?17] data[0?7] data[8?15] data[16?23] data[24?31] figure 11-9. eeprom data format for one register preload command 01234567 10101010 preamble 01010101 10101010 acs byte_en 1 addr[0?1] first configuration preload command addr[2?9] addr[10?17] data[0?7] data[8?15] data[16?23] data[24?31] acs byte_en 1 addr[0?1] second configuration preload command addr[2?9] addr[10?17] data[0?7] data[8?15] data[16?23] data[24?31] . . . figure 11-10. eeprom contents
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 11-20 freescale semiconductor i 2 c interface 11.5 initialization/application information this section describes some programming guidelines recommended for the i 2 c interface. figure 11-11 is a recommended flowchart for i 2 c interrupt service routines. the i 2 c registers in this chapter are shown in big-endian format. if the system is in little-endian mode, software must swap the bytes appropriately. this appropriate byte swapping is needed as i 2 c registers are byte registers. also, an msync assembly instruction must be executed after each i 2 c register read/write access to guarantee in-order execution. the i 2 c controller does not guarantee its recovery from all illegal i 2 c bus activity. in addition, a malfunctioning device may hold the bus captive. a good programming practice is for software to rely on a watchdog timer to help recover from i 2 c bus hangs. the recovery routine should also handle the case when the status bits returned after an interrupt are not consistent with what was expected due to illegal i 2 c bus protocol behavior. 11.5.1 initialization sequence a hard reset initializes all the i 2 c registers to their default states. the following initialization sequence initializes the i 2 c unit: 1. all i 2 c registers must be located in a cache-inhibited page. 2. update i2cfdr[fdr] and select the required division ratio to obtain the scl frequency from the ccb (platform) clock. acs byte_en 1 addr[0?1] last configuration preload command addr[2?9] addr[10?17] data[0?7] data[8?15] data[16?23] data[24?31] 00000000 end command 00000000 00000000 crc[0?7] cyclic redundancy check crc[8?15] crc[16?23] crc[24?31] figure 11-10. eeprom contents (continued)
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 11-21 3. update i2cadr to define the slave address for this device. 4. modify i2ccr to select master/slave mode, transmit/receive mode, and interrupt-enable or disable. 5. set the i2ccr[men] to enable the i 2 c interface. 11.5.2 generation of start after initialization, the following sequence can be used to generate start: 1. if the device is connected to a multimaster i 2 c system, test the state of i2csr[mbb] to check whether the serial bus is free (i2csr[mbb] = 0) before switching to master mode. 2. select master mode (set i2ccr[msta]) to transmit serial data and select transmit mode (set i2ccr[mtx]) for the address cycle. 3. write the slave address being called into i2cdr. the data written to i2cdr[0?6] comprises the slave calling address. i2ccr[mtx] indicates the direction of transfer (transmit/receive) required from the slave. the scenario above assumes that the i 2 c interrupt bit (i2csr[mif]) is cleared. if mif is set at any time, an i 2 c interrupt is generated (provided interrupt reporting is enabled with i2ccr[mien] =1) so that the i 2 c interrupt handler can handle the interrupt. 11.5.3 post-transfer software response transmission or reception of a byte automatically sets the data transferring bit (i2csr[mcf]), which indicates that one byte has been transferred. the i 2 c interrupt bit (i2csr[mif]) is also set and an interrupt is generated to the processor if the interrupt function is enabled during the initialization sequence (i2ccr[mien] is set). in the interrupt handler, software must take the following steps: 1. clear i2csr[mif] 2. read the contents of the i 2 c data register (i2cdr) in receive mode or write to i2cdr in transmit mode. note that this causes i2csr[mcf] to be cleared. see section 11.5.8, ?interrupt service routine flowchart.? when an interrupt occurs at the end of the address cycle, the master remains in transmit mode. if master receive mode is required, i2ccr[mtx] must be toggled at this stage. see section 11.5.8, ?interrupt service routine flowchart.? if the interrupt function is disabled, software can service the i2cdr in the main program by monitoring i2csr[mif]. in this case, i2csr[mif] must be polled rather than i2csr[mcf] because mcf behaves differently when arbitration is lost. note that interrupt or other bus conditions may be detected before the i 2 c signals have time to settle. thus, when polling
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 11-22 freescale semiconductor i 2 c interface i2csr[mif] (or any other i2csr bits), software delays may be needed in order to give the i 2 c signals sufficient time to settle. during slave-mode address cycles (i2csr[maas] is set), i2csr[srw] should be read to determine the direction of the subsequent transfer and i2ccr[mtx] should be programmed accordingly. for slave-mode data cycles (maas is cleared), i2csr[srw] is not valid and i2ccr[mtx] must be read to determine the direction of the current transfer. see section 11.5.8, ?interrupt service routine flowchart,? for more details. 11.5.4 generation of stop a data transfer ends with a stop condition generated by the master device. a master transmitter can generate a stop condition after all the data has been transmitted. if a master receiver wants to terminate a data transfer, it must inform the slave transmitter by not acknowledging the last byte of data (by setting the transmit acknowledge bit (i2ccr[txak])) before reading the next-to-last byte of data. at this time, the next-to-last byte of data has already been transferred on the i 2 c interface, so the last byte will not receive the data acknowledge (because i2ccr[txak] is set). for 1-byte transfers, a dummy read should be performed by the interrupt service routine (see section 11.5.8, ?interrupt service routine flowchart? ). before the interrupt service routine reads the last byte of data, a stop condition must first be generated. the i 2 c controller automatically generates a stop if i2ccr[txak] is set. therefore, i2ccr[txak] must be set before allowing the i 2 c module to receive the last data byte on the i 2 c bus. eventually, i2ccr[txak] needs to be cleared again for subsequent i 2 c transactions. this can be accomplished when setting up the i2ccr for the next transfer. 11.5.5 generation of repeated start at the end of a data transfer, if the master still wants to communicate on the bus, it can generate another start condition followed by another slave address without first generating a stop condition. this is accomplished by setting i2ccr[rsta]. 11.5.6 generation of scl when sda low it is sometimes necessary to force the i 2 c module to become the i 2 c bus master out of reset and drive scl (even though sda may already be driven, which indicates that the bus is busy). this can occur when a system reset does not cause all i 2 c devices to be reset. thus, sda can be driven low by another i 2 c device while this i 2 c module is coming out of reset and will stay low indefinitely. the following procedure can be used to force this i 2 c module to generate scl so that the device driving sda can finish its transaction: 1. disable the i 2 c module and set the master bit by setting i2ccr to 0x20 2. enable the i 2 c module by setting i2ccr to 0xa0
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 11-23 3. read the i2cdr 4. return the i 2 c module to slave mode by setting i2ccr to 0x80 11.5.7 slave mode interrupt service routine in the slave interrupt service routine, the module addressed as a slave should be tested to check if a calling of its own address has been received. if i2csr[maas] is set, software should set the transmit/receive mode select bit (i2ccr[mtx]) according to the r/w command bit (i2csr[srw]). writing to i2ccr clears maas automatically. maas is read as set only in the interrupt handler at the end of that address cycle where an address match occurred; interrupts resulting from subsequent data transfers clear maas. a data transfer can then be initiated by writing to i2cdr for slave transmits or dummy reading from i2cdr in slave-receive mode. the slave drives scl low between byte transfers. scl is released when the i2cdr is accessed in the required mode. 11.5.7.1 slave transmitter and received acknowledge in the slave transmitter routine, the received acknowledge bit (i2csr[rxak]) must be tested before sending the next byte of data. the master signals an end-of-data by not acknowledging the data transfer from the slave. when no acknowledge is received (i2csr[rxak] is set), the slave transmitter interrupt routine must clear i2ccr[mtx] to switch the slave from transmitter to receiver mode. a dummy read of i2cdr then releases scl so that the master can generate a stop condition. see section 11.5.8, ?interrupt service routine flowchart.? 11.5.7.2 loss of arbitration and forcing of slave mode when a master loses arbitration the following conditions all occur:  i2csr[mal] is set  i2ccr[msta] is cleared (changing the master to slave mode)  an interrupt occurs (if enabled) at the falling edge of the 9th clock of this transfer thus, the slave interrupt service routine should first test i2csr[mal] and software should clear it if it is set. see section 11.4.2.1, ?arbitration control,? for more information. 11.5.8 interrupt service routine flowchart figure 11-11 shows an example algorithm for an i 2 c interrupt service routine. deviation from the flowchart may result in unpredictable i 2 c bus behavior. however, in the slave receive mode (not shown), the interrupt service routine may need to set i2ccr[txak] when the next-to-last byte is to be accepted. it is recommended that an msync instruction follow each i 2 c register read or write to guarantee in-order instruction execution.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 11-24 freescale semiconductor i 2 c interface figure 11-11. example i 2 c interrupt service routine flowchart clear i2csr[mif] i2ccr[msta] == 0 == 1 i2csr[mal] i2ccr[mtx] == 1 == 1 == 0 clear i2csr[mal] eoi i2csr[maas] i2csr[srw] set i2ccr[mtx] == 0 clear i2ccr[mtx] write i2cdr dummy read eoi == 1 slave addr. phase slave data cycle i2ccr[mtx] == 1 == 0 slave xmit i2csr[rxak] == 1 == 0 write next byte to i2cdr eoi slave received read i2cdr and store all done y n set i2ccr[txak] read i2cdr (dummy read) y n last byte next-to-last generate read i2cdr and store eoi y n set master rcv stop i2ccr[txak] byte last byte yn i2csr[rxak] == 1 write next byte to i2cdr == 0 eoi generate master xmit stop b == 0 == 1 a == 0 a b i2csr[maas] b == 0 == 1 clear i2ccr[mtx] end of address phase for master receive mode? n only one byte to receive? y y set i2ccr[txak] read i2cdr (dummy read) clear i2ccr[mtx] n
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 12-1 chapter 12 duart this chapter describes the dual universal asynchronous receiver/transmitters (duart) of the MPC8540. it describes the functional operation, the duart initialization sequence, and the programming details for the duart registers and features. 12.1 overview the duart of the MPC8540 consists of two universal asynchronous receiver/transmitters (uarts). the uarts act independently; all references to uart refer to one of these receiver/transmitters. each uart is clocked by the core complex bus (ccb) clock. the duart programming model is compatible with the pc16552d. the uart interface is point to point, meaning that only two uart devices are attached to the connecting signals. as shown in figure 12-1 , each uart module consists of the following:  receive and transmit buffers  clear to send (cts ) input port and request to send (rts ) output port for data flow control  16-bit counter for baud rate generation  interrupt control logic
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 12-2 freescale semiconductor duart figure 12-1. uart block diagram 12.1.1 features the duart includes these distinctive features:  full-duplex operation  programming model compatible with the original pc16450 uart and the pc16550d (an improved version of the pc16450 that also operates in fifo mode)  pc16450 register reset values  fifo mode for both transmitter and receiver, providing 16-byte fifos  serial data encapsulation and decapsulation with standard asynchronous communication bits (start, stop, and parity)  maskable transmit, receive, line status, and modem status interrupts  software-programmable baud generators that divide the ccb clock by 1 to (2 16 ? 1) and generate a 16x clock for the transmitter and receiver engines  clear to send (cts ) and ready to send (rts ) modem control functions  software-selectable serial interface data format (data length, parity, 1/1.5/2 stop bit, baud rate)  line and modem status registers  line-break detection and generation receive buffer input port output port uart module internal bus address bus control data 16-bit counter/ baud rate generator rts sin sout interrupt control logic control transmit buffer cts ccb_clk hreset int
external signal descriptions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 12-3  internal diagnostic support, local loopback, and break functions  prioritized interrupt reporting  overrun, parity, and framing error detection 12.1.2 modes of operation the communication channel provides a full-duplex asynchronous receiver and transmitter using an operating frequency derived from the ccb clock. the transmitter accepts parallel data from a write to the transmitter holding register (uthr). in fifo mode, the data is placed directly into an internal transmitter shift register of the transmitter fifo. the transmitter converts the data to a serial bit stream inserting the appropriate start, stop, and optional parity bits. finally, it outputs a composite serial data stream on the channel transmitter serial data output signal (sout). the transmitter status may be polled or interrupt driven. the receiver accepts serial data bits on the channel receiver serial data input signal (sin), converts it to parallel format, checks for a start bit, parity (if any), stop bits, and transfers the assembled character (with start, stop, parity bits removed) from the receiver buffer (or fifo) in response to a read of the uart?s receiver buffer register (urbr). the receiver status may be polled or interrupt driven. 12.2 external signal descriptions this section contains a signal overview and detailed signal descriptions. 12.2.1 signal overview table 12-1 summarizes the duart signals. note that although the actual device signal names are prepended with the uart_ prefix as shown in the table, the functional (abbreviated) signal names are often used throughout this chapter. 12.2.2 detailed signal descriptions the eight duart signals are described in detail in table 12-2 . table 12-1. duart signal overview signal name i/o pins reset value state meaning uart_sin[0:1] i 2 1 serial in data uart0 and uart1 uart_sout[0:1] o 2 1 serial out data uart0 and uart1 uart_cts [0:1] i 2 1 clear to send uart0 and uart1 uart_rts [0:1] o 2 1 request to send uart0 and uart1
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 12-4 freescale semiconductor duart 12.3 memory map/register definition there are two complete sets of duart registers (one for uart0 and one for uart1). the two uarts on the device are identical, except that the registers for uart0 are located at offsets 0x0_4500 (local), and the registers for uart1 are located at offsets 0x0_4600 (local). throughout this chapter, the registers are described by a singular acronym: for example, lcr represents the line control register for either uart0 or uart1. the 14 registers in each uart interface are used for configuration, control, and status. the divisor latch access bit, ulcr[dlab], is used to access the divisor latch least- and most-significant bit registers and the alternate function register. refer to section 12.3.1.7, ?line control registers (ulcr0, ulcr1),? for more information on ulcr[dlab]. all the duart registers are one byte wide. reads and writes to these registers must be byte-wide operations. table 12-3 provides a register summary with references to the section and page that table 12-2. duart signals?detailed signal descriptions signal i/o description uart_sin[0:1] i serial data in. data is received on the receivers of uart0 and uart1 through its respective serial data input signal, with the least-significant bit received first. state meaning asserted/negated?represents the data being received on the uart interface. timing assertion/negation?an internal logic sample signal, rxcnt , uses the frequency of the baud-rate generator to sample the data on sin. uart_sout[0:1] o serial data out. the serial data output signals for the uart0 and uart1 are set ('mark' condition) when the transmitter is disabled, idle, or operating in the local loop-back mode. data is shifted out on these signals, with the least significant bit transmitted first. state meaning asserted/negated?represents the data being transmitted on the respective uart interface. timing assertion/negation? an internal logic sample signal, rxcnt , uses the frequency of the baud-rate generator to update and drive the data on sout. uart_cts [0:1] i clear to send. these active-low inputs are the clear-to-send inputs. they are connected to the respective rts outputs of the other uart devices on the bus. they can be programmed to generate an interrupt on change-of-state of the signal. state meaning asserted/negated?represent the clear to send condition for their respective uart. timing assertion/negation?sampled at the rising edge of every ccb clock. uart_rts [0:1] o request to send. uart_rts x are active-low output signals that can be programmed to be automatically negated and asserted by either the receiver or transmitter. when connected to the clear-to-send (cts ) input of a transmitter, this signal can be used to control serial data flow. state meaning asserted/negated?represents the data being transmitted on the respective uart interface. timing assertion/negation?updated and driven at the rising edge of every ccb clock.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 12-5 contains detailed information about each register. undefined byte address spaces within offset 0x000?0xfff are reserved. table 12-3. duart register summary offset register access reset section/page 0x0_4500 urbr?ulcr[dlab] = 0 uart0 receiver buffer register r 0x00 12.3.1.1/12-6 0x0_4500 uthr?ulcr[dlab] = 0 uart0 transmitter holding register w 0x00 12.3.1.2/12-6 0x0_4500 udlb?ulcr[dlab] = 1 uart0 divisor least significant byte register r/w 0x00 12.3.1.3/12-7 0x0_4501 uier?ulcr[dlab] = 0 uart0 interrupt enable register r/w 0x00 12.3.1.4/12-9 0x0_4501 udmb?ulcr[dlab] = 1 uart0 divisor most significant byte register r/w 0x00 12.3.1.3/12-7 0x0_4502 uiir?ulcr[dlab] = 0 uart0 interrupt id register r 0x01 12.3.1.5/12-10 0x0_4502 ufcr?ulcr[dlab] = 0 uart0 fifo control register w 0x00 12.3.1.6/12-11 0x0_4502 uafr?ulcr[dlab] = 1 uart0 alternate function register r/w 0x00 12.3.1.12/12-17 0x0_4503 ulcr?ulcr[dlab] = x uart0 line control register r/w 0x00 12.3.1.7/12-12 0x0_4504 umcr?ulcr[dlab] = x uart0 modem control register r/w 0x00 12.3.1.8/12-14 0x0_4505 ulsr?ulcr[dlab] = x uart0 line status register r 0x60 12.3.1.9/12-15 0x0_4506 umsr?ulcr[dlab] = x uart0 modem status register r 0x00 12.3.1.10/12-16 0x0_4507 uscr?ulcr[dlab] = x uart0 scratch register r/w 0x00 12.3.1.11/12-17 0x0_4510 udsr?ulcr[dlab] = x uart0 dma status register r 0x01 12.3.1.13/12-18 0x0_4600 urbr?ulcr[dlab] = 0 uart1 receiver buffer register r 0x00 12.3.1.1/12-6 0x0_4600 uthr?ulcr[dlab] = 0 uart1 transmitter holding register w 0x00 12.3.1.2/12-6 0x0_4600 udlb?ulcr[dlab] = 1 uart1 divisor least significant byte register r/w 0x00 12.3.1.3/12-7 0x0_4601 uier?ulcr[dlab] = 0 uart1 interrupt enable register r/w 0x00 12.3.1.4/12-9 0x0_4601 udmb_ulcr[dlab] = 1 uart1 divisor most significant byte register r/w 0x00 12.3.1.3/12-7 0x0_4602 uiir?ulcr[dlab] = 0 uart1 interrupt id register r 0x01 12.3.1.5/12-10 0x0_4602 ufcr?ulcr[dlab] = 0 uart1 fifo control register w 0x00 12.3.1.6/12-11 0x0_4602 uafr?ulcr[dlab] = 1 uart1 alternate function register r/w 0x00 12.3.1.12/12-17 0x0_4603 ulcr?ulcr[dlab] = x uart1 line control register r/w 0x00 12.3.1.7/12-12 0x0_4604 umcr?ulcr[dlab] = x uart1 modem control register r/w 0x00 12.3.1.8/12-14 0x0_4605 ulsr?ulcr[dlab] = x uart1 line status register r 0x60 12.3.1.9/12-15 0x0_4606 umsr?ulcr[dlab] = x uart1 modem status register r 0x00 12.3.1.10/12-16 0x0_4607 uscr?ulcr[dlab] = x uart1 scratch register r/w 0x00 12.3.1.11/12-17 0x0_4610 udsr?ulcr[dlab] = x uart1 dma status register r 0x01 12.3.1.13/12-18
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 12-6 freescale semiconductor duart 12.3.1 register descriptions the following sections describe the MPC8540 uart0 and uart1 registers. 12.3.1.1 receiver buffer registers (urbr0, urbr1) these registers contain the data received from the transmitter on the uart buses. in fifo mode, when read, they return the first byte received. for fifo status information, refer to the udsr[rxrdy] description. except for the case when there is an overrun, urbr returns the data in the order it was received from the transmitter. refer to the ulsr[oe] description, section 12.3.1.9, ?line status registers (ulsr0, ulsr1).? figure 12-3 shows the receiver buffer registers. note that these registers have same offset as the uthrs. figure 12-2 shows the bits in the urbrs. table 12-4 describes the fields of urbr. 12.3.1.2 transmitter holding registers (uthr0, uthr1) a write to these 8-bit registers causes the uart devices to transfer 5?8 data bits on the uart bus in the format set up in the ulcr (line control register). in fifo mode, data written to uthr is placed into the fifo. the data written to uthr is the data sent onto the uart bus, and the first byte written to uthr will be the first byte onto the bus. udsr[txrdy ] indicates when the fifo is full. refer to the table 12-21 and the table 12-22 for more details. 07 rdata w reset 0x00 offset 0x0_4500, 0x0_4600 figure 12-2. receiver buffer registers (urbr0, urbr1) table 12-4. urbr field definition bits name description 0?7 data data received from the transmitter on the uart bus (read only)
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 12-7 figure 12-3 shows the bits in the uthrs. table 12-5 describes the fields of uthr. 12.3.1.3 divisor most and least significant byte registers (udmb and udlb) the divisor least significant byte register (udlb) is concatenated with the divisor most significant byte register (udmb) to create the divisor used to divide the input clock into the duart. the output frequency of the baud generator is 16 times the baud rate; therefore the desired baud rate = platform clock frequency / (16 [udmb||udlb]). equivalently, tt [udmb||udlb:0b0000]t = platform clock frequency / desired baud rate. baud rates that can be generated by specific input clock frequencies are shown in table 12-8 . figure 12-4 shows the bits in the udmbs. table 12-6 describes the fields of udmb registers. 07 r wdata reset 0x00 offset 0x0_4500, 0x0_4600 figure 12-3. transmitter holding registers (uthr0, uthr1) table 12-5. uthr field definition bits name description 0?7 data data that is written to uthr (write only) 07 r udmb w reset 0x00 offset 0x0_4501, 0x0_4601 figure 12-4. divisor most significant byte registers (udmb0, udmb1) table 12-6. udmb field definition bits name description 0?7 udmb divisor most-significant byte
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 12-8 freescale semiconductor duart figure 12-5 shows the bits in the udlbs. table 12-7 describes the fields of udlb registers. table 12-8 shows baud rate when the input clock is at certain frequencies. to get the percent error value, the following three steps are taken: 1. the input clock frequency (icf) is divided by the actual frequency input (afi) to get the correct divisor value (icf/afi where afi = baud rate 16). 2. the divisor value is subtracted from 1. 07 r udlb w reset 0x00 offset 0x0_4500, 0x0_4600 figure 12-5. divisor least significant byte registers (udlb0, udlb1) table 12-7. udlb field definition bits name description 0?7 udlb divisor least-significant byte. this is concatenated with udmb. table 12-8. baud rate examples baud rate (decimal) divisor input clock(ccb) frequency (mhz) percent error (decimal) decimal hex 9,600 1736 6c8 266 0.0064 19,200 868 364 266 0.0064 38,400 434 1b2 266 0.0064 56,000 298 12a 266 0.1280 128,000 130 82 266 0.1600 256,000 65 41 266 0.1600 9,600 2170 87a 333 0.0064 19,200 1085 43d 333 0.0064 38,400 543 21f 333 0.0858 56,000 372 174 333 0.0064 128,000 163 a3 333 0.1472 256,000 81 51 333 0.4672
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 12-9 3. the result from step two is multiplied by 100 to calculate the final percent error. the result is calculated in absolute value (no negative numbers). these steps can be described with the following equation: percent error value = (1 ? afi/icf) 100 12.3.1.4 interrupt enable register (uier) the uier gives the user the ability to mask specific uart interrupts to the MPC8540 programmable interrupt controller (pic). figure 12-6 shows the bits in the uier. table 12-9 describes the fields of uier. 0 34567 r emsi erlsi ethrei erdai w reset 0x00 offset 0x0_4501, 0x0_4601 figure 12-6. interrupt enable register (uier) table 12-9. uier field definitions bits name description 0?3 ? reserved 4 emsi enable modem status interrupt 0 mask interrupts caused by umsr[dcts] being set 1 enable and assert interrupts when the clear-to-send bit in the uart modem status register (umsr) changes state 5 erlsi enable receiver line status interrupt 0 mask interrupts when ulsr?s overrun, parity error, framing error or break interrupt bits are set 1 enable and assert interrupts when ulsr?s overrun, parity error, framing error or break interrupt bits are set 6 ethrei enable transmitter holding register empty interrupt 0 mask interrupt when ulsr[thre] is set 1 enable and assert interrupts when ulsr[thre] is set 7 erdai enable received data available interrupt 0 mask interrupt when new receive data is available or receive data time out has occurred 1 enable and assert interrupts when a new data character is received from the external device and/or a time-out interrupt occurs in the fifo mode
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 12-10 freescale semiconductor duart 12.3.1.5 interrupt id registers (uiir0, uiir1) the uiirs indicate when an interrupt is pending from the corresponding uart and what type of interrupt is active. they also indicate if the fifos are enabled. the duart prioritizes interrupts into four levels and records these in the corresponding uiir. the four levels of interrupt conditions in order of priority are: 1. receiver line status 2. received data ready/character time-out 3. transmitter holding register empty 4. modem status see table 12-11 for more details. when the uiir is read, the associated duart serial channel freezes all interrupts and indicates the highest priority pending interrupt. while this read transaction is occurring, the associated duart serial channel records new interrupts, but does not change the contents of uiir until the read access is complete. figure 12-7 shows the bits in the uiir. table 12-10 describes the fields of the uiir. 01234567 r fe ? iid3 iid2 iid1 iid0 w reset 0x01 offset 0x0_4502, 0x0_4602 figure 12-7. interrupt id registers (uiir) table 12-10. uiir field definitions bits name description 0?1 fe fifos enabled. reflects the setting of ufcr[fen] 2?3 ? reserved 4 iid3 interrupt id bits identify the highest priority interrupt that is pending as indicated in table 12-11 . iid3 is set along with iid2 only when a timeout interrupt is pending for fifo mode. 5?6 iid2?1 interrupt id bits identify the highest priority interrupt that is pending as indicated in table 12-11 . 7 iid0 iid0 indicates when an interrupt is pending. 0 the uart has an active interrupt ready to be serviced. 1 no interrupt is pending.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 12-11 the bits contained in the uiir registers are described in table 12-11 . 12.3.1.6 fifo control registers (ufcr0, ufcr1) the ufcr, a write-only register, is used to enable and clear the receiver and transmitter fifos, set a receiver fifo trigger level to control the received data available interrupt, and select the type of dma signaling. when the ufcr bits are written, the fifo enable bit must also be set or else the ufcr bits are not programmed. when changing from fifo mode to 16450 mode (non-fifo mode) and vice versa, data is automatically cleared from the fifos. after all the bytes in the receiver fifo are cleared, the receiver internal shift register is not cleared. similarly, the bytes are cleared in the transmitter fifo, but the transmitter internal shift register is not cleared. both tfr and rfr are self-clearing bits. figure 12-8 shows the bits in the ufcrs. table 12-11. uiir iid bits summary iid bits iid[3?0] priority level interrupt type interrupt description how to reset interrupt 0b0001 ? ? ? ? 0b0110 highest receiver line status overrun error, parity error, framing error, or break interrupt read the line status register. 0b0100 second received data available receiver data available or trigger level reached in fifo mode read the receiver buffer register or interrupt is automatically reset if the number of bytes in the receiver fifo drops below the trigger level. 0b1100 second character time-out no characters have been removed from or input to the receiver fifo during the last 4 character times and there is at least one character in the receiver fifo during this time. read the receiver buffer register. 0b0010 third uthr empty transmitter holding register is empty read the uiir or write to the uthr. 0b0000 fourth modem status cts input value changed since last read of umsr read the umsr. 01234567 r w rtl ? dms tfr rfr fen reset 0x00 offset 0x0_4502, 0x0_4602 figure 12-8. fifo control registers (ufcr0, ufcr1)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 12-12 freescale semiconductor duart table 12-12 describes the fields of the ufcrs. 12.3.1.7 line control registers (ulcr0, ulcr1) the ulcrs specify the data format for the uart bus and set the divisor latch access bit ulcr[dlab], which controls the ability to access the divisor latch least and most significant bit registers and the alternate function register. after initializing the ulcr, the software should not re-write the ulcr when valid transfers on the uart bus are active. the software should not re-write the ulcr until the last stop bit has been received and there are no new characters being transferred on the bus. the stick parity bit, ulcr[sp], assigns a set parity value for the parity bit time slot sent on the uart bus. the set value is defined as mark parity (logic 1) or space parity (logic 0). ulcr[pen] and ulcr[eps] help determine the set parity value. see table 12-14 for more information. ulcr[nstb], defines the number of stop bits to be sent at the end of the data transfer. the receiver only checks the first stop bit, regardless of the number of stop bits selected. the word length select bits (1 and 0) define the number of data bits that are transmitted or received as a serial character. the word length does not include start, parity, and stop bits. table 12-12. ufcr field definitions bits name description 0?1 rtl receiver trigger level. a received data available interrupt occurs when uier[erdai] is set and the number of bytes in the receiver fifo equals the designated interrupt trigger level as follows: 00 1 byte 01 4 bytes 10 8 bytes 11 14 bytes 2?3 ? reserved 4 dms dma mode select. see section 12.4.5.2, ?dma mode select,? for more information. 0 udsr[rxrdy] and udsr[txrdy] bits are in mode 0. 1 udsr[rxrdy] and udsr[txrdy] bits are in mode 1 if ufcr[fen] = 1. 5 tfr transmitter fifo reset 0 no action 1 clears all bytes in the transmitter fifo and resets the fifo counter/pointer to 0 6 rfr receiver fifo reset 0 no action 1 clears all bytes in the receiver fifo and resets the fifo counter/pointer to 0 7 fen fifo enable 0 fifos are disabled and cleared 1 enables the transmitter and receiver fifos
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 12-13 figure 12-9 shows the bits in the ulcrs. table 12-13 describes the fields of the ulcrs. 01234567 r dlab sb sp eps pen nstb wls w reset 0x00 offset 0x0_4503, 0x0_4603 figure 12-9. line control register (ulcr) table 12-13. ulcr field definitions bits name description 0 dlab divisor latch access bit 0 access to all registers except udlb, uafr, and udmb 1 ability to access divisor latch least and most significant byte registers and alternate function register (uafr) 1 sb set break 0 send normal uthr data onto the serial output (sout) signal 1 force logic 0 to be on the sout signal. data in the uthr is not affected 2 sp stick parity 0 stick parity is disabled. 1 if pen = 1 and eps = 1, space parity is selected. and if pen = 1 and eps = 0, mark parity is selected. 3 eps even parity select. see table 12-14 for more information. 0 if pen = 1 and sp = 0, odd parity is selected. 1 if pen = 1 and sp = 0, even parity is selected. 4 pen parity enable 0 no parity generation and checking 1 generate parity bit as a transmitter, and check parity as a receiver 5 ntsb number of stop bits 0 one stop bit is generated in the transmitted data. 1 when a 5-bit data length is selected, 1 ? stop bits are generated. when either a 6-, 7-, or 8-bit word length is selected, two stop bits are generated. 6?7 wls word length select. number of bits that comprise the character length. the word length select values are as follows: 00 5 bits 01 6 bits 10 7 bits 11 8 bits
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 12-14 freescale semiconductor duart 12.3.1.8 modem control registers (umcr0, umcr1) the umcrs control the interface with the external peripheral device on the uart bus. figure 12-10 shows the bits in the umcrs. table 12-15 describes the fields of umcrs. . table 12-14. parity selection using ulcr[pen], ulcr[sp], and ulcr[eps] pen sp eps parity selected 000 no parity 001 no parity 010 no parity 011 no parity 1 0 0 odd parity 1 0 1 even parity 110 mark parity 1 1 1 space parity 0 234567 r loop rts w reset 0x00 offset 0x0_4504, 0x0_4604 figure 12-10. modem control register (umcr) table 12-15. umcr field definitions bits name description 0?2 ? reserved 3 loop local loop-back mode 0 normal operation 1 functionally, the data written to uthr can be read from urbr of the same uart, and umcr[rts] is tied to umsr[cts]. 4?5 ? reserved 6 rts ready to send 0 negates corresponding uart_ rts output 1 assert corresponding uart_ rts output. informs external modem or peripheral that the uart is ready for sending/receiving data 7?reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 12-15 12.3.1.9 line status registers (ulsr0, ulsr1) the ulsrs are read-only registers that monitor the status of the data transfer on the uart buses. to isolate the status bits from the proper character received through the uart bus, software should read the ulsr and then the urbr. figure 12-11 shows the bits in the ulsrs. table 12-16 describes the fields of the ulsrs. 01234567 r rfe temt thre bi fe pe oe dr w reset 0x60 offset 0x0_4505, 0x0_4605 figure 12-11. line status register (ulsr) table 12-16. ulsr field definitions bits name description 0 rfe receiver fifo error 0 this bit is cleared when there are no errors in the receiver fifo or on a read of the ulsr with no remaining receiver fifo errors. 1 set to one when one of the characters in the receiver fifo encounters an error (framing, parity, or break interrupt) 1 temt transmitter empty 0 either or both the uthr or the internal transmitter shift register has a data character. in fifo mode, a data character is in the transmitter fifo or the internal transmitter shift register. 1 both the uthr and the internal transmitter shift register are empty. in fifo mode, both the transmitter fifo and the internal transmitter shift register are empty. 2 thre transmitter holding register empty 0 the uthr is not empty. 1 a data character has transferred from the uthr into the internal transmitter shift register. in fifo mode, the transmitter fifo contains no data character. 3 bi break interrupt 0 this bit is cleared when the ulsr is read or when a valid data transfer is detected (that is, stop bit is received). 1 received data of logic 0 for more than start bit + data bits + parity bit + one stop bits length of time. a break condition is expected to last at least two character lengths and a new character is not loaded until sin returns to the mark state (logic 1) and a valid start is detected. in fifo mode, a zero character is encountered in the fifo (the zero character is at the top of the fifo). in fifo mode, only one zero character is stored. note that the ulsr[bi] is set immediately after ulsr is read if bus remains zero and no mark state followed by a valid new character has been detected.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 12-16 freescale semiconductor duart 12.3.1.10 modem status registers (umsr0, umsr1) the umsrs track the status of the modem (or external peripheral device) clear to send (cts ) signal for the corresponding uart. figure 12-12 shows the bits in the umsrs. 4 fe framing error 0 this bit is cleared when ulsr is read or when a new character is loaded into the urbr from the receiver shift register. 1 invalid stop bit for receive data (only the first stop bit is checked). in fifo mode, this bit is set when the character that detected a framing error is encountered in the fifo (that is the character at the top of the fifo). an attempt to resynchronize occurs after a framing error. the uart assumes that the framing error (due to a logic 0 being read when a logic 1 (stop) was expected) was due to a stop bit overlapping with the next start bit, so it assumes this logic 0 sample is a true start bit and then will receive the following new data. 5 pe parity error 0 this bit is cleared when ulsr is read or when a new character is loaded into the urbr. 1 unexpected parity value encountered when receiving data. in fifo mode, the character with the error is at the top of the fifo. 6 oe overrun error 0 this bit is cleared when ulsr is read. 1 before the urbr is read, the urbr was overwritten with a new character. the old character is loss. in fifo mode, the receiver fifo is full (regardless of the receiver fifo trigger level setting) and a new character has been received into the internal receiver shift register. the old character was overwritten by the new character. data in the receiver fifo was not overwritten. 7 dr data ready 0 this bit is cleared when urbr is read or when all of the data in the receiver fifo is read. 1 a character has been received in the urbr or the receiver fifo. 023467 r? cts ? dcts w reset 0x00 offset 0x0_4506, 0x0_4606 figure 12-12. modem status register (umsr) table 12-16. ulsr field definitions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 12-17 table 12-17 describes the fields of the umsrs. 12.3.1.11 scratch registers (uscr0, uscr1) the uscr registers are for debugging software or the duart hardware. the uscrs do not affect the operation of the duart. figure 12-13 shows the bits in uscrs. table 12-18 describes the fields of the uscrs. 12.3.1.12 alternate function registers (uafr0, uafr1) the uafrs give software the ability to write to both uart0 and uart1 registers simultaneously with the same write operation. the uafrs also provide a means for the device?s performance monitor to track the baud clock. table 12-17. umsr field definitions bits name description 0?2 ? reserved 3 cts clear to send. represents the inverted value of the cts input pin from the external peripheral device 0 corresponding cts n is negated 1 corresponding cts n is asserted. the modem or peripheral device is ready for data transfers. 4?6 ? reserved 7 dcts delta clear to send 0 no change on the corresponding cts n signal since the last read of umsr[cts] 1 the cts n value has changed, since the last read of umsr[cts]. causes an interrupt if uier[emsi] is set to detect this condition 0 7 r data w reset 0x00 offset 0x0_4507, 0x0_4607 figure 12-13. scratch register (uscr) table 12-18. uscr field definitions bits name description 0?7 data data
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 12-18 freescale semiconductor duart figure 12-14 shows the bits in the uafrs. table 12-19 describes the fields of the uafrs. 12.3.1.13 dma status registers (udsr0, udsr1) the dma status registers (udsrs) are read-only registers that return transmitter and receiver fifo status. udsrs also provide the ability to assist dma data operations to and from the fifos. figure 12-15 shows the bits in udsrs. 0567 r bo cw w reset 0x00 offset 0x0_4502, 0x0_4602 figure 12-14. alternate function register (uafr) table 12-19. uafr field definitions bits name description 0?5 ? reserved 6 bo baud clock select 0 the baud clock is not gated off. 1 the baud clock is gated off. 7 cw concurrent write enable 0 disables writing to both uart0 and uart1 1 enables concurrent writes to corresponding uart registers. a write to a register in uart0 is also a write to the corresponding register in uart1 and vice versa. 0 567 r txrdy rxrdy w reset 0x01 offset 0x0_4510, 0x0_4610 figure 12-15. dma status register (udsr)
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 12-19 table 12-20 describes the fields of the udsrs. table 12-20. udsr field definitions bits name description 0?5 ? reserved 6 txrdy transmitter ready. this read-only bit reflects the status of the transmitter fifo or the uthr. the status depends on the dma mode selected, which is determined by the dms and fen bits in the ufcr. 0 the bit is cleared, as shown in table 12-22 . 1 this bit is set, as shown in table 12-21 . 7 rxrdy receiver ready. this read-only bit reflects the status of the receiver fifo or urbr. the status depends on the dma mode selected, which is determined by the dms and fen bits in the ufcr. 0 the bit is cleared, as shown in table 12-24 . 1 this bit is set, as shown in table 12-23 . table 12-21. udsr[txrdy] set conditions dms fen dma mode meaning 0 0 0 txrdy is set after the first character is loaded into the transmitter fifo or uthr. 01 0 10 0 1 1 1 txrdy is set when the transmitter fifo is full. table 12-22. udsr[txrdy] cleared conditions dms fen dma mode meaning 0 0 0 txrdy is cleared when there are no characters in the transmitter fifo or uthr. 01 0 10 0 1 1 1 txrdy is cleared when there are no characters in the transmitter fifo or uthr. txrdy remains clear when the transmitter fifo is not yet full. table 12-23. udsr[rxrdy] set conditions dms fen dma mode meaning 0 0 0 rxrdy is set when there are no characters in the receiver fifo or urbr. 01 0 10 0 1 1 1 rxrdy is set when the trigger level has not been reached and there has been no time out.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 12-20 freescale semiconductor duart 12.4 functional description the communication channel provides a full-duplex asynchronous receiver and transmitter using an operating frequency derived from the ccb clock signal. the transmitter accepts parallel data with a write access to the transmitter holding register (uthr). in fifo mode, the data is placed directly into an internal transmitter shift register, or into the transmitter fifo?see section 12.4.5, ?fifo mode.? the transmitting registers convert the data to a serial bit stream, by inserting the appropriate start, stop, and optional parity bits. finally, the registers output a composite serial data stream on the channel transmitter serial data output (sout). the transmitter status may be polled or interrupt-driven. the receiver accepts serial data on the channel receiver serial data input (sin), converts the data into parallel format, and checks for start, stop, and parity bits. in fifo mode, the receiver removes the start, stop, and parity bits and then transfers the assembled character from the receiver buffer, or receiver fifo. this transfer occurs in response to a read of the uart receiver buffer register (urbr). the receiver status may be polled or interrupt driven. 12.4.1 serial interface the uart bus is a serial, full-duplex, point-to-point bus as shown in figure 12-16 . therefore, only two devices are attached to the same signals and there is no need for address or arbitration bus cycles. table 12-24. udsr[rxrdy] cleared dms fen dma mode meaning 0 0 0 rxrdy is cleared when there is at least one character in the receiver fifo or urbr. 01 0 10 0 1 1 1 rxrdy is cleared when the trigger level or a time-out has been reached. rxrdy remains cleared until the receiver fifo is empty.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 12-21 figure 12-16. uart bus interface transaction protocol example a standard uart bus transfer is composed of either three or four parts:  start bit  data transfer bits (least-significant bit is first data bit on the bus)  parity bit (optional)  stop bits an internal logic sample signal, rxcnt , uses the frequency of the baud-rate generator to drive the bits on sout. the following sections describe the four components of the serial interface, the baud-rate generator, local loop-back mode, different errors, and fifo mode. 12.4.1.1 start bit a write to the transmitter holding register (uthr) generates a start bit on the sout signal. figure 12-16 shows that the start bit is defined as a logic 0. the start bit denotes the beginning of a new data transfer which is limited to the bit length programmed in the uart line control register (ulcr).when the bus is idle, sout is high. 12.4.1.2 data transfer each data transfer contains 5?8 bits of data. the ulcr data bit length for the transmitter and receiver uart devices must agree before a transfer begins; otherwise, a parity or framing error may occur. a transfer begins when uthr is written. at that time a start bit is generated followed by 5?8 of the data bits previously written to the uthr. the data bits are driven from the least significant to the most significant bits. after the parity and stop bits, a new data transfer can begin if new data is written to the uthr. 123456789 1 23456789 d6 d5 d4 d3 d2 d1 d0 pty d6 d5 d4 d3 d2 d1 d0 pty rxcnt sout1 start stop bits optional data bits data bits stop bits 10 10 two 7-bit data transmissions with parity and 2-bit stop transactions even/odd parity start optional even/odd parity
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 12-22 freescale semiconductor duart 12.4.1.3 parity bit the user has the option of using even, odd, no parity, or stick parity (see section 12.3.1.7, ?line control registers (ulcr0, ulcr1).? both the receiver and transmitter parity definition must agree before attempting to transfer data. when receiving data a parity error can occur if an unexpected parity value is detected. (see section 12.3.1.9, ?line status registers (ulsr0, ulsr1).? ) 12.4.1.4 stop bit the transmitter device ends the write transfer by generating a stop bit. the stop bit is always high. the user can program the length of the stop bit(s) in the ulcr. both the receiver and transmitter stop bit length must agree before attempting to transfer data. a framing error can occur if an invalid stop bit is detected. 12.4.2 baud-rate generator logic each uart contains an independent programmable baud-rate generator, that is capable of taking the ccb clock input and dividing the input by any divisor from 1 to 2 16 ?1. the baud rate is defined as the number of bits per second that can be sent over the uart bus. the formula for calculating baud rate is as follows: baud rate = (1/16) (ccb clock frequency/divisor value) therefore, the output frequency of the baud-rate generator is 16 times the baud rate. the divisor value is determined by the following two 8-bit registers to form a 16-bit binary number:  uart divisor most significant byte register (udmb)  uart divisor least significant byte register (udlb) upon loading either of the divisor latches, a 16-bit baud-rate counter is loaded. the divisor latches must be loaded during initialization to ensure proper operation of the baud-rate generator. both uart devices on the same bus must be programmed for the same baud-rate before starting a transfer. the baud clock can be passed to the performance monitor by enabling the uafr[bo] bit. this can be used to determine baud rate errors. 12.4.3 local loop-back mode local loop-back mode is provided for diagnostic testing. the data written to uthr can be read from the receiver buffer register (urbr) of the same uart. in this mode, the modem control
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 12-23 register umcr[rts] is internally tied to the modem status register umsr[cts]. the transmitter sout is set to a logic 1 and the receiver sin is disconnected. the output of the transmitter shift register is looped back into the receiver shift register input. the cts (input signal) is disconnected, rts is internally connected to cts , and the rts (output signal) becomes inactive. in this diagnostic mode, data that is transmitted is immediately received. in local loop-back mode the transmit and receive data paths of the duart can be verified. note that in local loop-back mode, the transmit/receive interrupts are fully operational and can be controlled by the interrupt enable register (uier). 12.4.4 errors the following sections describe framing, parity, and overrun errors which may occur while data is transferred on the uart bus. each of the error bits are usually cleared, as described below, when the line status register (ulsr) is read. 12.4.4.1 framing error when an invalid stop bit is detected, a framing error occurs and ulsr[fe] is set. note that only the first stop bit is checked. in fifo mode, ulsr[fe] is set when the character at the top of the fifo detects a framing error. an attempt to re-synchronize occurs after a framing error. the uart assumes that the framing error (due to a logic 0 being read when a logic 1 (stop) was expected) was due to a stop bit overlapping with the next start bit. ulsr[fe] is cleared when ulsr is read or when a new character is loaded into the urbr from the receiver shift register. 12.4.4.2 parity error a parity error occurs, and ulsr[pe] is set, when unexpected parity values are encountered while receiving data. in fifo mode, ulsr[pe] is set when the character with the error is at the top of the fifo. ulsr[pe] is cleared when ulsr is read or when a new character is loaded into the urbr. 12.4.4.3 overrun error when a new (overwriting character) stop bit is detected and the old character is lost, an overrun error occurs and ulsr[oe] is set. in fifo mode, ulsr[oe] is set after the receiver fifo is full (despite the receiver fifo trigger level setting) and a new character has been received into the internal receiver shift register. data in the fifo is not overwritten; only the shift register data is overwritten. therefore, the interrupt occurs immediately. ulsr[oe] is cleared when ulsr is read.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 12-24 freescale semiconductor duart 12.4.5 fifo mode the uarts use an alternate mode (fifo mode) to relieve the processor core from excessive software overhead. the fifo control register (ufcr) is used to enable and clear the receiver and transmitter fifos and set the fifo receiver trigger level ufcr[rtl] to control the received data available interrupt uier[erdai]. the ufcr also selects the type of dma signaling. the udsr[rxrdy] indicates the status of the receiver fifo. the dma status registers (udsr[txrdy]) indicate when the transmitter fifo is full. when in fifo mode, data written to uthr is placed into the transmitter fifo. the first byte written to uthr is the first byte onto the uart bus. 12.4.5.1 fifo interrupts in fifo mode, the uier[erdai] is set when a time-out interrupt occurs. when a receive data time-out occurs there is a maskable interrupt condition (through uier[erdai]). see section 12.3.1.4, ?interrupt enable register (uier),? for more details on interrupt enables. the interrupt id register (uiir) indicates if the fifos are enabled. interrupt id3 uiir[iid3] bit is only set for fifo mode interrupts. the character time-out interrupt occurs when no characters have been removed from or input to the receiver fifo during the last four character times and there is at least one character in the receiver fifo during this time. the character time-out interrupt (controlled by uiir[iid]) is cleared when the urbr is read. see section 12.3.1.5, ?interrupt id registers (uiir0, uiir1),? for more information. the uiir[fe] bits indicate if fifo mode is enabled. 12.4.5.2 dma mode select the udsr[rxrdy] bit reflects the status of the receiver fifo or urbr. in mode 0 (ufcr[dms] is cleared), udsr[rxrdy] is cleared when there is at least one character in the receiver fifo or urbr and it is set when there are no more characters in the receiver fifo or urbr. this occurs regardless of the setting of the ufcr[fen] bit. in mode 1 (ufcr[dms] and ufcr[fen] are set), udsr[rxrdy] is cleared when the trigger level or a time-out has been reached and it is set when there are no more characters in the receiver fifo. the udsr[txrdy] bit reflects the status of the transmitter fifo or uthr. in mode 0 (ufcr[dms] is cleared), udsr[txrdy] is cleared when there are no characters in the transmitter fifo or uthr and it is set after the first character is loaded into the transmitter fifo or uthr. this occurs regardless of the setting of the ufcr[fen] bit. in mode 1 (ufcr[dms] and ufcr[fen] are set), udsr[txrdy] is cleared when there are no characters in the transmitter fifo or uthr and it is set when the transmitter fifo is full. see section 12.3.1.13, ?dma status registers (udsr0, udsr1),? for a complete description of the usdr[rxrdy] and usdr[txrdy] bits.
duart initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 12-25 12.4.5.3 interrupt control logic an interrupt is active when duart interrupt id register bit 0 (uiir[0]), is cleared. the interrupt enable register (uier) is used to mask specific interrupt types. for more details refer to the description of uier in section 12.3.1.4, ?interrupt enable register (uier).? when the interrupts are disabled in uier, polling software can not use uiir[0] to determine whether the uart is ready for service. the software must monitor the appropriate bits in the line status (ulsr) and/or the modem status (umsr) registers. uiir[0] can be used for polling if the interrupts are enabled in uier. 12.5 duart initialization/application information the following requirements must be met for duart accesses:  all duart registers must be mapped to a cache-inhibited area.  all duart registers are 1 byte wide. reads and writes to these registers must be byte-wide operations. a system reset puts the duart registers to a default state. before the interface can transfer serial data, the following initialization steps are recommended: 1. update the programmable interrupt controller (pic) duart channel interrupt vector source registers. 2. set data attributes and control bits in the ulcr, ufcr, uafr, umcr, udlb, and udmb. 3. set the data attributes and control bits of the external modem or peripheral device. 4. set the interrupt enable register (uier). 5. to start a write transfer, write to the uthr. 6. poll uiir if the interrupts generated by the duart are masked.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 12-26 freescale semiconductor duart
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-1 chapter 13 local bus controller this chapter describes the local bus controller (lbc) block. it describes the external signals and the memory-mapped registers as well as a functional description of the general-purpose chip-select machine (gpcm), sdram machine, and user-programmable machines (upms) of the lbc. finally, it includes an initialization and applications information section with many specific examples of its use. 13.1 introduction figure 13-1 is a functional block diagram of the lbc, which supports three interfaces: gpcm, upm, and sdram controller. figure 13-1. local bus controller block diagram upm ctrl gpcm sdram memory controller address and data machine banks and config regs upm ram transfer acknowledge local address local data refresh timers/ counters local memory compare control signal timing generator gpcm ctrl loe lgta lbctl upm ctrl lgpl[0:3] lgpl4/lupwa it lgpl5 sdram ctrl lsda10 lsdwe lsdras lsdcas lcs [0:7] lwe [0:3] lsddqm[0:3] lbs [0:3] la[27:31] ldp[0:3] lale clock divider gasket and mux addr/data mux lad[0:31] lpbse lclk lcke lsync_in lsync_out msrcid[0:4] mdval
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-2 freescale semiconductor local bus controller 13.1.1 overview the main component of the lbc is its memory controller, which provides a seamless interface to many types of memory devices and peripherals. the memory controller is responsible for controlling eight memory banks shared by a high performance sdram machine, a gpcm, and up to three upms. as such, it supports a minimal glue logic interface to synchronous dram (sdram), sram, eprom, flash eprom, burstable ram, regular dram devices, extended data output dram devices, and other peripherals. the external address latch signal (lale) allows multiplexing of addresses with data signals to reduce the device pin count. the lbc also includes a number of data checking and protection features such as data parity generation and checking, write protection and a bus monitor to ensure that each bus cycle is terminated within a user-specified period. 13.1.2 features the lbc main features are as follows:  memory controller with eight memory banks ? 34-bit address decoding with mask ? variable memory block sizes (32 kbytes to 4 gbytes) ? selection of control signal generation on a per-bank basis ? data buffer controls activated on a per-bank basis ? up to 256-byte bursts, arbitrarily aligned ? automatic segmentation of large transactions ? odd/even parity checking including read-modify-write (rmw) parity for single accesses ? write-protection capability ? atomic operation ? parity byte-select  sdram machine ? provides the control functions and signals for glueless connection to jedec-compliant sdram devices ? supports up to four concurrent open pages per device ? supports sdram port size of 32, 16, and 8 bits ? supports external address and/or command lines buffering
introduction MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-3  general-purpose chip-select machine (gpcm) ? compatible with sram, eprom, feprom, and peripherals ? global (boot) chip-select available at system reset ? boot chip-select support for 8-, 16-, 32-bit devices ? minimum 3-clock access to external devices ? four byte-write-enable signals (lwe [0:3]) ? output enable signal (loe ) ? external access termination signal (lgta )  three user-programmable machines (upms) ? programmable-array-based machine controls external signal timing with a granularity of up to one-quarter of an external bus clock period ? user-specified control-signal patterns run when an internal master requests a single-beat or burst read or write access. ? upm refresh timer runs a user-specified control signal pattern to support refresh ? user-specified control-signal patterns can be initiated by software ? each upm can be defined to support dram devices with depths of 64, 128, 256, and 512 kbytes, and 1, 2, 4, 8, 16, 32, 64, 128, and 256 mbytes ? support for 8-, 16-, 32-bit devices ? page mode support for successive transfers within a burst ? internal address multiplexing supporting 64-, 128-, 256-, and 512-kbyte, and 1-, 2-, 4-, 8-, 16-, 32-, 64-, 128-, and 256-mbyte page banks  optional monitoring of transfers between local bus internal masters and local bus slaves (local bus error reporting)  support for delay-locked loop (dll) with software-configurable bypass for low frequency bus clocks 13.1.3 modes of operation the lbc provides one gpcm, one sdram machine, and three upms for the local bus, with no restriction on how many of the eight banks (chip selects) can be programmed to operate with any given machine. when a memory transaction is dispatched to the lbc, the memory address is compared with the address information of each bank (chip select). the corresponding machine assigned to that bank (gpcm, sdram, or upm) then takes ownership of the external signals that control the access and maintains control until the transaction ends. thus, with the lbc in gpcm, sdram, or upm mode, only one of the eight chip selects is active at any time for the duration of the transaction.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-4 freescale semiconductor local bus controller 13.1.3.1 lbc bus clock and clock ratios the lbc supports ratios of 2, 4, and 8 between the faster system (ccb) clock and the slower external bus clock (lclk[0:2]). this ratio is software programmable through the clock ratio register (lcrr[clkdiv]). in addition to establishing the frequency of the external local bus clock, clkdiv also affects the resolution of signal timing shifts in gpcm mode and the interpretation of upm array words in upm mode. the bus clock is driven identically onto pins, lclk[0:2], to allow the clock load to be shared equally across a pair of signal nets, thereby enhancing the edge rates of the bus clock. 13.1.3.2 source id debug mode in debug mode, the lbc provides the id of a transaction source on external device pins. this mode is enabled on power-on reset, as described in section 20.4.4, ?local bus interface debug.? when placed in this mode, the 5-bit internal id of the current transaction source appears on msrcid[0:4] whenever valid address or data is available on the lbc external pins. the reserved value of 0x1f, which indicates invalid address or data, appears on the source id pins at all other times. the combination of a valid source id (any value except 0x1f) and the value of external address latch enable (lale) and data valid (mdval) facilitate capturing useful debug data as follows:  if a valid source id is detected on msrcid[0:4] and lale is asserted, a valid full 32-bit address may be latched from lad[0:31]. note that in sdram mode the address vector contains the full address as {row, bank, column, lsbs} where row corresponds to the same row address for the given column address and lsbs are the unconnected lsbs of the address for a given port size.  if a valid source id is detected on msrcid[0:4] and mdval is asserted, valid data may be latched from lad[0:31]. 13.1.4 power-down mode the lbc can enter a power-down mode when the system stops the internal (system) clock to the block by using a handshake protocol initiated by the devdisr[lbc] setting in the global utilities block. on entering power-down mode, the lbc places any sdram devices, if used, in self-refresh mode before the bus clock is stopped. the lbc also allows the dll sufficient time to recover following the reapplication of the system clock. 13.1.5 references  mpc8260 powerquicc ii family reference manual , chapters 4, 6, and 10 (order no. mpc8260um).
external signal descriptions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-5 13.2 external signal descriptions table 13-1 contains a list of external signals related to the lbc and summarizes their function. table 13-1. signal properties?summary name number of signals direction function lale 1 output external address latch enable lcs 8 output chip selects lwe / lsddqm/ lbs 4 output output output gpcm mode: write enable sdram mode: byte lane data mask upm mode: byte (lane) select lsda10/ lgpl0 1 output output sdram mode: row address bit/command bit upm mode: general-purpose line 0 lsdwe / lgpl1 1 output output sdram mode: write enable upm mode: general-purpose line 1 loe / lsdras / lgpl2 1 output output output gpcm mode: output enable sdram mode: row address strobe upm mode: general-purpose line 2 lsdcas / lgpl3 1 output output sdram mode: column address strobe upm mode: general-purpose line 3 lgta / lgpl4/ lupwait/ lpbse 1 input output input output gpcm mode: transaction termination upm mode: general-purpose line 4 upm mode: external device wait local bus parity byte select lgpl5 1 output upm mode: general-purpose line 5 lbctl 1 output data buffer control la[27:31] 5 output local bus non-multiplexed address lsb?s lad[0:31] 32 input/output multiplexed address/data bus ldp 4 input/output local bus data parity lcke 1 output local bus clock enable lclk[0:2] 3 output local bus clocks lsync_in 1 input dll synchronize input lsync_out 1 output dll synchronize output mdval 1 output in lbc debug mode: local bus data valid msrcid 5 output in lbc debug mode: local bus source id
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-6 freescale semiconductor local bus controller table 13-2 shows the detailed external signal descriptions for the lbc. table 13-2. local bus controller detailed signal descriptions signal i/o description lale o external address latch enable. the local bus memory controller provides control for an external address latch, which allows address and data to be multiplexed on the device pins. state meaning asserted/negated?lale is asserted with the address at the beginning of each memory controller transaction. the number of cycles for which it is asserted is governed by the orn[ead] and lcrr[eadc] fields. the exact timing of the negation of lale is controlled by the lbcr[ahd] field. note that no other control signals are asserted during the assertion of lale. lcs [0:7] o chip selects. eight chip selects are provided which are mutually exclusive. state meaning asserted/negated?used to enable specific memory devices or peripherals connected to the lbc. lcs [0:7] are provided on a per-bank basis with lcs0 corresponding to the chip select for memory bank 0, which has the memory type and attributes defined by br0 and or0. lwe [0:3]/ lsddqm[0:3]/ lbs [0:3] o gpcm write enable/sdram data mask/upm byte select. these signals select or validate each byte lane of the data bus. for banks with port sizes of 32 bits (as set by br n [ps]), all four signals are defined. for a 16-bit port size, only bits 0?1 are defined; and for an 8-bit port size, bit 0 is the only defined signal. the least significant address bits of each access also determine which byte lanes are considered valid for a given data transfer. state meaning asserted/negated?for gpcm operation, lwe [0:3] assert for each byte lane enabled for writing. for sdram operation, lsddqm[0:3] function as the dqm or data mask signals provided by jedec-compliant sdram devices, with one dqm provided per byte lane. lsddqm[0:3] are driven high when the lbc wishes to mask a write or disable read data output from the sdram. lbs [0:3] are programmable byte-select signals in upm mode. see section 13.4.4.4, ?ram array,? for programming details about lbs [0:3]. timing assertion/negation?see section 13.4.2, ?general-purpose chip-select machine (gpcm),? for details regarding the timing of lwe [0:3]. lsda10/ lgpl0 o sdram a10/general-purpose line 0 state meaning asserted/negated?for sdram accesses, represents address bit 10. when the row address is driven, it drives the value of address bit 10. when the column address is driven, it forms part of the sdram command. one of six general-purpose signals when in upm mode; it drives a value programmed in the upm array. lsdwe / lgpl1 o sdram write enable/general-purpose line 1 state meaning asserted/negated?should be connected to the sdram device we input. acts as the sdram write enable when accessing sdram. one of six general-purpose signals when in upm mode, and drives a value programmed in the upm array. loe / lsdras / lgpl2 o gpcm output enable/sdram ras /general-purpose line 2 state meaning asserted/negated?controls the output buffer of memory when accessing memory/devices in gpcm mode. for sdram accesses, it is the row address strobe (ras ). one of six general-purpose lines when in upm mode; it drives a value programmed in the upm array.
external signal descriptions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-7 lsdcas / lgpl3 o sdram cas /general-purpose line 3 state meaning asserted/negated?in sdram mode, drives the column address strobe (cas ). one of six general-purpose signals when in upm mode, and drives a value programmed in the upm array. lgta / lgpl4/ lupwait/ lpbse i/o gpcm transfer acknowledge/general-purpose line 4/upm wait/parity byte select state meaning asserted/negated?input in gpcm mode used for transaction termination. it may also be configured as one of six general-purpose output signals when in upm mode or as an input to force the upm controller to wait for the memory/device. when configured as lpbse, it disables any use in gpcm or upm modes. because systems that use read-modify-write parity require an additional memory device, they must generate a byte-select like a normal data device. anding lbs [0:3] through external logic to achieve the logical function of this byte-select adds a delay to the byte-select path that can affect memory access timing. the lbc provides this optional byte-select pin that is an internal and of the four (active low) byte selects, allowing glueless, faster connection to rmw-parity devices. lgpl5 o general-purpose line 5 state meaning asserted/negated?one of six general-purpose signals when in upm mode, and drives a value programmed in the upm array. lbctl o data buffer control. the memory controller activates lbctl for the local bus when a gpcm- or upm-controlled bank is accessed. access to an sdram machine-controlled bank does not activate the buffer control. buffer control is disabled by setting or n [bctld]. state meaning asserted/negated?the lbctl pin normally functions as a write/read control for a bus transceiver connected to the lad lines. note that an external data buffer must not drive the lad lines in conflict with the lbc when lbctl is high, because lbctl remains high after reset and during address phases. la[27:31] o local bus nonmultiplexed address lsbs. all bits driven on la[27:31] are defined for 8-bit port sizes. for 32-bit port sizes, la[30:31] are don?t cares; for 16-bit port sizes la31 is a don?t care. state meaning asserted/negated?although the lbc shares an address and data bus, up to five lsbs of the ram address always appear on the dedicated address pins, la[27:31]. these may be used, unlatched, in place of lad[27:31] to connect the five lsbs of the address for address phases. for some ram devices, such as fast-page dram, la[27:31] serve as the column address offset during a burst access. table 13-2. local bus controller detailed signal descriptions (continued) signal i/o description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-8 freescale semiconductor local bus controller lad[0:31] i/o multiplexed address/data bus. for configuration of a port size in br n [ps] as 32 bits, all of lad[0:31] must be connected to the external ram data bus, with lad[0:7] occupying the most significant byte lane (at address offset 0). for a port size of 16 bits, lad[0:7] connect to the most significant byte lane (at address offset 0), while lad[8:15] connect to the least-significant byte lane (at address offset 1); lad[16:31] are unused for 16-bit port sizes. for a port size of 8 bits, only lad[0:7] are connected to the external ram. state meaning asserted/negated?lad[0:31] is the shared 32-bit address/data bus through which external ram devices transfer data and receive addresses. timing assertion/negation?during assertion of lale, lad[0:31] are driven with the ram address for the access to follow. external logic should propagate the address on lad[0:31] while lale is asserted, and latch the address upon negation of lale. after lale is negated, lad[0:31] are either driven by write data or are made high impedance by the lbc in order to sample read data driven by an external device. following the last data transfer of a write access, lad[0:31] are again taken into a high-impedance state. ldp[0:3] i/o local bus data parity. drives and receives the data parity corresponding with the data phases on lad[0:31]. state meaning asserted/negated?during write accesses, a parity bit is generated for each 8 bits of lad[0:31], such that ldp0 is even/odd parity for lad[0:7], while ldp3 is even/odd parity for lad[24:31]. unused byte lanes for port sizes less than 32 bits have undefined parity. timing assertion/negation?drive and receive the data parity corresponding with the data phases on lad[0:31]. for read accesses, the parity bits for each byte lane are sampled on ldp[0:3] with the same timing that read data is sampled on lad[0:31]. ldp[0:3] change impedance in concert with lad[0:31]. lcke o local bus clock enable state meaning asserted/negated?lcke is the bus clock enable signal (cke) for jedec-standard sdram devices. asserted during normal sdram operation. lclk[0:2] o local bus clocks state meaning asserted/negated?lclk[0:2] drive an identical bus clock signal for distributed loads. if the lbc dll is enabled (see lcrr[dbyp], figure 13-19 on page 13-32 ), the bus clock phase is shifted earlier than transitions on other lbc signals (such as lad[0:31] and lcs n ) by a time delay matching the delay of the dll timing loop set up between lsync_out and lsync_in. lsync_out o dll synchronization out state meaning asserted/negated?a replica of the bus clock, appearing on lsync_out, should be propagated through a passive timing loop and returned to lsync_in for achieving correct dll lock. timing assertion/negation?the time delay of the timing loop should be such that it compensates for the round-trip flight time of lclk[0:2] and clocked drivers in the system. no load other than a timing loop should be placed on lsync_out. lsync_in i dll synchronization in state meaning asserted/negated?see description of lsync_out. table 13-2. local bus controller detailed signal descriptions (continued) signal i/o description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-9 13.3 memory map/register definition table 13-3 shows the memory mapped registers of the lbc. undefined 4-byte address spaces within offset 0x000?0xfff are reserved. mdval o local bus data valid (lbc debug mode only) state meaning asserted/negated?for a read, mdval asserts for one bus cycle in the cycle immediately preceding the sampling of read data on lad[0:31]. for a write, mdval asserts for one bus cycle during the final cycle for which the current write data on lad[0:31] is valid. during burst transfers, mdval asserts for each data beat. timing assertion/negation?valid only while the lbc is in system debug mode. in debug mode, mdval asserts when the lbc generates a data transfer acknowledge. msrcid[0:4] o local bus source id (lbc debug mode only). in debug mode, all msrcid[0:4] pins are driven high unless msrcid[0:4] is driving a debug source id for identifying the internal system device controlling the lbc. state meaning asserted/negated?remain high until the last bus cycle of the assertion of lale, in which case the source id of the address is indicated, or until mdval is asserted, in which case the source id relating to the data transfer is indicated. in case of address debug, msrcid[0:4] is valid only when the address on lad[0:31] consists of all physical address bits?with optional padding?for reconstructing the system address presented to the lbc. for example, msrcid[0:4] is valid only during cas phases of sdram accesses, because the column, bank select, and (normally unused) row address bits are all present on lad[0:31] during a cas cycle table 13-3. local bus controller memory map address offset use access reset section/page 0x0_5000 br0?base register 0 r/w 0x0000_ nn 01 1 13.3.1.1/13-11 0x0_5008 br1?base register 1 0x0000_0000 0x0_5010 br2?base register 2 0x0_5018 br3?base register 3 0x0_5020 br4?base register 4 0x0_5028 br5?base register 5 0x0_5030 br6?base register 6 0x0_5038 br7?base register 7 table 13-2. local bus controller detailed signal descriptions (continued) signal i/o description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-10 freescale semiconductor local bus controller 13.3.1 register descriptions this section provides a detailed description of the lbc configuration, status, and control registers with detailed bit and field descriptions. address offsets in the lbc address range that are not defined in table 13-3 should not be accessed for reading or writing. similarly, only zero should be written to reserved bits of defined registers, as writing ones can have unpredictable results in some cases. 0x0_5004 or0?options register 0 r/w 0x0000_0ff7 13.3.1.2/13-12 0x0_500c or1?options register 1 0x0000_0000 0x0_5014 or2?options register 2 0x0_501c or3?options register 3 0x0_5024 or4?options register 4 0x0_502c or5?options register 5 0x0_5034 or6?options register 6 0x0_503c or7?options register 7 0x0_5068 mar?upm address register r/w 0x0000_0000 13.3.1.3/13-18 0x0_5070 mamr?upma mode register r/w 0x0000_0000 13.3.1.4/13-19 0x0_5074 mbmr?upmb mode register r/w 0x0000_0000 13.3.1.4/13-19 0x0_5078 mcmr?upmc mode register r/w 0x0000_0000 13.3.1.4/13-19 0x0_5084 mrtpr?memory refresh timer prescaler register r/w 0x0000_0000 13.3.1.5/13-21 0x0_5088 mdr?upm data register r/w 0x0000_0000 13.3.1.6/13-22 0x0_5094 lsdmr?sdram mode register r/w 0x0000_0000 13.3.1.7/13-22 0x0_50a0 lurt?upm refresh timer r/w 0x0000_0000 13.3.1.8/13-24 0x0_50a4 lsrt?sdram refresh timer r/w 0x0000_0000 13.3.1.9/13-25 0x0_50b0 ltesr?transfer error status register read/bit reset 0x0000_0000 13.3.1.10/13-26 0x0_50b4 ltedr?transfer error disable register r/w 0x0000_0000 13.3.1.11/13-27 0x0_50b8 lteir?transfer error interrupt register r/w 0x0000_0000 13.3.1.12/13-28 0x0_50bc lteatr?transfer error attributes register r/w 0x0000_0000 13.3.1.13/13-29 0x0_50c0 ltear?transfer error address register r/w 0x0000_0000 13.3.1.14/13-30 0x0_50d0 lbcr?configuration register r/w 0x0000_0000 13.3.1.15/13-31 0x0_50d4 lcrr?clock ratio register r/w 0x8000_0008 13.3.1.16/13-32 1 port size for br0 is configured from external pins during reset, hence ? nn ? is either 0x08, 0x10, or 0x18. table 13-3. local bus controller memory map (continued) address offset use access reset section/page
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-11 bits designated as write-one-to-clear are cleared only by writing ones to them. writing zeros to them has no effect. 13.3.1.1 base registers (br0?br7) the base registers (br n ), shown in figure 13-2 , contain the base address and address types for each memory bank. the memory controller uses this information to compare the address bus value with the current address accessed. each register (bank) includes a memory attribute and selects the machine for memory operation handling. note that after system reset, br0[v] is set, br1[v]?br7[v] are cleared, and the value of br0[ps] reflects the initial port size configured by the boot rom location pins. table 13-4 describes br n fields. 0 16 171819202122 23 24 2627 28 29 3031 r ba ? ps decc wp msel atom v w reset 0000_0000_0000_0000_000p_s000_0000_0000/1 1 offset 0x0_5000 (br0); 0x0_5008 (br1); 0x0_5010 (br2); 0x0_5018 (br3); 0x0_5020 (br4); 0x0_5028 (br5); 0x0_5030 (br6); 0x0_5038 (br7); 1 br0 has its valid bit set during reset. thus bank 0 is valid with the port size (ps) configured from external boot rom configuration pins during reset. all other base registers have all bits cleared to zero during reset. figure 13-2. base registers (br n ) table 13-4. br n field descriptions bits name description 0?16 ba base address. the upper 17 bits of each base register are compared to the address on the address bus to determine if the bus master is accessing a memory bank controlled by the memory controller. used with the address mask bits or n [am]. 17?18 ? reserved 19?20 ps port size. specifies the port size of this memory region. for br0, ps is configured from the boot rom location pins during reset. for all other banks the value is reset to 00 (port size not defined). 00 reserved 01 8-bit 10 16-bit 11 32-bit 21?22 decc specifies the method for data error checking. 00 data error checking disabled, but normal parity generation 01 normal parity generation and checking 10 read-modify-write parity generation and normal parity checking (32-bit port size only) 11 reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-12 freescale semiconductor local bus controller 13.3.1.2 option registers (or0?or7) the or n registers define the sizes of memory banks and access attributes. the or n attribute bits support the following three modes of operation as defined by br n [msel].  gpcm mode  upm mode  sdram mode the or n registers are interpreted differently depending on which of the three machine types is selected for that bank. 23 wp write protect 0 read and write accesses are allowed. 1 only read accesses are allowed. the memory controller does not assert lcs n on write cycles to this memory bank. wp is set (if enabled) if a write to this memory bank is attempted, and a local bus error interrupt is generated (if enabled), terminating the cycle. 24?26 msel machine select. specifies the machine to use for handling memory operations. 000 gpcm (reset value) 001 reserved 010 reserved 011 sdram 100 upma 101 upmb 110 upm c 111 reserved 27 ? reserved 28?29 atom atomic operation. writes (reads) to the address space handled by the memory controller bank reserve the selected memory bank for the exclusive use of the accessing device. the reservation is released when the device performs a read (write) operation to this memory controller bank. if a subsequent read (write) request to this memory controller bank is not detected within 256 bus clock cycles of the last write (read), the reservation is released and an atomic error is reported (if enabled). 00 the address space controlled by this bank is not used for atomic operations. 01 read-after-write-atomic (rawa) 10 write-after-read-atomic (wara) 11 reserved 30 ? reserved 31 v valid bit. indicates that the contents of the br n and or n pair are valid. lcs n does not assert unless v is set (an access to a region that has no valid bit set may cause a bus time-out). after a system reset, only br0[v] is set. 0 this bank is invalid. 1 this bank is valid. table 13-4. br n field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-13 13.3.1.2.1 address mask the address mask fields of the option registers (or n [xam,am]) mask up to 19 corresponding br n [ba,xba] fields. the 15 lsbs of the 34-bit internal address do not participate in bank address matching in selecting a bank for access. masking address bits independently allows external devices of different size address ranges to be used. address mask bits can be set or cleared in any order in the field, allowing a resource to reside in more than one area of the address map. table 13-5 shows memory bank sizes from 256 kbytes to 4 gbytes. table 13-5. memory bank sizes in relation to address mask bits 17?18 am memory bank size 11 0000_0000_0000_0000_0 4 gbytes 11 1000_0000_0000_0000_0 2 gbytes 11 1100_0000_0000_0000_0 1 gbyte 11 1110_0000_0000_0000_0 512 mbytes 11 1111_0000_0000_0000_0 256 mbytes 11 1111_1000_0000_0000_0 128 mbytes 11 1111_1100_0000_0000_0 64 mbytes 11 1111_1110_0000_0000_0 32 mbytes 11 1111_1111_0000_0000_0 16 mbytes 11 1111_1111_1000_0000_0 8 mbytes 11 1111_1111_11 00_0000_0 4 mbytes 11 1111_1111_1110_0000_0 2 mbytes 11 1111_1111_111 1_0000_0 1 mbyte 11 1111_1111_111 1_1000_0 512 kbytes 11 1111_1111_1111_1 100_0 256 kbytes 11 1111_1111_1111_1110_0 128 kbytes 11 1111_1111_1111_1111_0 64 kbytes 11 1111_1111_1111_1111_1 32 kbytes
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-14 freescale semiconductor local bus controller 13.3.1.2.2 option registers (or n )?gpcm mode figure 13-3 shows the bit fields for or n when the corresponding br n [msel] selects the gpcm machine. table 13-6 describes or n fields for gpcm mode. 01617181920212223242728293031 r am ? bctld csnt acs xacs scy seta trlx ehtr ead w reset 0000_0000_0000_0000_0000_ 1111_1111_0111 1 (or0); 0000_0000_0000_0000_0000_0000_0000_0000 (all others) offset 0x0_5004 (or0); 0x0_500c (or1); 0x0_5014 (or2); 0x0_501c (or3); 0x0_5024 (or4); 0x0_502c (or5); 0x0_5034 (or6); 0x0_503c (or7); 1 or0 has this value set during reset (gpcm is the default control machine for all banks coming out of reset). all other option registers have all bits cleared. figure 13-3. option registers (or n ) in gpcm mode table 13-6. or n ? gpcm field descriptions bits name description 0?16 am gpcm address mask. masks corresponding br n bits. masking address bits independently allows external devices of different size address ranges to be used. address mask bits can be set or cleared in any order in the field, allowing a resource to reside in more than one area of the address map. 0 corresponding address bits are masked. 1 corresponding address bits are used in the comparison between base and transaction addresses. 17?18 ? reserved 19 bctld buffer control disable. disables assertion of lbctl during access to the current memory bank. 0 lbctl is asserted upon access to the current memory bank. 1 lbctl is not asserted upon access to the current memory bank. 20 csnt chip select negation time. determines when lcs n and lwe are negated during an external memory write access handled by the gpcm, provided that acs 00 (when acs = 00, only lwe is affected by the setting of csnt). this helps meet address/data hold times for slow memories and peripherals. 0lcs n and lwe are negated normally. 1lcs n and lwe are negated earlier depending on the value of lcrr[clkdiv]. lcrr[clkdiv] csnt meaning x0lcs n and lwe are negated normally. 21lcs n and lwe are negated normally. 4 or 8 1 lcs n and lwe are negated quarter of a bus clock cycle earlier.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-15 21?22 acs address to chip-select setup. determines the delay of the lcs n assertion relative to the address change when the external memory access is handled by the gpcm. at system reset, or0[acs] = 11. lcrr[clkdiv] value meaning x00lcs n is output at the same time as the address lines. note that this overrides the value of csnt such that csnt=0. 01 reserved. 210lcs n is output a half bus clock cycle after the address lines. 11 lcs n is output a half bus clock cycle after the address lines. 4 or 8 10 lcs n is output a quarter bus clock cycle after the address lines. 11 lcs n is output a half bus clock cycle after the address lines. 23 xacs extra address to chip-select setup. setting this bit increases the delay of the lcs n assertion relative to the address change when the external memory access is handled by the gpcm. after a system reset, or0[xacs] = 1. 0 address to chip-select setup is determined by orx[acs] and lcrr[clkdiv]. 1 address to chip-select setup is extended (see table 13-23 and table 13-24 for lcrr[clkdiv] = 4 or 8, table 13-25 and table 13-26 for lcrr[clkdiv] = 2). 24?27 scy cycle length in bus clocks. determines the number of wait states inserted in the bus cycle, when the gpcm handles the external memory access. thus it is the main parameter for determining cycle length. the total cycle length depends on other timing attribute settings. after a system reset, or0[scy] = 1111. 0000 no wait states 0001 1 bus clock cycle wait state ... 1111 15 bus clock cycle wait states 28 seta external address termination 0 access is terminated internally by the memory controller unless the external device asserts lgta earlier to terminate the access. 1 access is terminated externally by asserting the lgta external pin. (only lgta can terminate the access). 29 trlx timing relaxed. modifies the settings of timing parameters for slow memories or peripherals. 0 normal timing is generated by the gpcm. 1 relaxed timing on the following parameters: adds an additional cycle between the address and control signals (only if acs 00) doubles the number of wait states specified by scy, providing up to 30 wait states works in conjunction with ehtr to extend hold time on read accesses lcs n (only if acs 00) and lwe signals are negated one cycle earlier during writes. table 13-6. or n ? gpcm field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-16 freescale semiconductor local bus controller 13.3.1.2.3 option registers (or n )?upm mode figure 13-4 shows the bit fields for or n when the corresponding br n [msel] selects a upm machine. table 13-7 describes br n fields for upm mode. 30 ehtr extended hold time on read accesses. indicates with trlx how many cycles are inserted between a read access from the current bank and the next access. trlx ehtr meaning 0 0 the memory controller generates normal timing. no additional cycles are inserted. 0 1 1 idle clock cycle is inserted. 1 0 4 idle clock cycles are inserted. 1 1 8 idle clock cycles are inserted. 31 ead external address latch delay. allow extra bus clock cycles when using external address latch (lale). 0 no additional bus clock cycles (lale asserted for one bus clock cycle only) 1 extra bus clock cycles are added (lale is asserted for the number of bus clock cycles specified by lcrr[eadc]). 0 181920 222324 2829 30 31 r am bctld bi trlx ehtr ead w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_5004 (or0); 0x0_500c (or1); 0x0_5014 (or2); 0x0_501c (or3); 0x0_5024 (or4); 0x0_502c (or5); 0x0_5034 (or6); 0x0_503c (or7); figure 13-4. option registers (or n ) in upm mode table 13-7. or n ? upm field descriptions bits name description 0?16 am upm address mask. masks corresponding br n bits. masking address bits independently allows external devices of different size address ranges to be used. address mask bits can be set or cleared in any order in the field, allowing a resource to reside in more than one area of the address map. 0 corresponding address bits are masked. 1 the corresponding address bits are used in the comparison with address pins. 17?18 ? reserved table 13-6. or n ? gpcm field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-17 13.3.1.2.4 option registers (or n )?sdram mode figure 13-5 shows the bit fields for or n when the corresponding br n [msel] selects the sdram machine. 19 bctld buffer control disable. disables assertion of lbctl during access to the current memory bank. 0 lbctl is asserted upon access to the current memory bank. 1 lbctl is not asserted upon access to the current memory bank. 20?22 ? reserved 23 bi burst inhibit. indicates if this memory bank supports burst accesses. 0 the bank supports burst accesses. 1 the bank does not support burst accesses. the selected upm executes burst accesses as a series of single accesses. 24?28 ? reserved 29 trlx timing relaxed. works in conjunction with ehtr to extend hold time on read accesses. 30 ehtr extended hold time on read accesses. indicates with trlx how many cycles are inserted between a read access from the current bank and the next access. trlx ehtr meaning 0 0 the memory controller generates normal timing. no additional cycles are inserted. 0 1 1 idle clock cycle is inserted. 1 0 4 idle clock cycles are inserted. 1 1 8 idle clock cycles are inserted. 31 ead external address latch delay. allow extra bus clock cycles when using external address latch (lale). 0 no additional bus clock cycles (lale asserted for one bus clock cycle only) 1 extra bus clock cycles are added (lale is asserted for the number of bus clock cycles specified by lcrr[eadc]). 0 16171819 212223 25 26 2728 30 31 r am cols rows pmsel ead w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_5004 (or0); 0x0_500c (or1); 0x0_5014 (or2); 0x0_501c (or3); 0x0_5024 (or4); 0x0_502c (or5); 0x0_5034 (or6); 0x0_503c (or7); figure 13-5. option registers (or n ) in sdram mode table 13-7. or n ? upm field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-18 freescale semiconductor local bus controller table 13-8 describes br n fields for sdram mode. 13.3.1.3 upm memory address register (mar) figure 13-6 shows the fields of the upm memory address register (mar). table 13-8. or n ? sdram field descriptions bits name description 0?16 am sdram address mask. masks corresponding br n bits. masking address bits independently allows external devices of different size address ranges to be used. address mask bits can be set or cleared in any order in the field, allowing a resource to reside in more than one area of the address map. am can be read or written at any time. 0 corresponding address bits are masked. 1 the corresponding address bits are used in the comparison with address pins. 17?18 ? reserved 19?21 cols number of column address lines. sets the number of column address lines in the sdram device. 000 7 001 8 010 9 011 10 100 11 101 12 110 13 111 14 22 ? reserved 23?25 rows number of row address lines. sets the number of row address lines in the sdram device. 000 9 001 10 010 11 011 12 100 13 101 14 110 15 111 reserved 26 pmsel page mode select. selects page mode for the sdram connected to the memory controller bank. 0 back-to-back page mode (normal operation). page is closed when the bus becomes idle. 1 page is kept open until a page miss or refresh occurs. 27?30 ? reserved 31 ead external address latch delay. allow extra bus clock cycles when using external address latch (lale). 0 no additional bus clock cycles (lale asserted for one bus clock cycle only) 1 extra bus clock cycles are added (lale is asserted for the number of bus clock cycles specified by lcrr[eadc]). 0 31 r a w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_5068 figure 13-6. upm memory address register (mar)
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-19 table 13-9 describes the mar field. 13.3.1.4 upm mode registers (m x mr) the upm machine mode registers (mamr, mbmr and mcmr), shown in figure 13-7 , contain the configuration for the three upms. table 13-10 describes upm mode fields. table 13-9. mar field description bits name description 0?31 a address that can be output to the address signals under control of the amx bits in the upm ram word. 0 1 23 4 5 78910 12 13 14 1718 2122 2526 31 r rfen op uwpl am ds g0cl gpl4 rlf wlf tlf mad w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_5070 (mamr); 0x0_5074 (mbmr); 0x0_5078 (mcmr) figure 13-7. upm mode registers (m x mr) table 13-10. m x mr field descriptions bits name description 0?reserved 1 rfen refresh enable. indicates that the upm needs refresh services. this bit must be set for upma (refresh executor) if refresh services are required on any upm assigned chip selects. if mamr[rfen] = 0, no refresh services can be provided, even if upmb and/or upmc have their rfen bit set. 0 refresh services are not required 1 refresh services are required 2?3 op command opcode. determines the command executed by the upm n when a memory access hits a upm assigned bank. see section 13.4.4.2, ?programming the upms ,? for important programming considerations. 00 normal operation 01 write to upm array. on the next memory access that hits a upm assigned bank, write the contents of the mdr into the ram location pointed to by mad. after the access, mad is automatically incremented. 10 read from upm array. on the next memory access that hits a upm assigned bank, read the contents of the ram location pointed to by mad into the mdr. after the access, mad is automatically incremented. 11 run pattern. on the next memory access that hits a upm assigned bank, run the pattern written in the ram array. the pattern run starts at the location pointed to by mad and continues until the last bit is set in the ram word. 4 uwpl lupwait polarity active low. sets the polarity of the lupwait pin when in upm mode. 0 lupwait is active high. 1 lupwait is active low.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-20 freescale semiconductor local bus controller 5?7 am address multiplex size. determines how the address of the current memory cycle can be output on the address pins. this field is needed when interfacing with devices requiring row and column addresses multiplexed on the same pins. 8?9 ds disable timer period. guarantees a minimum time between accesses to the same memory bank controlled by upm n . the disable timer is turned on by the todt bit in the ram array word, and when expired, the upm n allows the machine access to handle a memory pattern to the same bank. accesses to a different bank by the same upm n is also allowed. to avoid conflicts between successive accesses to different banks, the minimum pattern in the ram array for a request serviced, should not be shorter than the period established by ds. 00 1-bus clock cycle disable period 01 2-bus clock cycle disable period 10 3-bus clock cycle disable period 11 4-bus clock cycle disable period 10?12 g0cl general line 0 control. determines which logical address line can be output to the lgpl0 pin when the upm n is selected to control the memory access. 000 a12 001 a11 010 a10 011 a9 100 a8 101 a7 110 a6 111 a5 13 gpl4 lgpl4 output line disable. determines how the lgpl4/lupwait pin is controlled by the corresponding bits in the upm n array. see table 13-30 on page 13-69 . table 13-10. m x mr field descriptions (continued) bits name description value la0?la15 la16 la17 la18 la19?la28 la29 la30 la31 000 0 a8 a9 a10 a11?a20 a21 a22 a23 001 0 a7 a8 a9 a10?a19 a20 a21 a22 010 0 a6 a7 a8 a9?a18 a19 a20 a21 011 0 a5 a6 a7 a8?a17 a18 a19 a20 100 0 a4 a5 a6 a7?a16 a17 a18 a19 101 0 a3 a4 a5 a6?a15 a16 a17 a18 110 reserved 111 reserved value lgpl4/lupwait pin function interpretation of upm word bits g4t1/dlt3 g4t3/waen 0 lgpl4 (output) g4t1 g4t3 1 lupwait (input) dlt3 waen
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-21 13.3.1.5 memory refresh timer prescaler register (mrtpr) the refresh timer prescaler register (mrtpr), shown in figure 13-8 , is used to divide the system clock to provide the sdram and upm refresh timers clock. 14?17 rlf read loop field. determines the number of times a loop defined in the upm n will be executed for a burst- or single-beat read pattern or when m x mr[op] = 11 ( run command) 0000 16 0001 1 0010 2 0011 3 ... 1110 14 1111 15 18?21 wlf write loop field. determines the number of times a loop defined in the upm n will be executed for a burst- or single-beat write pattern. 0000 16 0001 1 0010 2 0011 3 ... 1110 14 1111 15 22?25 tlf refresh loop field. determines the number of times a loop defined in the upm n will be executed for a refresh service pattern. 0000 16 0001 1 0010 2 0011 3 ... 1110 14 1111 15 26?31 mad machine address. ram address pointer for the command executed. this field is incremented by 1 each time the upm is accessed, and the op field is set to write or read. address range is 64 words per upm n . 078 31 r ptp w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_5084 figure 13-8. memory refresh timer prescaler register (mrtpr) table 13-10. m x mr field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-22 freescale semiconductor local bus controller table 13-11 describes mrtpr fields. 13.3.1.6 upm data register (mdr) the memory data register (mdr), shown in figure 13-9 , contains data written to or read from the ram array for upm read or write commands. mdr must be set up before issuing a write command to the upm. table 13-12 describes mdr[d]. 13.3.1.7 sdram machine mode register (lsdmr) the local bus sdram mode register (lsdmr), shown in figure 13-10 , is used to configure operations pertaining to sdram. table 13-11. mrtpr field descriptions bits name description 0?7 ptp refresh timers prescaler. determines the period of the refresh timers input clock. the system clock is divided by ptp except when the value is 0000_0000, which represents the maximum divider of 256. 8?31 ? reserved 0 31 r d w reset 0000_0000_0000_0000 offset 0x0_5088 figure 13-9. upm data register (mdr) table 13-12. mdr field description bits name description 0?31 d the data to be read or written into the ram array when a write or read command is supplied to the upm (m x mr[op] = 01 or m x mr[op] = 10). 0 1 2 4 5 7 8 10 11 13 14 15 16 17 19 20 22 23 24 25 26 27 28 29 30 31 r rfen op bsma rfcr rfcr pretoact acttorw bl wrc bufcmd cl w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_5094 figure 13-10. sdram machine mode register (lsdmr)
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-23 table 13-12 describes lsdmr fields. table 13-13. lsdmr field descriptions bits name description 0?reserved 1 rfen refresh enable. indicates that the sdram requires refresh services. 0 refresh services are not required. 1 refresh services are required. 2?4 op sdram operation. selects the operation that occurs when the sdram device is accessed. 5?7 ? reserved 8?10 bsma bank select multiplexed address line. selects which address pins serve as the 2-bit bank-select address for sdram. note that only 4-bank sdrams are supported. 000 la12:la13 001 la13:la14 010 la14:la15 011 la15:la16 100 la16:la17 101 la17:la18 110 la18:la19 111 la19:la20 11?13 ? reserved 14?16 rfcr refresh recovery. sets the refresh recovery interval in bus clock cycles. defines the earliest timing for an activate or refresh command after a refresh command. 000 reserved 001 3 clocks 010 4 clocks 011 5 clocks 100 6 clocks 101 7 clocks 110 8 clocks 111 16 clocks 17?19 pretoact defines the earliest timing for activate or refresh command after a precharge command (number of bus clock cycle wait states). 000 8 001 1 010 2 011 3 100 4 101 5 110 6 111 7 value meaning use 000 normal operation normal operation 001 auto refresh initialization 010 self refresh power-down mode or debug 011 mode register write initialization 100 precharge bank debug 101 precharge all banks initialization 110 activate bank debug 111 read/write without valid data transfer debug
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-24 freescale semiconductor local bus controller 13.3.1.8 upm refresh timer (lurt) the upm refresh timer (lurt), shown in figure 13-11 , generates a refresh request for all valid banks that selected a upm machine and are refresh-enabled (m x mr[rfen] = 1). each time the timer expires, a qualified bank generates a refresh request using the selected upm. the qualified banks rotate their requests. 20?22 acttorw defines the earliest timing for read/write command after an activate command (number of bus clock cycle wait states). 000 8 001 reserved 010 2 011 3 100 4 101 5 110 6 111 7 23 bl sets the burst length for sdram accesses. 0 sdram burst length is 4. use this value if the device port size is16. 1 sdram burst length is 8. use this value if the device port size is 32 or 8. 24?25 ? reserved 26?27 wrc write recovery time. defines the earliest timing for precharge command after the last data is written to the sdram. 00 4 01 reserved 10 2 11 3 28 ? reserved 29 bufcmd control line assertion timing. if external buffers are placed on the control lines going to both the sdram and address lines, setting bufcmd causes all sdram control lines except lcs n , lcke, lale and lsddqm [0:3] to be asserted for lcrr[bufcmdc] cycles, instead of one. 0 normal timing for the control lines 1 all control lines except lcs n are asserted for the number of cycles specified by lcrr[bufcmdc]. 30?31 cl cas latency. defines the timing for first read data after sdram samples a column address. 00 extended cas latency. according to lcrr[ecl]. see table 13-22 on page 13-32 . 01 1 10 2 11 3 078 31 r lurt w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_50a0 figure 13-11. upm refresh timer (lurt) table 13-13. lsdmr field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-25 table 13-14 describes lurt fields. 13.3.1.9 sdram refresh timer (lsrt) the sdram refresh timer (lsrt), shown in figure 13-12 , generates a refresh request for all valid banks that selected a sdram machine and are refresh-enabled (lsdmr[rfen] = 1). each time the timer expires, all qualifying banks generate a bank staggering auto-refresh request using the sdram machine. table 13-15 describes lsrt fields. table 13-14. lurt field descriptions bits name description 0?7 lurt upm refresh timer period. determines, along with the timer prescaler (mrtpr), the timer period according to the following equation: example: for a 266-mhz system clock and a required service rate of 15.6 s, given mrtpr[ptp] = 32, the lurt value should be 128 decimal. 128/(266 mhz/32) = 15.4 s, which is less than the required service period of 15.6 s. note that the reset value (0x00) sets the maximum period to 256 x mrtpr[ptp] system clock cycles. 8?31 ? reserved 078 31 r lsrt w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_50a4 figure 13-12. lsrt sdram refresh timer (lsrt) table 13-15. lsrt field descriptions bits name description 0?7 lsrt sdram refresh timer period. determines, along with the timer prescaler (mrtpr), the timer period according to the following equation: example: for a 266-mhz system clock and a required service rate of 15.6 s, given ptp = 32, the lsrt value should be 128 decimal. 128/(266 mhz/32) = 15.4 s, which is less than the required service period of 15.6 s. note that the reset value, 0x00, sets the maximum period to 256 mrtpr[ptp] system clock cycles. 8?31 ? reserved timerperiod lurt fsystemclock mrtpr ptp [] --------------------------------------- - ?? ?? --------------------------------------------- - = timerperiod lsrt fsystemclock mrtpr ptp [] --------------------------------------- - ?? ?? --------------------------------------------- - =
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-26 freescale semiconductor local bus controller 13.3.1.10 transfer error status register (ltesr) the lbc has five registers for error management.  the transfer error status register (ltesr) indicates the cause of an error.  the transfer error check disable register (ltedr) is used to enable (and disable) error checking.  the transfer error check interrupt register (lteir) enables reporting of errors through an interrupt.  the transfer error attributes register (lteatr) captures source attributes of an error.  the transfer error address register (ltear) captures the address of a transaction that caused an error. ltesr, shown in figure 13-13 , is a write-one-to-clear register. reading ltesr occurs normally; however, write operations can clear but not set bits. a bit is cleared whenever the register is written and the data in the corresponding bit location is a 1. for example, to clear only the write protect error bit (ltesr[wp]) without affecting other ltesr bits, 0x0400_0000 should be written to the register. table 13-16 describes ltesr fields. 0 1 2 3 4 5 6 7 8 9 10111213 31 r bm par wp atmw atmr cs w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_50b0 figure 13-13. transfer error status register (ltesr) table 13-16. ltesr field descriptions bits name description 0 bm bus monitor time-out 0 no local bus monitor time-out occurred. 1 local bus monitor time-out occurred. no data beat was acknowledged on the bus within lbcr[bmt] 8 bus clock cycles from the start of a transaction. 1?reserved 2 par parity 0 no local bus parity error 1 local bus parity error. lteatr[pb] indicates the byte lane that caused the error and lteatr[bnk] indicates which memory controller bank was accessed. 3?4 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-27 13.3.1.11 transfer error check disable register (ltedr) the transfer error check disable register (ltedr), shown in figure 13-14 , is used to disable error checking. note that control of error checking is independent of control of reporting of errors (lteir) through the interrupt mechanism. table 13-17 describes ltedr fields. 5 wp write protect error 0 no write protect error occurred. 1 a write was attempted to a local bus memory region that was defined as read-only in the memory controller. usually, in this case, a bus monitor time-out will occur (as the cycle is not automatically terminated). 6?7 ? reserved 8atmwatomic error write 0 no atomic write error occurred. 1 the subsequent write (wara) to a memory bank did not occur within 256 bus clock cycles. 9 atmr atomic error read 0 no atomic read error occurred. 1 the subsequent read (rawa) to a memory bank did not occur within 256 bus clock cycles. 10?11 ? reserved 12 cs chip select error 0 no chip select error occurred. 1 a transaction was sent to the lbc that did not hit any memory bank. 13?31 ? reserved 0 1 2 3 4 5 6 7 8 9 10 11 12 13 31 r bmd pard wpd wara rawa csd w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_50b4 figure 13-14. transfer error check disable register (ltedr) table 13-17. ltedr field descriptions bits name description 0 bmd bus monitor disable 0 bus monitor is enabled 1 bus monitor is disabled 1?reserved table 13-16. ltesr field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-28 freescale semiconductor local bus controller 13.3.1.12 transfer error interrupt enable register (lteir) the transfer error interrupt enable register (lteir), shown in figure 13-15 , is used to send or block error reporting through the lbc internal interrupt mechanism. software should clear pending errors in ltesr before enabling interrupts. after an interrupt has occurred, clearing relevant ltesr error bits negates the interrupt. 2 pard parity error checking disabled. note that uncorrectable read errors may cause the assertion of core_fault_in , which causes the core to generate a machine check interrupt, unless it is disabled (by clearing hid1[rfxe]). if rfxe is zero and this error occurs, pard must be cleared and lteir[pari] must be set to ensure that an interrupt is generated. for more information, see section 6.10.2, ?hardware implementation-dependent register 1 (hid1).? 0 parity error checking is enabled. 1 parity error checking is disabled. 3?4 ? reserved 5 wpd write protect error checking disable 0 write protect error checking is enabled. 1 write protect error checking is disabled. 6?7 ? reserved 8 wara write-after-read atomic (wara) error checking disable 0 wara error checking is enabled. 1 wara error checking is disabled. 9 rawa read-after-write atomic (rawa) error checking disable 0 rawa error checking is enabled. 1 rawa error checking is disabled. 10?11 ? reserved 12 csd chip select error checking disable 0 chip select error checking is enabled. 1 chip select error checking is disabled. 13?31 ? reserved 0 1 2 3 4 5 6 7 8 9 10 11 12 13 31 r bmi pari wpi wara rawa csi w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_50b8 figure 13-15. transfer error interrupt enable register (lteir) table 13-17. ltedr field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-29 table 13-18 describes lteir fields. 13.3.1.13 transfer error attributes register (lteatr) figure 13-16 shows the lteatr. after lteatr[v] has been set, software must clear this bit to allow lteatr and ltear to update following any subsequent errors. table 13-18. lteir field descriptions bits name description 0 bmi bus monitor error interrupt enable 0 bus monitor error reporting is disabled. 1 bus monitor error reporting is enabled. 1?reserved 2 pari parity error interrupt enable. note that uncorrectable read errors may cause the assertion of core_fault_in , which causes the core to generate a machine check interrupt, unless it is disabled (by clearing hid1[rfxe]). if rfxe is zero and this error occurs, ltedr[pard] must be cleared and pari must be set to ensure that an interrupt is generated. for more information, see section 6.10.2, ?hardware implementation-dependent register 1 (hid1).? 0 parity error reporting is disabled. 1 parity error reporting is enabled. 3?4 ? reserved 5 wpi write protect error interrupt enable 0 write protect error reporting is disabled. 1 write protect error reporting is enabled. 6?7 ? reserved 8 wara write-after-read atomic (wara) error interrupt enable 0 wara error reporting is disabled. 1 wara error reporting is enabled. 9 rawa read-after-write atomic (rawa) error interrupt enable 0 rawa error reporting is disabled. 1 rawa error reporting is enabled. 10?11 ? reserved 12 csi chip select error interrupt enable 0 chip select error reporting is disabled. 1 chip select error reporting is enabled. 13?31 ? reserved 0 2 3 4 10 11 15 16 19 20 27 28 29 30 31 r rwb srcid pb bnk xa v w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_50bc figure 13-16. transfer error attributes register (lteatr)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-30 freescale semiconductor local bus controller table 13-19 describes lteatr fields. 13.3.1.14 transfer error address register (ltear) the transfer error address register (ltear) is shown in figure 13-17 . table 13-20 describes ltear[a]. table 13-19. lteatr field descriptions bits name description 0?2 ? reserved 3 rwb transaction type for the error 0 the transaction for the error was a write transaction. 1 the transaction for the error was a read transaction. 4?10 ? reserved 11?15 srcid captures the source of the transaction when this information is provided on the internal interface to the lbc. 16?19 pb parity error on byte. there are four parity error status bits, one per byte lane. a bit is set for the byte that had a parity error (bit 16 represents byte 0, the most significant byte lane). 20?27 bnk memory controller bank. there is one error status bit per memory controller bank (bit 20 represents bank 0). a bit is set for the local bus memory controller bank that had an error. note that bnk is invalid if the error was not caused by parity checks. 28?29 xa extended address for the error. these bits capture the two msbs of the 34-bit address of the transaction resulting in an error. 30 ? reserved 31 v error attribute capture is valid. indicates that the captured error information is valid 0 captured error attributes and address are not valid 1 captured error attributes and address are valid 0 31 r a w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_50c0 figure 13-17. transfer error address register (ltear) table 13-20. ltear field descriptions bits name description 0?31 a transaction address for the error. holds the 32 lsbs of the 34-bit address of the transaction resulting in an error.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-31 13.3.1.15 local bus configuration register (lbcr) the local bus configuration register (lbcr) is shown in figure 13-18 . table 13-21 describes lbcr fields. 01 789 10111213 14 1516 2324 31 r ldis btclc ahd lpbse epar bmt w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_50d0 figure 13-18. local bus configuration register table 13-21. lbcr field descriptions bits name description 0 ldis local bus disable 0 local bus is enabled 1 local bus is disabled. no internal transactions will be acknowledged. 1?7 ? reserved 8?9 bctlc defines the use of lbctl 00 lbctl is used as w/r control for gpcm or upm accesses (buffer control). 01 lbctl is used as loe for gpcm accesses only. 10 lbctl is used as lwe for gpcm accesses only. 11 reserved. 10 ahd address hold disable. removes part of the hold time for lad with respect to lale in order to lengthen the lale pulse 0 during address phases on the local bus, the lale signal negates one platform clock period prior to the address being invalidated. at 333 mhz, this provides 3 ns of additional address hold time at the external address latch. 1 during address phases on the local bus, the lale signal negates half of one platform clock period prior to the address being invalidated. this halves the address hold time, but extends the latch enable duration. this may be necessary for very high frequency designs. 11?13 ? reserved 14 lpbse enables parity byte select on lgta /lgpl4/lupwait/lpbse pin. 0 parity byte select is disabled. lgta /lgpl4/lupwait/lpbse pin is available for memory control as lgpl4 (output) or lgta /lupwait (input). 1 parity byte select is enabled. lgta /lgpl4/lupwait/lpbse pin is dedicated as the parity byte select output, and lgta /lupwait is disabled. 15 epar determines odd or even parity. writing the memory with epar = 1 and reading the memory with epar = 0 generates parity errors for testing. 0 odd parity 1 even parity
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-32 freescale semiconductor local bus controller 13.3.1.16 clock ratio register (lcrr) the clock ratio register sets the system (ccb) clock to lbc bus frequency ratio. it also provides configuration bits for extra delay cycles for address and control signals. table 13-22 describes lcrr fields. 16?23 bmt bus monitor timing. defines the bus monitor time-out period. clearing bmt (reset value) selects the maximum count of 2048 bus clock cycles. for non-zero values of bmt, the number of lclk clock cycles to count down before a time-out error is generated is given by: bus cycles = bmt x 8. apart from bmt = 0x00, the minimum value of bmt is 5, corresponding with 40 bus cycles. shorter time-outs may result in spurious errors during sdram operation. 24?31 ? reserved 0 1 2 3 4 5 6 7 8 1314 1516 2728 31 r dbyp bufcmdc ecl eadc clkdiv w reset 1000_0000_0000_0000_0000_0000_0000_1000 offset 0x0_50d4 figure 13-19. clock ratio register (lcrr) table 13-22. lcrr field descriptions bits name description 0 dbyp dll bypass. this bit should be set when using low bus clock frequencies if the dll is unable to lock. when in dll bypass mode, incoming data is captured in the middle of the bus clock cycle. 0 the dll is enabled. 1 the dll is bypassed. 1?reserved 2?3 bufcmdc additional delay cycles for sdram control signals. defines the number of cycles to be added for each sdram command when lsdmr[bufcmd] = 1. 00 4 01 1 10 2 11 3 4?5 ? reserved 6?7 ecl extended cas latency. determines the extended cas latency for sdram accesses when lsdmr[cl] = 00. 00 4 01 5 10 6 11 7 8?13 ? reserved table 13-21. lbcr field descriptions (continued) bits name description
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-33 13.4 functional description the lbc allows the implementation of memory systems with very specific timing requirements.  the sdram machine provides an interface to sdrams using bank interleaving and back-to-back page mode to achieve high performance through a multiplexed address/data bus. an internal dll for bus clock generation ensures improved data set-up margins for board designs.  the gpcm provides interfacing for simpler, lower-performance memories and memory-mapped devices. it has inherently lower performance because it does not support bursting. for this reason, gpcm-controlled banks are used primarily for boot-loading and access to low-performance memory-mapped peripherals.  the upm supports refresh timers, address multiplexing of the external bus and generation of programmable control signals for row address and column address strobes, to allow for a minimal glue logic interface to drams, burstable srams, and almost any other kind of peripheral. the upm can be used to generate flexible, user-defined timing patterns for control signals that govern a memory device. these patterns define how the external control signals behave during a read, write, burst-read, or burst-write access. refresh timers are also available to periodically initiate user-defined refresh patterns. 14?15 eadc external address delay cycles. defines the number of cycles for the assertion of lale. note that lale negates prior to the end of the final local bus clock, as controlled by lbcr[ahd]. 00 4 01 1 10 2 11 3 16?27 ? reserved 28?31 clkdiv system (ccb) clock divider. sets the frequency ratio between the system (ccb) clock and the memory bus clock. only the values shown in the table below are allowed. 0000?0001reserved 0010 2 0011 reserved 0100 4 0101?0111reserved 1000 8 1001?1111reserved table 13-22. lcrr field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-34 freescale semiconductor local bus controller figure 13-20. basic operation of memory controllers in the lbc each memory bank (chip select) can be assigned to any one of these three type of machines through the machine select bits of the base register for that bank (br n [msel]), as illustrated in figure 13-20 . if a bank match occurs, the corresponding machine (gpcm, sdram or upm) then takes ownership of the external signals that control the access and maintains control until the transaction ends. 13.4.1 basic architecture the following sections describe the basic architecture of the lbc. 13.4.1.1 address and address space checking the defined base addresses are written to the br n registers, while the corresponding address masks are written to the or n registers. each time a local bus access is requested, the internal transaction address is compared with each bank. addresses are decoded by comparing the 19 msbs of the address, masked by or n [xam] and or n [am], with the base address for each bank (br n [xba] and br n [ba]). if a match is found on a memory controller bank, the attributes defined in the br n and or n for that bank are used to control the memory access. if a match is found in more than one bank, the lowest-numbered bank handles the memory access (that is, bank 0 has priority over bank 1). address comparator bank select upm a/b/c gpcm msel field signals timing generator mux internal memory access request select 34-bit system external signals sdram machine address 32-bit physical ram address (a)
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-35 13.4.1.2 external address latch enable signal (lale) the local bus uses a multiplexed address/data bus. therefore the lbc must distinguish between address and data phases, which take place on the same bus (lad[0:31] pins). the lale signal, when asserted, signifies an address phase during which the lbc drives the memory address on the lad[0:31] pins. an external address latch uses this signal to capture the address and provide it to the address pins of the memory or peripheral device. when lale is negated, lad[0:31] then serves as the (bi-directional) data bus for the access. any address phase initiates the assertion of lale, which has a programmable duration of between 1 and 4 bus clock cycles. to ensure adequate hold time on the external address latch, lale negates earlier than the address changes on lad[0:31] during address phases. by default, lale negates earlier by an amount equal to the platform clock period (which, divided by lcrr[clkdiv], yields the bus clock). for example, if lbc is operating at 333 mhz internally, then an additional 3 ns of address hold time is introduced. however, when lcrr[clkdiv] = 2 and the lclk frequency exceeds 100 mhz, the duration of the shortened lale pulse may not meet the minimum latch enable pulse width specifications of some latches. in such cases, setting lbcr[ahd] = 1 increases the lale pulse width by half of one platform clock cycle, and decreases the address hold time by the same amount. at 333 mhz and with lcrr[clkdiv] = 2, the duration of lale would then be 4.5 ns, with 1.5 ns of hold time. if both longer hold time and longer lale pulse duration are needed, then the address phase can be extended using the orn[ead] and lcrr[eadc] fields, and the lbcr[ahd] bit can be left at 0. however, this will add latency to all address tenures. the frequency of lale assertion varies across the three memory controllers. for gpcm, every assertion of lcs n is considered an independent access, and accordingly, lale asserts prior to each such access. for example, gpcm driving an 8-bit port would assert lale and lcs n 32 times in order to satisfy a 32-byte cache line transfer. the sdram controller asserts lale only to initiate a burst transfer with a starting address, therefore no more than one assertion of lale may be required for sdram to transfer a 32-byte cache line through a 32-bit port. in the case of upm, the frequency of lale assertion depends on how the upm ram is programmed. upm single accesses typically assert lale once, upon commencement, but it is possible to program upm to assert lale several times, and to change the values of la[27:31] with and without lale being involved. in general, when using the gpcm and sdram controllers it is not necessary to use la[27:31] if a sufficiently wide latch is used to capture the entire address during lale phases. upm may require la[27:31] if the lbc is generating its own burst address sequence. to illustrate how a large transaction is handled by the lbc, figure 13-21 shows lbc signals for gpcm performing a 32-byte write starting at address 0x5420. note that during each of the 32 assertions of lale, la[27:31] exactly mirror lad[27:31], but during data phases, only lad[0:7] and ldp[0] are driven with valid data and parity, respectively.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-36 freescale semiconductor local bus controller figure 13-21. example of 8-bit gpcm writing 32 bytes to address 0x5420 13.4.1.3 data transfer acknowledge (ta) the three memory controllers in the lbc generate an internal transfer acknowledge signal, ta, to allow data on lad[0:31] to be either sampled (for reads) or changed (on writes). the data sampling/data change always occurs at the end of the bus cycle in which the lbc asserts ta internally. in lbc debug mode, ta is also visible externally on the mdval pin. gpcm and sdram controllers automatically generate ta according to the timing parameters programmed for them in option and mode registers; a upm generates ta only when a upm pattern has the uta ram word bit set. figure 13-22 shows lale, ta (internal), and lcs n . note that ta and lale are never asserted together, and that for the duration of lale, lcs n (or any other control signal) remains negated or frozen. 00 00 00 00 00 00 00 00 01 02 03 1c 1d 1e 1f 0p(b 0 ) 000 00 0 p(b 1 )p(b 2 )p(b 29 )p(b 30 ) p(b 31 ) d(b 0 ) d(b 1 )d(b 2 )d(b 29 )d(b 30 ) d(b 31 ) 54 54 54 54 54 54 54 0 000 0 0 0 20 21 22 23 3f 3e 3d note : all address and signal values are shown in hexadecimal. d(bk) = k th of 32 data bytes, p(bk) = parity bit of k th data byte. lclk lale lcs n lwe la[27:31] lad[0:7] lad[8:31] ldp[0] ldp[1:3]
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-37 figure 13-22. basic lbc bus cycle with lale, ta, and lcs n 13.4.1.4 data buffer control (lbctl) the memory controller provides a data buffer control signal for the local bus (lbctl). this signal is activated when a gpcm or upm controlled bank is accessed. lbctl can be disabled by setting or n [bctld]. access to an sdram machine controlled bank does not activate the lbctl control. lbctl can be further configured by lbcr[bctlc] to act as an extra lwe or an extra loe signal when in gpcm mode. if lbctl is configured as a data buffer control (lbcr[bctlc] = 00), the signal is asserted (high) on the rising edge of the bus clock on the first cycle of the memory controller operation, coincident with lale. if the access is a write, lbctl remains high for the whole duration. however, if the access is a read, lbctl is negated (low) with the negation of lale so that the memory device is able to drive the bus. if back-to-back read accesses are pending, lbctl is asserted (high) one bus clock cycle before the next transaction starts (that is, one bus clock cycle before lale) to allow a whole bus cycle for the bus to turn around before the next address is driven. if an external bus transceiver is used, lbctl should be used to signify the write direction when high. note that the default (reset and bus idle) value of lbctl is also high. 13.4.1.5 atomic operation the lbc supports the following kinds of atomic bus operations (set by br n [atom]):  read-after-write atomic (rawa). when a write access hits a memory bank in which atom = 01, the lbc reserves the selected memory bank for the exclusive use of the accessing master. while the bank is reserved, no other device can be granted access to this bank. the reservation is released when the master that created it accesses the same bank with a read transaction. additional write transactions prior to the releasing read do not change reservation status, but are otherwise processed normally. if the master fails to release the lad lale lcs n ta address data lclk
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-38 freescale semiconductor local bus controller reservation within 256 bus clock cycles, the reservation is released and an atomic error is reported (if enabled). this feature is intended for cam operations.  write-after-read atomic (wara). when a read access hit a memory bank in which atom = 10, the lbc reserves the bus for the exclusive use of the accessing master. during the reservation period, no other device can be granted access to the atomic bank. the reservation is released when the device that created it accesses the same bank with a write transaction. additional read transactions prior to the releasing write are otherwise processed normally and do not change the reservation status. if the device fails to release the reservation within 256 bus clock cycles, the reservation is released and an atomic error is reported (if enabled). 13.4.1.6 parity generation and checking (ldp) parity can be configured for any bank by programming br n [decc]. parity is generated and checked on a per-byte basis using ldp[0:3] for the bank if br n [decc] = 01 (normal parity) or br n [decc] = 10 for read-modify-write (rmw) parity. byte lane parity on ldp[0:3] is generated regardless of the br n [decc] setting. note that rmw parity can be used only for 32-bit port size banks. lbcr[epar] determines the global type of parity (odd or even). 13.4.1.7 bus monitor a bus monitor is provided to ensure that each bus cycle is terminated within a reasonable (user defined) period. when a transaction starts, the bus monitor starts counting down from the time-out value (lbcr[bmt]) until a data beat is acknowledged on the bus. it then reloads the time-out value and resumes the countdown until the data tenure completes and then idles if there is no pending transaction. setting ltedr[bmd] disables bus monitor error reporting through ltesr[bm]; however, the bus monitor is still active and can generate a upm exception or terminate a gpcm access. it is very important to ensure that the value of lbcr[bmt] is not set too low; otherwise spurious bus time-outs may occur during normal operation?particularly for sdrams? resulting in incomplete data transfers. accordingly, apart from the reset value of 0x00 (corresponding with the maximum time-out of 2048 bus cycles), lbcr[bmt] must not be set below 0x05 (or 40 bus cycles for time-out) under any circumstances. 13.4.2 general-purpose chip-select machine (gpcm) the gpcm allows a minimal glue logic and flexible interface to sram, eprom, feprom, rom devices, and external peripherals. the gpcm contains two basic configuration register groups?br n and or n . figure 13-23 shows a simple connection between an 8-bit port size sram device and the lbc in gpcm mode. byte-write enable signals (lwe ) are available for each byte written to memory.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-39 also, the output enable signal (loe ) is provided to minimize external glue logic. on system reset, a global (boot) chip-select is available that provides a boot rom chip-select (lcs0 ) prior to the system being fully configured. figure 13-23. local bus to gpcm device interface figure 13-24 shows lcs as defined by the setup time required between the address lines and ce . the user can configure or n [acs] to specify lcs to meet this requirement. figure 13-24. gpcm basic read timing (xacs = 0, acs = 1x, trlx = 0, clkdiv = 4,8) 13.4.2.1 timing configuration if br n [msel] selects the gpcm, the attributes for the memory cycle are taken from or n . these attributes include the csnt, acs, xacs, scy, trlx, ehtr, and seta fields. table 13-23 ce oe w [3:0] data[7:0] memory/peripheral lale lwe [0:3] loe lcs n la[30:31] la[27:29] lad[12:26] a[19:5] a[4:2] a[0:1] lbc in gpcm mode latch lad[0:7] lclk lad lale lcs n loe address read data a[19:5] latched address ta acs = 11 acs = 10
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-40 freescale semiconductor local bus controller shows signal behavior and system response for a write access with lcrr[clkdiv] = 4 or lcrr[clkdiv] = 8. table 13-24 shows the signal behavior and system response for a read access with lcrr[clkdiv] = 4 or lcrr[clkdiv] = 8. table 13-25 and table 13-26 show the write and read signal behavior, respectively, when lcrr[clkdiv] = 2. table 13-23. gpcm write control signal timing for lcrr[clkdiv] = 4 or 8 option register attributes signal behavior (bus clock cycles) trlx xacs acs csnt address to lcs n asserted lcs n negated to address change lwe negated to address/data invalid total cycles 1 1 total cycles when lale is asserted for one cycle only (or n [ead] = 0; or n [ead] = 1 and lcrr[eadc] = 01). asserting lale for more than one cycle increases the total cycle count accordingly. 0 0 00 0 0 0 0 3+scy 0 0 10 0 1/4 0 0 3+scy 00110 1/2 0 0 3+scy 0 1 00 0 0 0 0 3+scy 0 1 10 0 1 0 0 3+scy 01110 2 0 0 4+scy 0 0 00 1 0 0 ?1/4 3+scy 0 0 10 1 1/4 ?1/4 ?1/4 3+scy 0 0 11 1 1/2 ?1/4 ?1/4 3+scy 0 1 00 1 0 0 ?1/4 3+scy 0 1 10 1 1 ?1/4 ?1/4 3+scy 0 1 11 1 2 ?1/4 ?1/4 4+scy 1 0 00 0 0 0 0 3+2*scy 1 0 10 0 1+1/4 0 0 4+2*scy 10110 1+1/2 0 0 4+2*scy 1 1 00 0 0 0 0 3+2*scy 1 1 10 0 2 0 0 4+2*scy 11110 3 0 0 5+2*scy 1 0 00 1 0 0 ?1?1/4 4+2*scy 1 0 10 1 1+1/4 ?1?1/4 ?1?1/4 5+2*scy 1 0 11 1 1+1/2 ?1?1/4 ?1?1/4 5+2*scy 1 1 00 1 0 0 ?1?1/4 4+2*scy 1 1 10 1 2 ?1?1/4 ?1?1/4 5+2*scy 1 1 11 1 3 ?1?1/4 ?1?1/4 6+2*scy
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-41 table 13-24. gpcm read control signal timing for lcrr[clkdiv] = 4 or 8 option register attributes signal behavior (bus clock cycles) trlx ehtr xacs acs address to lcs n asserted lcs n negated to address change total cycles 1 1 total cycles when lale is asserted for one cycle only (or n [ead] = 0; or n [ead] = 1 and lcrr[eadc] = 01). asserting lale for more than one cycle increases the total cycle count accordingly. 00 000 0 1 4+scy 00 010 1/4 1 4+scy 00 011 1/2 1 4+scy 00 100 0 1 4+scy 00 110 1 1 4+scy 00 111 2 1 5+scy 01 000 0 2 5+scy 01 010 1/4 2 5+scy 01 011 1/2 2 5+scy 01 100 0 2 5+scy 01 110 1 2 5+scy 01 111 2 2 6+scy 10 000 0 5 8+2*scy 10 010 1+1/4 5 9+2*scy 10 011 1+1/2 5 9+2*scy 10 100 0 5 8+2*scy 10 110 2 5 9+2*scy 10 111 3 5 10+2*scy 11 000 0 9 12+2*scy 11 010 1+1/4 9 13+2*scy 11 011 1+1/2 9 13+2*scy 11 100 0 9 12+2*scy 11 110 2 9 13+2*scy 11 111 3 9 14+2*scy
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-42 freescale semiconductor local bus controller table 13-25. gpcm write control signal timing for lcrr[clkdiv] = 2 option register attributes signal behavior (bus clock cycles) trlx xacs acs csnt address to lcs n asserted lcs n negated to address change lwe negated to address/data invalid total cycles 1 1 total cycles when lale is asserted for one cycle only (or n [ead]=0; or n [ead]=1 and lcrr[eadc]=01). asserting lale for more than one cycle increases the total cycle count accordingly. 0 0 00 0 0 0 0 3+scy 0 0 10 0 1/2 0 0 3+scy 00110 1/2 0 0 3+scy 0 1 00 0 0 0 0 3+scy 0 1 10 0 1 0 0 3+scy 01110 2 0 0 4+scy 0 0 00 1 0 0 0 3+scy 0 0 10 1 1/2 0 0 3+scy 00111 1/2 0 0 3+scy 0 1 00 1 0 0 0 3+scy 0 1 10 1 1 0 0 3+scy 01111 2 0 0 4+scy 1 0 00 0 0 0 0 3+2*scy 1 0 10 0 1+1/2 0 0 4+2*scy 1 0 11 0 1+1/2 0 0 4+2*scy 1 1 00 0 0 0 0 3+2*scy 1 1 10 0 2 0 0 4+2*scy 1 1 11 0 3 0 0 5+2*scy 10001 0 0 ?1 4+2*scy 1 0 10 1 1+1/2 ?1 ?1 5+2*scy 1 0 11 1 1+1/2 ?1 ?1 5+2*scy 11001 0 0 ?1 4+2*scy 1 1 10 1 2 ?1 ?1 5+2*scy 1 1 11 1 3 ?1 ?1 6+2*scy
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-43 table 13-26. gpcm read control signal timing for lcrr[clkdiv] = 2 option register attributes signal behavior (bus clock cycles) trlx ehtr xacs acs address to lcs n asserted lcs n negated to address change total cycles 1 1 total cycles when lale is asserted for 1 cycle only (or n [ead]=0; or n [ead]=1 and lcrr[eadc]=01). asserting lale for more than 1 cycle increases the total cycle count accordingly. 00 000 0 1 4+scy 00 010 1/2 1 4+scy 00 011 1/2 1 4+scy 00 100 0 1 4+scy 00 110 1 1 4+scy 00 111 2 1 5+scy 01 000 0 2 5+scy 01 010 1/2 2 5+scy 01 011 1/2 2 5+scy 01 100 0 2 5+scy 01 110 1 2 5+scy 01 111 2 2 6+scy 10 000 0 5 8+2*scy 10 010 1+1/2 5 9+2*scy 10 011 1+1/2 5 9+2*scy 10 100 0 5 8+2*scy 10 110 2 5 9+2*scy 1 0 1 11 3 5 10+2*scy 1 1 0 00 0 9 12+2*scy 1 1 0 10 1+1/2 9 13+2*scy 1 1 0 11 1+1/2 9 13+2*scy 1 1 1 00 0 9 12+2*scy 1 1 1 10 2 9 13+2*scy 1 1 1 11 3 9 14+2*scy
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-44 freescale semiconductor local bus controller 13.4.2.2 chip-select assertion timing the banks selected to work with the gpcm, support an option to drive the lcs n signal with different timings (with respect to the external address/data bus). lcs n can be driven in any of the following ways:  simultaneous with the latched memory address. (this refers to the externally latched address and not the address timing on lad[0:31]. that is, chip select does not assert during lale).  one quarter of a clock cycle later (for lcrr[clkdiv] = 4 or 8).  one half of a clock cycle later (for lcrr[clkdiv] = 2, 4, or 8).  one clock cycle later (for lcrr[clkdiv] = 4), when or n [xacs] = 1.  two clock cycles later (for lcrr[clkdiv] = 2, 4, or 8), when or n [xacs] = 1.  three clock cycles later (for lcrr[clkdiv] = 2, 4, or 8), when or n [xacs] = 1 and or n [trlx] = 1. the timing diagram in figure 13-24 shows two chip-select assertion timings for the case lcrr[clkdiv] = 4 or 8. if lcrr[clkdiv] = 2, lcs n asserts identically for or n [acs] = 10 or 11. 13.4.2.2.1 programmable wait state configuration the gpcm supports internal generation of transfer acknowledge. it allows between zero and 30 wait states to be added to an access by programming or n [scy] and or n [trlx]. internal generation of transfer acknowledge is enabled if or n [seta] = 0. if lgta is asserted externally two bus clock cycles or more before the wait state counter has expired (to allow for synchronization latency), the current memory cycle is terminated by lgta ; otherwise it is terminated by the expiration of the wait state counter. regardless of the setting of or n [seta], wait states prolong the assertion duration of both loe and lwe n in the same manner. when trlx = 1, the number of wait states inserted by the memory controller is doubled from or n [scy] cycles to 2 or n [scy] cycles, allowing a maximum of 30 wait states. 13.4.2.2.2 chip-select and write enable negation timing figure 13-23 shows a basic connection between the local bus and a static memory device. in this case, lcs n is connected directly to ce of the memory device. the lwe [0:3] signals are connected to the respective we [3:0] signals on the memory device where each lwe [0:3] signal corresponds to a different data byte.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-45 figure 13-25. gpcm basic write timing (xacs = 0, acs = 00, csnt = 1, scy = 1, trlx = 0, clkdiv = 4 or 8) as figure 13-25 shows, the timing for lcs n is the same as for the latched address. the strobes for the transaction are supplied by loe or lwe n , depending on the transaction direction?read or write (write case shown in figure 13-25 ). or n [csnt] controls the timing for the appropriate strobe negation in write cycles. when this attribute is asserted, the strobe is negated one quarter of a clock before the normal case provided that lcrr[clkdiv] = 4 or 8. for example, when acs = 00 and csnt = 1, lwe n is negated one quarter of a clock earlier, as shown in figure 13-25 . if lcrr[clkdiv] = 2, lwe n is negated either coincident with lcs n or one cycle earlier. 13.4.2.2.3 relaxed timing or x [trlx] is provided for memory systems that require more relaxed timing between signals. setting trlx = 1 has the following effect on timing:  an additional bus cycle is added between the address and control signals (but only if acs 00).  the number of wait states specified by scy is doubled, providing up to 30 wait states.  the extended hold time on read accesses (ehtr) is extended further. lcs n signals are negated 1 cycle earlier during writes (but only if acs 00). lwe [0:3] signals are negated 1 cycle earlier during writes. lclk lad lale lcs n lwe n address write data a latched address ta loe csnt = 1 scy = 1
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-46 freescale semiconductor local bus controller figure 13-26. gpcm relaxed timing read (xacs = 0, acs = 1x, scy = 1, csnt = 0, trlx = 1, clkdiv = 4 or 8) figure 13-27. gpcm relaxed timing back-to-back writes (xacs = 0, acs = 1x, scy = 0, csnt = 0, trlx = 1, clkdiv = 4 or 8) lclk lad lale lcs n lbctl address a latched address ta lwe n acs = 10 read data loe acs = 11 scy = 1, trlx = 1 lclk lad lale lcs n lbctl address 1 a latched address 1 ta lwe n acs = 10 write data 1 loe acs = 11 address 2 latched address 2 write data 2
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-47 figure 13-26 and figure 13-27 show relaxed timing read and write transactions. the effect of clkdiv = 2 for these examples is only to delay the assertion of lcs n in the acs = 10 case to the acs = 11 case. the example in figure 13-27 also shows address and data multiplexing on lad[0:31] for a pair of writes issued consecutively. when trlx and csnt are set in a write access, the lwe [0:3] strobe signals are negated one clock earlier than in the normal case, as shown in figure 12-28 and figure 12-29. if acs 00, lcs n is also negated one clock earlier. figure 13-28. gpcm relaxed timing write (xacs = 0, acs = 10, scy = 0, csnt = 1, trlx = 1, clkdiv = 4 or 8) lclk lad lale lcs n lbctl address a latched address ta lwe n acs = 10 write data loe csnt = 1
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-48 freescale semiconductor local bus controller figure 13-29. gpcm relaxed timing write (xacs = 0, acs = 00, scy = 1, csnt = 1, trlx = 1, clkdiv = 4 or 8) 13.4.2.2.4 output enable (loe ) timing the timing of the loe is affected only by trlx. it always asserts and negates on the rising edge of the bus clock. loe asserts either on the rising edge of the bus clock after lcs n is asserted or coinciding with lcs n (if xacs = 1 and acs = 10 or 11). accordingly, assertion of loe can be delayed (along with the assertion of lcs n ) by programming trlx = 1. loe negates on the rising clock edge coinciding with lcs n negation 13.4.2.2.5 extended hold time on read accesses slow memory devices that take a long time to disable their data bus drivers on read accesses should choose some combination of or n [trlx,ehtr]. any access following a read access to the slower memory bank is delayed by the number of clock cycles specified in table 13-6 in addition to any existing bus turnaround cycle. the final bus turnaround cycle is automatically inserted by the lbc for reads, regardless of the setting of or n [ehtr]. lclk lad lale lcs n lbctl address a latched address ta lwe n write data loe csnt = 1 scy = 1, trlx = 1
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-49 figure 13-30. gpcm read followed by read (trlx = 0, ehtr = 0, fastest timing) figure 13-31. gpcm read followed by write (trlx = 0, ehtr = 1, 1-cycle extended hold time on reads) 13.4.2.3 external access termination (lgta ) external access termination is supported by the gpcm using the asynchronous lgta input signal, which is synchronized and sampled internally by the local bus. if, during assertion of lcs n , lclk lad lale lcs n lbctl address 1 a latched address 1 ta loe read data 1 address 2 data 2 latched address 2 lcsy bus turnaround lclk lad lale lcs n lbctl rd. address a latched read address ta loe wr. address wr. address lcsy extended hold bus turnaround wr. data read data
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-50 freescale semiconductor local bus controller the sampled lgta signal is asserted, it is converted to an internal generation of transfer acknowledge, which terminates the current gpcm access (regardless of the setting of or n [seta]). lgta should be asserted for at least one bus cycle to be effective. note that because lgta is synchronized, bus termination occurs two cycles after lgta assertion, so in case of read cycle, the device still must drive data as long as loe is asserted. the user selects whether transfer acknowledge is generated internally or externally (lgta ) by programming or n [seta]. asserting lgta always terminates an access, even if or n [seta] = 0 (internal transfer acknowledge generation), but it is the only means by which an access can be terminated if or n [seta] = 1. the timing of lgta is illustrated by the example in figure 13-32 . figure 13-32. external termination of gpcm access 13.4.2.4 boot chip-select operation boot chip-select operation allows address decoding for a boot rom before system initialization. lcs0 is the boot chip-select output; its operation differs from other external chip-select outputs after a system reset. when the core begins accessing memory after system reset, lcs0 is asserted for every local bus access until br0 or or0 is reconfigured. the boot chip-select also provides a programmable port size, which is configured during reset. the boot chip-select does not provide write protection. lcs0 operates this way until the first write to or0 and it can be used as any other chip-select register after the preferred address range is loaded into br0. after the first write to or0, the boot chip-select can be restarted only with a hardware reset. table 13-27 describes the initial values of the boot bank in the memory controller. lclk lad lale lcs n lbctl address a latched address ta loe lgta read data
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-51 13.4.3 sdram machine the lbc provides an sdram interface (machine) for the local bus. the machine provides the control functions and signals for intel pc133 and jedec-compliant sdram devices. each bank can control an sdram device on the local bus. 13.4.3.1 supported sdram configurations the memory controller supports any sdram configuration with the restrictions that all sdram devices that reside on the bus should have the same port size and timing parameters (as defined in lsdmr). figure 13-33 shows an example connection between the lbc and a 32-bit sdram device with 12 address lines. note that address signals a[4:0] of the sdram connect directly to la[27:31], address pin a10 connects to the lbcs dedicated lsda10 signal, while the remaining address bits (except a10) are latched from lad[20:26]. table 13-27. boot bank field values after reset register field setting br0 ba xba ps decc wp msel atom v 0000_0000_0000_0000_0 00 from pin during reset. 00 0 000 00 1 or0 am xam bctld csnt acs xacs scy seta trlx ehtr ead 0000_0000_0000_0000_0 00 0 1 11 1 1111 0 1 1 1
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-52 freescale semiconductor local bus controller figure 13-33. connection to a 32-bit sdram with 12 address lines 13.4.3.2 sdram power-on initialization following a system reset, initialization software must set up the programmable parameters in the memory controller banks registers (or n , br n , lsdmr). after all memory parameters are configured, system software should execute the following initialization sequence for each sdram device.  issue a precharge-all-banks command  issue eight auto-refresh commands  issue a mode-set command to initialize the mode register the initial commands are executed by setting lsdmr[op] and accessing the sdram with any write that hits the relevant bank. note that software should ensure that no memory operations begin until this process completes. 13.4.3.3 intel pc133 and jedec-standard sdram interface commands the sdram machine performs all accesses to sdram by using intel pc133 and jedec-standard sdram interface commands. the sdram device samples the command and lsda10 lsddqm[0:3] lcs1 lad[0:31] sdram local bus latch memory address lale lsdwe 32-bit port size lsdras lsdcas controller lcke lclk la[27:29] we ras cas cs dqm[3:0] a10 a[11,9:3] dq[31:0] clk cke a[2:0] lad[18,20:26] memory data
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-53 data inputs on the rising edge of the bus clock. data at the output of the sdram device is sampled on the rising edge of the bus clock. the following sdram interface commands are provided by setting lsdmr[op] to a non-zero value (lsdmr[op] = 000 sets normal read/write operation): 13.4.3.4 page hit checking the sdram machine supports page-mode operation. each time a page is activated on the sdram device, the sdram machine stores its address in a page register. the page information, which the user writes to the or n register, is used along with the bank size to compare page bits of table 13-28. sdram interface commands command (lsdmr[op]) description activate (110) latches the row address and initiates a memory read of that row. row data is latched in sdram sense amplifiers and must be restored with a precharge command before another activate is issued. mode-set (011) allows setting of sdram options?cas latency and burst length. cas latency depends on the sdram device used. although some sdrams provide burst lengths of 1, 2, 4, 8, or a page, the local bus memory controller supports only 8-beat bursts for 8-bit and 32-bit port size, or 4-beat bursts for 16-bit port size. the lbc does not support burst lengths of 1, 2 and a page for sdrams. the mode register data (cas latency and burst length) is programmed into the lsdmr register by initialization software after reset. after the lsdmr is set, the lbc transfers the information to the sdram device by issuing a mode-set command. precharge (100: single bank) (101: all-banks) restores data from the sense amplifiers to the appropriate row in the sdram device array. also initializes the sense amplifiers to prepare for activating another row in the sdram device. note that the lbc uses lsda10 to distinguish between precharge-all-banks (lsda10 is high) and precharge-single-bank (lsda10 is low). the sdrams must be compatible with this format. read (111) latches the column address and transfers data from the selected sense amplifier on the sdram device, to the output buffer as determined by the column address. during each successive clock, additional data is driven without additional read commands. at the end of the burst, the page remains open. burst length is the one set for this bank. read data is discarded by the lbc. write (111) latches the column address and transfers data from the data signals to the selected sense amplifier on the sdram device, as determined by the column address. during each successive clock, additional data is transferred to the sense amplifiers from the data signals without additional write commands. at the end of the burst, the page remains open. burst length is the one set for this bank. lsddqm[0:3] are inactive and write data is undefined. auto-refresh (001) causes a row to be read in all memory banks (jedec sdram) as determined by the refresh row address counter (similar to cbr). the refresh row address counter is internal to the sdram device. after being read, a row is automatically rewritten into the memory array. all banks must be in a precharged state before executing refresh. self-refresh (010) allows data to be retained in the sdram device, even when the rest of the lbc is in a power saving mode with clocks turned off. when placed in this mode, the sdram device is capable of issuing its own refresh commands, without external clocking from the lbc and the lcke pin from the lbc is negated. this command can be issued at any time. normal operation can be resumed only by setting lsdmr[op] = 000, and waiting a minimum of 200 bus cycles before issuing reads or writes to the lbc.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-54 freescale semiconductor local bus controller the address to the page register each time a bus-cycle access is requested. if a match is found, together with a bank match, the bus cycle is defined as a page hit. an open page is automatically closed by the sdram machine if the bus becomes idle, unless or n [pmsel] = 1. 13.4.3.5 page management the lbc can manage at most four open pages (one page per sdram bank) for a single sdram device. after a page is opened, it remains open unless:  the next access is to a page in a different sdram device, in which case all open pages on the current device are closed with a precharge-all-banks command.  the next access is to a page in an sdram bank that has a different page open on it, in which case the old page is closed with a precharge-single-bank command.  the current sdram device requires refresh services, in which case all open pages on the current device are closed with a precharge-all-banks command.  the bus becomes idle and or n [pmsel] = 0, in which case all open pages in the current device are closed with a precharge-all-banks command. 13.4.3.6 sdram address multiplexing the lower address bus bits are connected to the memory device?s address port with the memory controller multiplexing the row/column and the internal bank select lines. the position of the bank select lines are set according to lsdmr[bsma]. figure 13-34 shows how the sdram controller shifts the row address down to the lower output address signals during activate and shifts the bank select bits up to the address pins specified by lsdmr[bsma], supporting page-based interleaving. the lsb of the logical row address (a n in figure 13-34 ) is aligned with the connected lsb of lad (bits 29, 30, and 31 for port sizes of 32, 16, and 8 bits, respectively). figure 13-34. sdram address multiplexing row column activate address (ras): msbs bs lsbs row lsbs bs to memory device pins, 031 logical address: lsbs bs row column r/w address (cas): ? a n except a10
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-55 note that during normal operation (read/write), a full 32-bit address that includes row and column is generated on lad[0:31]. however, address/data signal multiplexing implies that the address must be latched by an external latch that is controlled by lale. all sdram device address signals need to be connected to the latched address bits and burst address bits (la[27:31]) of the lbc, with the exception of a10, which has a dedicated connection on lsda10. lsda10 is driven with the appropriate row address bit for sdram commands that require a10 to be an address. 13.4.3.7 sdram device-specific parameters the software is responsible for setting correct values for device-specific parameters that can be extracted from the device?s data sheet. the values are stored in the or n and lsdmr registers. these parameters include the following:  precharge to activate interval (lsdmr[pretoact])  activate to read/write interval (lsdmr[acttorw])  cas latency, column address to first data out (lsdmr[cl] and lcrr[ecl])  write recovery, last data in to precharge (lsdmr[wrc])  refresh recovery interval (lsdmr[rfrc])  external buffers on the control lines present (lsdmr[bufcmd] and lcrr[bufcmdc]) in addition, the lbc hardware ensures a default activate to precharge interval of 10 bus cycles. the following sections describe sdram parameters programmed in lsdmr. 13.4.3.7.1 precharge-to-activate interval the precharge-to-activate interval parameter, controlled by lsdmr[pretoact]. defines the earliest timing for an activate or refresh command after a precharge command to the same sdram bank. figure 13-35. pretoact = 2 (2 clock cycles) 1111 0000 1111 zzzzzzzz ras add xxxxx cas add d0 zzzzzzzz lclk lale lcs n lsdras lsdcas lsdwe lsddqm[0:3] lad[0:31] pretoact = 2 precharge command bank a activate command bank a
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-56 freescale semiconductor local bus controller 13.4.3.7.2 activate-to-read/write interval this parameter, controlled by lsdmr[acttorw], defines the earliest timing for a read/write command after an activate command to the same sdram bank. figure 13-36. acttorw = 2 (2 clock cycles) 13.4.3.7.3 column address to first data out?cas latency this parameter, controlled by lsdmr[cl] for latency of 1, 2, or 3 and by lcrr[ecl] for latency of more than 3, defines the timing for first read data after a column address is sampled by the sdram. figure 13-37. cl = 2 (2 clock cycles) 13.4.3.7.4 last data in to precharge?write recovery this parameter, controlled by lsdmr[wrc], defines the earliest timing for a precharge command after the last data was written to the sdram. 1111 0000 1111 zzzzzzzz ras add xxxx cas add d0 zzzzzzzz lclk lale lcs n lsdras lsdcas lsdwe lsddqm[0:3] lad[0:31] d1 d2 d3 acttorw = 2 activate command write command 1111 0000 1111 zzzzzzzz ras add zzzzzzzz cas_add d0 d1 d2 lclk lale lcs n lsdras lsdcas lsdwe lsddqm [0:3] lad[0:31] d3 xxxx cl = 2 read command first data out
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-57 figure 13-38. wrc = 2 (2 clock cycles) 13.4.3.7.5 refresh recovery interval (rfrc) this parameter, controlled by lsdmr[rfrc], defines the earliest timing for an activate or refresh command after a refresh command to the same sdram device. figure 13-39. rfrc = 4 (6 clock cycles) 13.4.3.7.6 external address and command buffers (bufcmd) if the additional delay of any buffers placed on the command strobes (lsdras , lsdcas , lsdwe and lsda10), is endangering the device setup time, lsdmr[bufcmd] should be set. setting this bit causes the memory controller to add lcrr[bufcmdc] extra bus cycles to the assertion of sdram control signals (lsdras , lsdcas , lsdwe and lsda10) for each sdram command. 1111 0000 1111 zzzzzzzz cas add d0 ras add cas add lclk lale lcs n lsdras lsdcas lsdwe lsddqm [0:3] lad[0:31] d1 d2 d3 x 0000 d0 d1 wrc = 2 last data in precharge command write command 1111 zzzzzzzz ras add xxxx cas add lclk lale lcs n lsdras lsdcas lsdwe lsddqm [0:3] lad[0:31] rfrc = 4 (6 clocks) auto refresh command activate command precharge all command (if needed) pretoact = 3
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-58 freescale semiconductor local bus controller figure 13-40. bufcmd = 1, lcrr[bufcmdc] = 2 13.4.3.8 sdram interface timing the following figures show sdram timing for various types of accesses. figure 13-41. sdram single-beat read, page closed, cl = 3 figure 13-42. sdram single-beat read, page hit, cl = 3 figure 13-43. sdram two-beat burst read, page closed, cl = 3 1111 0000 1111 zzzzzz ras add xxxxxxxx cas add d3 zzzzzzzz lclk lale lcs n lsdras lsdcas lsdwe lsddqm lad d0 d1 d2 xxxx command setup cycle command setup cycle 1111 0000 1111 zzzzzzzz zzzzzzzz zzzzzzzz d0 zzzzzzzz lclk lale lcs n lsdras lsdcas lsdwe lsddqm [0:3] lad[0:31] col add row add ta 1111 0000 1111 zzzzzzzz col add zzzzzzzz lclk lale lcs n lsdras lsdcas lsdwe lsddqm [0:3] lad[0:31] ta d0 1111 0000 1111 zzzzzzzz zzzzzzzz zzzzzzzz d0 zzzzzzzz lclk lale lcs n lsdras lsdcas lsdwe lsddqm [0:3] lad[0:31] col add row add ta d1
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-59 figure 13-44. sdram four-beat burst read, page miss, cl = 3 figure 13-45. sdram single-beat write, page hit. figure 13-46. sdram three-beat write, page closed figure 13-47. sdram read-after-read pipelined, page hit, cl = 3 1111 0000 1111 zzzzzzzz row add zzzzzzzz col add zzzzzzzz d0 zzzzzzzz lclk lale lcs n lsdras lsdcas lsdwe lsddqm [0:3] lad[0:31] ta d1 d2 d3 deactivate activate 1111 0000 1111 zzzzzzzz col add d0 zzzzzzzz lclk lale lcs n lsdras lsdcas lsdwe lsddqm [0:3] lad ta 1111 0000 1111 zzzzzzzz ras add xxxxxxxx col add d0 d1 d2 zzzzzzzz lclk lale lcs n lsdras lsdcas lsdwe lsddqm [0:3] lad[0:31] ta 1111 0000 1111 0000 1111 z col add 1 z d0 d1 z col add 2 z x d0 d1 lclk lale lcs n lsdras lsdcas lsdwe lsddqm [0:3] lad[0:31] ta
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-60 freescale semiconductor local bus controller figure 13-48. sdram write-after-write pipelined, page hit figure 13-49. sdram read-after-write pipelined, page hit 13.4.3.9 sdram read/write transactions the sdram interface supports read and write transactions of between 1 and 8 data beats for transaction sizes ranging from 1 to 32 bytes. a full burst is performed for each transaction, with the burst length dependent on the port size. a maximum burst of 8 beats is used for an 8-bit or 32-bit port size, while a maximum burst of 4 beats is used for a 16-bit port size, as programmed in lsdmr[bl]. for reads that require less than the full burst length, extraneous data in the burst is ignored and suppressed by the assertion of lsddqm[0:3]. for writes that require less than the full burst length, the non-targeted addresses are protected by driving corresponding lsddqm bits high (inactive) on the irrelevant cycles of the burst. however, system performance is not compromised because, if a new transaction is pending, the sdram controller begins executing it immediately, effectively terminating the burst early. 13.4.3.10 sdram mode-set command timing the lbc transfers mode register data (cas latency and burst length) stored in the lsdmr register to the sdram device by issuing the mode-set command, as shown in figure 13-50 . in this case, the latched address carries the mode bits for the command. 1111 0000 1111 0000 z col add 1 d0 d1 d2 d3 col add 2 d0 d1 d2 d3 lclk lale lcs n lsdras lsdcas lsdwe lsddqm [0:3] lad[0:31] ta z 1111 0000 1111 0000 1111 z col add 1 d0 d1 d2 d3 col add 2 z d0 d1 d2 d3 z lclk lale lcs n lsdras lsdcas lsdwe lsddqm [0:3] lad[0:31] ta
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-61 figure 13-50. sdram mode-set command 13.4.3.11 sdram refresh the memory controller supplies auto-refresh commands to any connected sdram device according to the interval specified in lsrt (and prescaled by mrtpr[ptp]). this represents the time period required between refreshes. the values of lsrt and mrtpr depend on the specific sdram devices used and the system clock frequency of the lbc. this value should allow for a potential collision between memory accesses and refresh cycles. the period of the refresh interval must be greater than the access time to ensure that read and write operations complete successfully. there are two levels of refresh request priority?low and high. the low priority request is generated as soon as the refresh timer expires; this request is granted only if no other requests to the memory controller are pending. if the request is not granted (memory controller is busy) and the refresh timer expires two more times, the request becomes high priority and is served when the current memory controller operation finishes. 13.4.3.11.1 sdram refresh timing the sdram memory controller implements bank staggering for the auto refresh function. this reduces instantaneous current consumption for memory refresh operations. after a refresh request is granted, the memory controller begins issuing an auto-refresh command to each device associated with the refresh timer. after a refresh command is issued to an sdram device, the memory controller waits for the number of bus clock cycles programmed in the sdram machine?s mode register (lsdmr[rfcr]) before issuing any subsequent activate command to the same device. to avoid violating sdram device timing constraints, the user should ensure that the refresh request interval, defined by lsrt and mrtpr, is greater than the refresh recovery interval, defined by lsdmr[rfcr]. 1111 zzzzzzzz mode zzzzzzzz lclk lale lcs n lsdras lsdcas lsdwe lsddqm [0:3] lad[0:31] mode-set command
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-62 freescale semiconductor local bus controller figure 13-51. sdram bank-staggered auto-refresh timing 13.4.4 user-programmable machines (upms) upms are flexible interfaces that connect to a wide range of memory devices. at the heart of each upm is an internal ram array that specifies the logical value driven on the external memory control signals 1 (lcs n , lbs [0:3] and lgpl [0:5]) for a given clock cycle. each word in the ram array provides bits that allow a memory access to be controlled with a resolution of up to one quarter of the external bus clock period on the byte-select and chip-select lines. figure 13-52 shows the basic operation of each upm. figure 13-52. user-programmable machine functional block diagram 1.if the lgpl4/lgta /lupwait/lpbse signal is used as both an input and an output, a weak pullup is required. refer to the hardware specification for details regarding termination options. 1111 0000 1111 z row add x col add d0 z lclk lale lcs1 lcs2 lcs3 lcs4 lsdras lsdcas lsdwe lsddqm [0:3] lad[0:31] ta auto ref auto ref auto ref auto ref activate lsdmr[rfcr] run command upm refresh timer request array index generator internal / external memory access request exception request index signals timing generator internal signals latch wait request logic ram array lupwait waen bit internal controls lgpl n increment index (last = 0) hold (issued in software) lbs n lcs n
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-63 the following events initiate a upm cycle:  any internal device requests an external memory access to an address space mapped to a chip-select serviced by the upm  a upm refresh timer expires and requests a transaction, such as a dram refresh  a bus monitor time-out error during a normal upm cycle redirects the upm to execute an exception sequence the ram array contains 64 words of 32-bits each. the signal timing generator loads the ram word from the ram array to drive the general-purpose lines, byte-selects, and chip-selects. if the upm reads a ram word with waen set, the external lupwait signal is sampled and synchronized by the memory controller and the current request is frozen. 13.4.4.1 upm requests a special pattern location in the ram array is associated with each of the possible upm requests. an internal device?s request for a memory access initiates one of the following patterns (m x mr[op] = 00):  read single-beat pattern (rss)  read burst cycle pattern (rbs)  write single-beat pattern (wss)  write burst cycle pattern (wbs) a upm refresh timer request pattern initiates a refresh timer pattern (rts). an exception (caused by a bus monitor time-out error) occurring while another upm pattern is running initiates an exception condition pattern (exs). figure 13-53 and table 13-29 show the start addresses of these patterns in the upm ram, according to cycle type. run commands (m x mr[op] = 11), however, can initiate patterns starting at any of the 64 upm ram words.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-64 freescale semiconductor local bus controller figure 13-53. ram array indexing 13.4.4.1.1 memory access requests the user must ensure that the upm is appropriately initialized before a request occurs. the upm supports two types of memory reads and writes:  a single-beat transfer transfers one operand consisting of up to a single word (dependent on port size). a single-beat cycle starts with one transfer start and ends with one transfer acknowledge.  a burst transfer transfers exactly 4 double words regardless of port size. for 32-bit accesses, the burst cycle starts with one transfer start but ends after eight transfer acknowledges, whereas an 8-bit device requires 32 transfer acknowledges. the user must ensure that patterns for single-beat transfers contain one, and only one, transfer acknowledge (uta bit in ram word set high) and for a burst transfer, contain the exact number of transfer acknowledges required. table 13-29. upm routines start addresses upm routine routine start address read single-beat (rss) 0x00 read burst (rbs) 0x08 write single-beat (wss) 0x18 write burst (wbs) 0x20 refresh timer (rts) 0x30 exception condition (exs) 0x3c write single-beat request read burst request read single-beat request write burst request ram array refresh timer request exception condition request rss rbs wss wbs rts exs 64 ram words array index generator
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-65 any transfers that do not naturally fit single or burst transfers are synthesized as a series of single transfers. these accesses are treated by the upm as back-to-back, single-beat transfers. burst transfers can also be inhibited by setting or n [bi]. burst performance can be achieved by ensuring that upm transactions are 32-byte aligned with a transaction size being some multiple of 32-bytes, which is a natural fit for cache-line transfers, for example. 13.4.4.1.2 upm refresh timer requests each upm contains a refresh timer that can be programmed to generate refresh service requests of a particular pattern in the ram array. figure 13-54 shows the clock division hardware associated with memory refresh timer request generation. the upm refresh timer register (lurt) defines the period for the timers associated with all three upms. figure 13-54. memory refresh timer request block diagram by default, all local bus refreshes are performed using the refresh pattern of upma. this means that if refresh is required, mamr[rfen] must be set. it also means that only one refresh routine should be programmed and be placed in upma, which serves as the refresh executor. any banks assigned to a upm are provided with the refresh pattern if the rfen bit of the corresponding upm is set. upma assigned banks, therefore, always receive refresh services when mamr[rfen] is set, while upmb and upmc assigned banks also receive (the same) refresh services if the corresponding m x mr[rfen] bits are set. note that the upm refresh timer request should not be used in a system with sdram refresh enabled. the system designer must choose to use either sdram refresh or upm refresh. using both may result in missing refresh periods to memory. 13.4.4.1.3 software requests?run command software can start a request to the upm by issuing a run command to the upm. some memory devices have their own signal handshaking protocol to put them into special modes, such as self-refresh mode. other memory devices require special commands to be issued on their control signals, such as for sdram initialization. for these special cycles, the user creates a special ram pattern that can be stored in any unused areas in the upm ram. then a run command is used to run the cycle. the upm runs the pattern beginning at the specified ram location until it encounters a ram word with its last bit set. the run command is issued by setting m x mr[op] = 11 and accessing upm n memory region with any write transaction that hits the corresponding upm machine. m x mr[mad] determines the starting address in the ram array for the pattern. upm refresh timer request system divide by lurt ptp prescaling clock
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-66 freescale semiconductor local bus controller note that transfer acknowledges (uta bit in the ram word) are ignored for software (run command) requests, and hence the lad signals remain high-impedance unless the normal initial lale occurs or the run pattern causes assertion of lale to occur on changes to the ram word amx field. 13.4.4.1.4 exception requests when the lbc under upm control initiates an access to a memory device and an exception occurs (bus monitor time-out), the upm provides a mechanism by which memory control signals can meet the device?s timing requirements without losing data. the mechanism is the exception pattern that defines how the upm negates its signals in a controlled manner. 13.4.4.2 programming the upms the upm is a micro sequencer that requires microinstructions or ram words to generate signal timings for different memory cycles. follow these steps to program upms: 1. set up br n and or n registers. 2. write patterns into the ram array. 3. program mrtpr, lurt and mamr[rfen] if refresh is required. 4. program m x mr. patterns are written to the ram array by setting m x mr[op] = 01 and accessing the upm with any write transaction that hits the relevant chip select. the entire array is thus programmed by an alternating series of writes: to mdr (ram word to be written) each time followed by a (dummy) write transaction to the relevant upm assigned bank. note that the upm memory region must be cache-inhibited or write-through (the mmu page must have the i or w bit set) during the time that the upm array is being written. if the memory is to be cacheable and/or copyback, the mmu must be set accordingly after the upm array is initialized. ram array contents may also be read for debug purposes, for example, by alternating dummy read transactions, each time followed by reads of mdr (when m x mr[op] = 10). 13.4.4.3 upm signal timing ram word fields specify the value of the various external signals at a granularity of up to four values for each bus clock cycle. the signal timing generator causes external signals to behave according to timing specified in the current ram word. for lcrr[clkdiv] = 4 or 8, each bit in the ram word relating to lcs n and lbs timing specifies the value of the corresponding external signal at each quarter phase of the bus clock. if lcrr[clkdiv] = 2, the external signal can change value only on each half phase of the bus clock. if the ram word in this case (lcrr[clkdiv] = 2) specifies a quarter phase signal change, the signal timing generator interprets this as a half cycle change.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-67 the division of upm bus cycles into phases is shown in figure 13-55 and figure 13-56 . if lcrr[clkdiv] = 2, the bus cycle comprises only two active phases, t1 and t3, which correspond with the first and second halves of the bus clock cycle, respectively. however, if lcrr[clkdiv] = 4 or 8, four phases, t1?t4, define four quarters of the bus clock cycle. because t2 and t4 are inactive when lcrr[clkdiv] = 2, upm ignores signal timing programmed for assertion in either of these phases in the case lcrr[clkdiv] = 2. figure 13-55. upm clock scheme for lcrr[clkdiv] = 2 figure 13-56. upm clock scheme for lcrr[clkdiv] = 4 or 8 13.4.4.4 ram array the ram array for each upm is 64 locations deep and 32 bits wide, as shown in figure 13-57 . the signals at the bottom of the figure are upm outputs. the selected lcs n is for the bank that matches the current address. the selected lbs is for the byte lanes read or written by the access. lclk t1 t2 t3 t4 lclk t1 t2 t3 t4
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-68 freescale semiconductor local bus controller figure 13-57. ram array and signal generation 13.4.4.4.1 ram words the ram word is a 32-bit microinstruction stored in one of 64 locations in the ram array. it specifies timing for external signals controlled by the upm. figure 13-58 shows the ram word fields. when lcrr[clkdiv] = 4 or 8, the cst n and bst n bits determine the state of upm signals lcs n and lbs [0:3] at each quarter phase of the bus clock. when lcrr[clkdiv] = 2, cst2 and cst4 are ignored and the external has the values defined by cst1 and cst3 but extended to half the clock cycle in duration. the same interpretation occurs for the bst n bits when lcrr[clkdiv] = 2. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 r cst1 cst2 cst3 cst4 bst1 bst2 bst3 bst4 g0l g0h g1t1 g1t3 g2t1 g2t3 w reset 0000_0000_0000_0000 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 r g3t1 g3t3 g4t1/ dlt3 g4t3/ waen g5t1 g5t3 redo loop exen amx na uta todt last w reset 0000_0000_0000_0000 offset figure 13-58. ram word field descriptions t1, t2, t3, t4 lgpl0 lgpl2 lgpl3 lgpl4 lgpl5 external signals timing generator ram array cs line selector byte select logic lcs[0:7] lbs[0:3] current bank brn[ps], la[30,31] 32 bits 64 deep lgpl1 clock phases
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-69 table 13-30 describes ram word fields. table 13-30. ram word field descriptions bits name description 0 cst1 chip select timing 1. defines the state (0 or 1) of lcs n during bus clock quarter phase 1 if lcrr[clkdiv] = 4 or 8. defines the state (0 or 1) of lcs n during bus clock half phase 1 if lcrr[clkdiv] = 2. 1 cst2 chip select timing 2. defines the state (0 or 1) of lcs n during bus clock quarter phase 2 if lcrr[clkdiv] = 4 or 8. ignored when lcrr[clkdiv] = 2. 2 cst3 chip select timing 3. defines the state (0 or 1) of lcs n during bus clock quarter phase 3 if lcrr[clkdiv] = 4 or 8. defines the state (0 or 1) of lcs n during bus clock half phase 2 if lcrr[clkdiv] = 2. 3 cst4 chip select timing 4. defines the state (0 or 1) of lcs n during bus clock quarter phase 4.if lcrr[clkdiv] = 4 or 8. ignored when lcrr[clkdiv] = 2. 4 bst1 byte select timing 1. defines the state (0 or 1) of lbs during bus clock quarter phase 1 (lcrr[clkdiv] = 4 or 8) or bus clock half phase 1 (lcrr[clkdiv] = 2), in conjunction with br n [ps] and the state of la[30:31]. 5 bst2 byte select timing 2:. defines the state (0 or 1) of lbs during bus clock quarter phase 2 (lcrr[clkdiv] = 4 or 8), in conjunction with br n [ps] and the state of la[30:31]. ignored when lcrr[clkdiv] = 2. 6 bst3 byte select timing 3. defines the state (0 or 1) of lbs during bus clock quarter phase 3 (lcrr[clkdiv] = 4 or 8) or bus clock half phase 2 (lcrr[clkdiv] = 2), in conjunction with br n [ps] and the state of la[30:31]. 7 bst4 byte select timing 4. defines the state (0 or 1) of lbs during bus clock quarter phase 4 (lcrr[clkdiv] = 4 or 8), in conjunction with br n [ps] and the state of la[30:31]. ignored when lcrr[clkdiv] = 2. 8?9 g0l general-purpose line 0 lower. defines the state of lgpl0 during the bus clock quarter phases 1 and 2 (first half phase). 00 value defined by m x mr[g0cl] 01 reserved 10 0 11 1 10?11 g0h general-purpose line 0 higher. defines the state of lgpl0 during the bus clock quarter phases 3 and 4 (second half phase). 00 value defined by m x mr[g0cl] 01 reserved 10 0 11 1 12 g1t1 general-purpose line 1 timing 1. defines the state (0 or 1) of lgpl1 during bus clock quarter phases 1 and 2 (first half phase). 13 g1t3 general-purpose line 1 timing 3. defines the state (0 or 1) of lgpl1 during bus clock quarter phases 3 and 4 (second half phase) 14 g2t1 general-purpose line 2 timing 1. defines state (0 or 1) of lgpl2 during bus clock quarter phases 1 and 2 (first half phase). 15 g2t3 general-purpose line 2 timing 3. defines the state (0 or 1) of lgpl2 during bus clock quarter phases 3 and 4 (second half phase).
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-70 freescale semiconductor local bus controller 16 g3t1 general-purpose line 3 timing 1. defines the state (0 or 1) of lgpl3 during bus clock quarter phases 1 and 2 (first half phase). 17 g3t3 general-purpose line 3 timing 3. defines the state (0 or 1) of lgpl3 during bus clock quarter phases 3 and 4 (second half phase). 18 g4t1/dlt3 general-purpose line 4 timing 1/delay time 3. the function of this bit is determined by m x mr[gpl4]. if m x mr[gpl4] = 0 and lgpl4/lupwait pin functions as an output (lgpl4), g4t1/dlt3 defines the state (0 or 1) of lgpl4 during bus clock quarter phases 1 and 2 (first half phase). if m x mr[gpl4] = 1 and lgpl4/lupwait functions as an input (lupwait), if a read burst or single read is executed, g4t1/dlt3 defines the sampling of the data bus as follows: 0 in the current word, the data bus should be sampled at the start of bus clock quarter phase 1 of the next bus clock cycle. 1 in the current word, the data bus should be sampled at the start of bus clock quarter phase 3 of the current bus clock cycle. 19 g4t3/waen general-purpose line 4 timing 3/wait enable. bit function is determined by m x mr[gpl4]. if m x mr[gpl4] = 0 and lgpl4/lupwait pin functions as an output (lgpl4), g4t3/waen defines the state (0 or 1) of lgpl4 during bus clock quarter phases 3 and 4 (second half phase). if m x mr[gpl4] = 1 and lgpl4/lupwait functions as an input (lupwait), g4t3/waen is used to enable the wait mechanism: 0 lupwait detection is disabled. 1 lupwait is enabled. if lupwait is detected as being asserted, a freeze in the external signals logical values occurs until lupwait is detected as being negated. 20 g5t1 general-purpose line 5 timing 1. defines the state (0 or 1) of lgpl5 during bus clock quarter phases 1 and 2 (first half phase). 21 g5t3 general-purpose line 5 timing 3. defines the state (0 or 1) of lgpl5 during bus clock quarter phases 3 and 4 (second half phase). 22?23 redo redo current ram word. defines the number of times to execute the current ram word. 00 once (normal operation) 01 twice 10 three times 11 four times 24 loop loop start/end. the first ram word in the ram array where loop is 1 is recognized as the loop start word. the next ram word where loop is 1 is the loop end word. ram words between, and including the start and end words, are defined as part of the loop. the number of times the upm executes this loop is defined in the corresponding loop fields of the m x mr. 0 the current ram word is not the loop start word or loop end word. 1 the current ram word is the start or end of a loop. table 13-30. ram word field descriptions (continued) bits name description
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-71 25 exen exception enable. allows branching to an exception pattern at the exception start address (exs). when an internal bus monitor time-out exception is recognized and exen in the ram word is set, the upm branches to the special exception start address (exs) and begins operating as the pattern defined there specifies. the user should provide an exception pattern to negate signals controlled by the upm in a controlled fashion. for dram control, a handler should negate ras and cas to prevent data corruption. if exen = 0, exceptions are ignored by upm (but not by local bus) and execution continues. after the upm branches to the exception start address, it continues reading until the last bit is set in the ram word. 0 the upm continues executing the remaining ram words, ignoring any internal bus monitor time-out. 1 the current ram word allows a branch to the exception pattern after the current cycle if an exception condition is detected. 26?27 amx address multiplexing. determines the source of lad[0:31] during a lale phase. any change in the amx field initiates a new lale (address) phase. 00 lad[0:31] is the non-multiplexed address. for example, column address. 01 reserved 10 lad[0:31] is the address multiplexed according to m x mr[am]. for example, row address. 11 lad[0:31] is the contents of mar. used, for example, to initialize a mode. note that source id debug mode is only supported for the amx = 00 setting. 28 na next burst address. determines when the address is incremented during a burst access. 0 the address increment function is disabled. 1 the address is incremented in the next cycle. in conjunction with the br n [ps], the increment value of the state of la[27:31] is 1, 2 or 4 for port sizes of 8-bits, 16-bits and 32-bits, respectively. 29 uta upm transfer acknowledge. indicates assertion of transfer acknowledge in the current cycle. 0 transfer acknowledge is not asserted in the current cycle. 1 transfer acknowledge is asserted in the current cycle. 30 todt turn-on disable timer. the disable timer associated with each upm allows a minimum time to be guaranteed between two successive accesses to the same memory bank. this feature is critical when dram requires a ras precharge time. todt turns the timer on to prevent another upm access to the same bank until the timer expires.the disable timer period is determined in m x mr[ds n ]. the disable timer does not affect memory accesses to different banks. note that todt must be set together with last, otherwise it is ignored. 0 the disable timer is turned off. 1 the disable timer for the current bank is activated preventing a new access to the same bank (when controlled by the upms) until the disable timer expires. for example, precharge time. 31 last last word. when last is read in a ram word, the current upm pattern terminates and control signal timing set in the ram word is applied to the current (and last) cycle. however, if the disable timer is activated and the next access is to the same bank, execution of the next upm pattern is held off and the control signal values specified in the last word are extended in duration for the number of clock cycles specified in m x mr[ds n ]. 0 the upm continues executing ram words. 1 indicates the last ram word in the program. the service to the upm request is done after this cycle concludes. table 13-30. ram word field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-72 freescale semiconductor local bus controller 13.4.4.4.2 chip-select signal timing (cst n ) if br n [msel] of the accessed bank selects a upm on the currently requested cycle, the upm manipulates the lcs n for that bank with timing as specified in the upm ram word cst n fields. the selected upm affects only the assertion and negation of the appropriate lcs n signal. the state of the selected lcs n signal of the corresponding bank depends on the value of each cst n bit. figure 13-59 shows how upms control lcs n signals. figure 13-59. lcs n signal selection 13.4.4.4.3 byte select signal timing (bst n ) if br n [msel] of the accessed memory bank selects a upm on the currently requested cycle, the selected upm affects the assertion and negation of the appropriate lbs [0:3] signal. the timing of all four byte-select signals is specified in the ram word. however, lbs [0:3] are also controlled by the port size of the accessed bank, the number of bytes to transfer, and the address accessed. figure 13-60 shows how upms control lbs [0:3]. upma/b/c sdram gpcm mux br n [msel] lcs 3 lcs 4 lcs 5 lcs 6 lcs 7 switch bank selected lcs 0 lcs 1 lcs 2
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-73 figure 13-60. lbs signal selection the uppermost byte select (lbs0 ), when asserted, indicates that lad[0:7] contains valid data during a cycle. likewise, lbs1 indicates that lad[8:15] contains valid data, lbs2 indicates that lad[16:23] contains valid data, and lbs3 indicates that lad[24:31] contains valid data. for a upm refresh timer request, all lbs [0:3] signals are asserted/negated by the upm according to the refresh pattern only. following any internal bus monitor exception, lbs [0:3] signals are negated regardless of the exception handling provided by any upm exception pattern to prevent spurious writes to external ram. 13.4.4.4.4 general-purpose signals (g n t n , go n ) the general-purpose signals (lgpl[0:5]) each have two bits in the ram word that define the logical value of the signal to be changed at the rising edge of the bus clock and/or at the falling edge of the bus clock. lgpl0 offers enhancements beyond the other lgpl n lines. gpl0 can be controlled by an address line specified in m x mr[g0cl]. to use this feature, g0h and g0l should be set in the ram word. for example, for a simm with multiple banks, this address line can be used to switch between internal memory device banks. 13.4.4.4.5 loop control (loop) the loop bit in the ram word specifies the beginning and end of a set of upm ram words that are to be repeated. the first time loop = 1, the memory controller recognizes it as a loop start word and loads the memory loop counter with the corresponding contents of the loop field shown in table 13-31 . the next ram word for which loop = 1 is recognized as a loop end word. when it is reached, the loop counter is decremented by one. continued loop execution depends on the loop counter. if the counter is not zero, the next ram word executed is the loop start word. otherwise, the next ram word executed is the one after the upma mux br n [msel] lbs 0 lbs 1 lbs 2 lbs 3 bank selected br n [ps] a[29:31] byte count byte-select logic upmb upmc
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-74 freescale semiconductor local bus controller loop end word. loops can be executed sequentially but cannot be nested. also, special care must be taken if last and loop must not be set together. 13.4.4.4.6 repeat execution of current ram word (redo) the redo function is useful for wait-state insertion in a long upm routine that would otherwise need too many ram words. setting the redo bits of the ram word to a nonzero value causes the upm to re-execute the current ram word up to three more times, as defined in the redo field of the current ram word. special care must be taken in the following cases:  when uta and redo are set together, ta is asserted the number of times specified by the redo function.  when na and redo are set together, the address is incremented the number of times specified by the redo function.  when loop and redo are set together, the loop mechanism works as usual and the line is repeated according to the redo function.  last and redo must not be set together.  redo should not be used within the exception routine. 13.4.4.4.7 address multiplexing (amx) the address lines can be controlled by the pattern the user provides in the upm. the address multiplex bits can choose between driving the transaction address, driving it according to the multiplexing specified by the m x mr[am] field, or driving the mar contents on the address signals. in all cases, la[27:31] of the lbc are driven by the five lsbs of the address selected by amx, regardless of whether the na bit of the ram word is used to increment the current address. the effect of na = 1 is visible only when amx = 00 chooses the column address. table 13-32 shows how m x mr[am] settings affect address multiplexing when the ram word amx = 10. the 16 msbs of the lad[0:31] bus during an address phase are driven with zero in the amx = 10 case. table 13-31. m x mr loop field use request serviced loop field read single-beat cycle rlf read burst cycle rlf write single-beat cycle wlf write burst cycle wlf refresh timer expired tlf run command rlf
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-75 note that any change to the amx field from one ram word to the next ram word executed results in an address phase on the lad[0:31] bus with the assertion of lale for the number of cycles set for lale in the or n and lcrr registers. the lgpl[0:5] signals maintain the value specified in the ram word during the lale phase. 13.4.4.4.8 data valid and data sample control (uta) when a read access is handled by the upm, and the uta bit is 1 (data is to be sampled by the lbc), the value of the dlt3 bit in the same ram word, in conjunction with m x mr[gpl n 4dis], determines when the data input is sampled by the lbc as follows:  if m x mr[gpl n 4dis] = 1 (g4t4/dlt3 functions as dlt3) and dlt3 = 1 in the ram word, data is latched on the falling edge of the bus clock instead of the rising edge. the lbc samples the data on the next falling edge of the bus clock, which is during the middle of the current bus cycle. this feature should be used only in systems without external synchronous bus devices that require mid-cycle sampling.  if gpl n 4dis = 0 (g4t4/dlt3 functions as g4t4), or if gpl n 4dis = 1 but dlt3 = 0, data is latched on the rising edge of the bus clock, which occurs at the end of the current bus clock cycle (normal operation). table 13-32. upm address multiplexing am lad[0:31] as address signals a0?a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 000 signal driven on external pin when address multiplexing is enabled? ram word amx = 10 0 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 001 0 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 010 0 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 011 0 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 100 0 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 101 0 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-76 freescale semiconductor local bus controller figure 13-61 shows how data sampling is controlled by the upm. figure 13-61. upm read access data sampling 13.4.4.4.9 lgpl [0:5] signal negation (last) when the last bit is read in a ram word, the current upm pattern is terminated at the end of the current cycle. on the next cycle (following last) all the upm signals are negated unconditionally (driven to logic 1), unless there is a back-to-back upm request pending. in this case, the signal values for the cycle following the one in which the last bit was set are taken from the first ram word of the pending upm routine. 13.4.4.4.10wait mechanism (waen) the waen bit in the ram array word can be used to enable the upm wait mechanism in selected upm ram words. if the upm reads a ram word with waen set, the external lupwait signal is sampled and synchronized by the memory controller as if it were an asynchronous signal. the waen bit is ignored if last = 1 in the same ram word. synchronization of lupwait starts at the rising edge of the bus clock and takes at least 1 bus cycle to complete. if lupwait is asserted and waen = 1 in the current upm word, the upm is frozen until lupwait is negated. the value of external signals driven by the upm remains as indicated in the previous ram word. when lupwait is negated, the upm continues normal functions. note that during wait cycles, the upm does not handle data. figure 13-62 shows how the waen bit in the word read by the upm and the lupwait signal are used to hold the upm in a particular state until lupwait is negated. as the example shows, the lcs n and lgpl1 states and the waen value are frozen until lupwait is recognized as negated. waen is typically set before the line that contains uta = 1. note that if waen and na are both set in the same ram word, na causes the burst address to increment once as normal regardless of whether the upm freezes. to internal data bus lclk upm read and gpl4ndis = 1 and dlt3 = 1 lad[0:31] m u l t i p l e x o r 1 0
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-77 figure 13-62. effect of lupwait signal 13.4.4.5 synchronous sampling of lupwait for early transfer acknowledge if lupwait is to be considered an asynchronous signal, which can be asserted/negated at any time, no upm ram word must contain both waen = 1 and uta = 1 simultaneously. however, programming waen = 1 and uta = 1 in the same ram word allows upm to treat lupwait as a synchronous signal, which must meet set-up and hold times in relation to the rising edge of the bus clock. in this case, as soon as upm samples lupwait negated on the rising edge of the bus clock, it immediately generates an internal transfer acknowledge, which allows a data transfer one bus clock cycle later. the generation of transfer acknowledge is early because lupwait is not re-synchronized, and the acknowledge occurs regardless of whether upm was already frozen in wait cycles or not. this feature allows the synchronous negation of lupwait to affect a data transfer, even if uta, waen, and last are set simultaneously. 13.4.4.6 extended hold time on read accesses slow memory devices that take a long time to turn off their data bus drivers on read accesses should choose some non-zero combination of or n [trlx] and or n [ehtr]. the next accesses after a read access to the slow memory device is delayed by the number of clock cycles specified in the or n register in addition to any existing bus turn around cycle. lcs n lgpl1 waen word n word n+1 c1 c2 c3 c4 c5 c6 c7 c8 lupwait c9 c10 c11 c12 c13 c14 word n+2 wait wait word n+ 3 lclk t1 t2 t3 t4 a b c d ta
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-78 freescale semiconductor local bus controller 13.4.4.7 memory system interface example using upm connecting the local bus upm controller to a dram device requires a detailed examination of the timing diagrams representing the possible memory cycles that must be performed when accessing this device. this section describes timing diagrams for various upm configurations, using fast-page mode dram as an example, with lcrr[clkdiv] = 4 or 8. these illustrative examples may not represent the timing necessary for any specific device used with the lbc. here, lgpl1 is programmed to drive r/w of the dram, although any lgpl n signal may be used for this purpose.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-79 figure 13-63. single-beat read access to fpm dram cst1 0 lale pause (due to change in amx) 00bit 0 cst2 0 0 0 bit 1 cst3 0 0 0 bit 2 cst4 0 0 0 bit 3 bst1 1 1 0 bit 4 bst2 1 0 0 bit 5 bst3 1 0 0 bit 6 bst4 1 0 0 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t1 1 1 1 bit 12 g1t3 1 1 1 bit 13 g2t1 bit 14 g2t3 bit 15 g3t1 bit 16 g3t3 bit 17 g4t1 bit 18 g4t3 bit 19 g5t1 bit 20 g5t3 bit 21 redo[0] bit 22 redo[1] bit 23 loop 0 0 0 bit 24 exen 0 0 0 bit 25 amx0 1 0 0 bit 26 amx1 0 0 0 bit 27 na 0 0 0 bit 28 uta 0 0 1 bit 29 todt 0 0 1 bit 30 last 0 0 1 bit 31 rss rss+1 rss+1 rss+2 lclk lad lale lcs n lgpl1 address a row la read data column address ta row lsbs column lsbs (ras) lbs n (cas) lbctl (r/w )
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-80 freescale semiconductor local bus controller figure 13-64. single-beat write access to fpm dram cst1 0 lale pause (due to change in amx) 00bit 0 cst2 0 0 0 bit 1 cst3 0 0 0 bit 2 cst4 0 0 1 bit 3 bst1 1 1 0 bit 4 bst2 1 1 0 bit 5 bst3 1 0 0 bit 6 bst4 1 0 1 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t1 0 0 0 bit 12 g1t3 0 0 0 bit 13 g2t1 bit 14 g2t3 bit 15 g3t1 bit 16 g3t3 bit 17 g4t1 bit 18 g4t3 bit 19 g5t1 bit 20 g5t3 bit 21 redo[0] bit 22 redo[1] bit 23 loop 0 0 0 bit 24 exen 0 0 0 bit 25 amx0 1 0 0 bit 26 amx1 0 0 0 bit 27 na 0 0 0 bit 28 uta 0 0 1 bit 29 todt 0 0 1 bit 30 last 0 0 1 bit 31 wss wss+1 wss+1 wss+2 lclk lad lale lcs n lgpl1 address a row la column write data ta row lsbs column lsbs (ras) lbs n (cas) address write data lbctl (r/w )
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-81 figure 13-65. burst read access to fpm dram using loop (two beats shown) cst1 0 001bit 0 cst2 0 001bit 1 cst3 0 lale pause (due to change in amx) 001bit 2 cst4 0 001bit 3 bst1 1 1 0 1 bit 4 bst2 1 1 0 1 bit 5 bst3 1 1 0 1 bit 6 bst4 1 0 0 1 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t1 1 1 1 1 bit 12 g1t3 1 1 1 1 bit 13 g2t1 bit 14 g2t3 bit 15 g3t1 bit 16 g3t3 bit 17 g4t1 bit 18 g4t3 bit 19 g5t1 bit 20 g5t3 bit 21 redo[0] bit 22 redo[1] bit 23 loop 0 1 1 0 bit 24 exen 0 0 1 0 bit 25 amx0 1 0 0 0 bit 26 amx1 0 0 0 0 bit 27 na 0 0 1 0 bit 28 uta 0 0 1 0 bit 29 todt 0 0 0 1 bit 30 last 0 001bit 31 rbs rbs+1 rbs+2 rbs+3 lclk lad lale lcs n lgpl1 address a row la data 1 column 1 address ta row lsbs (ras) lbs n (cas) data 2 column 2 column 1 lsbs column 2 lsbs lbctl (r/w )
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-82 freescale semiconductor local bus controller figure 13-66. refresh cycle (cbr) to fpm dram cst1 100bit 0 cst2 100bit 1 cst3 101bit 2 cst4 101bit 3 bst1 1 0 0 bit 4 bst2 0 0 0 bit 5 bst3 0 0 1 bit 6 bst4 0 0 1 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t1 bit 12 g1t3 bit 13 g2t1 bit 14 g2t3 bit 15 g3t1 bit 16 g3t3 bit 17 g4t1 bit 18 g4t3 bit 19 g5t1 bit 20 g5t3 bit 21 redo[0] bit 22 redo[1] bit 23 loop 0 0 0 bit 24 exen 0 0 0 bit 25 amx0 0 0 0 bit 26 amx1 0 0 0 bit 27 na 0 0 0 bit 28 uta 0 0 0 bit 29 todt 0 0 1 bit 30 last 001bit 31 pts pts+1 pts+2 lclk lad lale lcs n l bctl a la ta (ras) lbs n (cas)
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-83 figure 13-67. exception cycle cst1 1 bit 0 cst2 1 bit 1 cst3 1 bit 2 cst4 1 bit 3 bst1 1 bit 4 bst2 1 bit 5 bst3 1 bit 6 bst4 1 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t1 bit 12 g1t3 bit 13 g2t1 bit 14 g2t3 bit 15 g3t1 bit 16 g3t3 bit 17 g4t1 bit 18 g4t3 bit 19 g5t1 bit 20 g5t3 bit 21 redo[0] bit 22 redo[1] bit 23 loop 0 bit 24 exen 0 bit 25 amx0 0 bit 26 amx1 0 bit 27 na 0 bit 28 uta 0 bit 29 todt 1 bit 30 last 1 bit 31 exs lclk lad lale lcs n lbctl ta (ras) lbs n (cas)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-84 freescale semiconductor local bus controller 13.5 initialization/application information 13.5.1 interfacing to peripherals 13.5.1.1 multiplexed address/data bus and unmultiplexed address signals to save pins on the local bus, address and data are multiplexed onto the same 32 bit bus. an external latch is needed to demultiplex and reconstruct the original address. no external intelligence is needed, because the lale signal provides the correct timing to control a standard logic latch. the lad pins can be directly connected to the data signals of the memory/peripheral. transactions on the local bus start with an address phase, where the lbc drives the transaction address on the lad signals and asserts the lale signal. this can be used to latch the address and then the lbc can continue with the data phase. the lbc supports port sizes of 8,16, and 32 bit. for devices smaller than 32 bits, transactions must be broken down. for this reason, la[30:31] are driven unmultiplexed. for 8-bit devices, la[30:31] should be used and for 16-bit devices, la[30] should be used. 32-bit devices use neither of these signals. in addition, the lbc supports burst transfers (not in the gpcm machine). la[27:29] are the burst addresses within a natural 32-byte burst. to minimize the amount of address phases needed on the local bus and to optimize the throughput, those signals are driven separately and should be used whenever a device requires the 5 least significant addresses. those should not be used from lad[27:31]. all other addresses, a[0:26], must be reconstructed through the latch. figure 13-68. multiplexed address/data bus 13.5.1.2 peripheral hierarchy on the local bus to achieve high bus speed interfaces for synchronous srams or sdrams, a hierarchy of the memories/peripherals connected to the local bus is suggested, as shown in figure 13-69 . muxed address/data unmuxed address la[27:31] lad[0:31] lale local bus interface latch a[0:26] d q le a[27:31] d[0:31]
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-85 figure 13-69. local bus peripheral hierarchy the multiplexed address/data bus sees the capacitive loading of the data pins of the fast sdrams or synchronous srams plus one load for an address latch plus one load for a buffer to the slow memories. the loadings of all other memories and peripherals are hidden behind the buffer and the latch. the system designer needs to investigate the loading scenario and ensure that i/o timings can be met with the loading determined by the connected components. 13.5.1.3 peripheral hierarchy on the local bus for very high bus speeds to achieve the highest possible bus speeds on the local bus, it is recommended to reduce the number of devices connected directly to the local bus even further. for those cases probably only one bank of synchronous srams or sdrams should be used and instead of using a separate latch and a separate bus transceiver, a bus demultiplexer combining those two functions into one device should be used. figure 13-70 shows an example of such a hierarchy. this section is only a guideline and the board designer must simulate the electric characteristics of his scenario to determine the maximum operating frequency. ma muxed address/data unmuxed address buffered data la[27:31] lad[0:31] lale lbctl local bus interface latch buffer slower memories and peripherals a dq a dq sdram a dq ssram d q le a dir b
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-86 freescale semiconductor local bus controller figure 13-70. local bus peripheral hierarchy for very high bus speeds 13.5.1.4 gpcm timings in case a system contains a memory hierarchy with high speed synchronous memories (sdram, synchronous sram) and lower speed asynchronous memories (for example, flash eprom and peripherals) the gpcm-controlled memories should be decoupled by buffers to reduce capacitive loading on the bus. those buffers have to be taken into account for the timing calculations. figure 13-71. gpcm address timings to calculate address setup timing for a slower peripheral/memory device, several parameters have to be added: propagation delay for the address latch, propagation delay for the buffer and the address setup for the actual peripheral. typical values for the two propagation delays are in the order of 3?6 ns, so for a 166 mhz bus frequency, lcs should arrive on the order of 3 bus clocks later. ma muxed address/data unmuxed address buffered data la[27:31] lad[0:31] lale lbctl local bus interface latch slower memories and peripherals a dq a dq sdram a/d le dir q b a muxed address/data unmuxed address buffered address slower memories and peripherals device input a pin buffer latch lad[0:31] lale lbctl local bus interface
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-87 for data timings, only the propagation delay of one buffer plus the actual data setup time has to be considered. figure 13-72. gpcm data timings 13.5.2 bus turnaround because the local bus uses multiplexed address and data, special consideration must be given to avoid bus contention at bus turnaround. the following cases must be examined:  address phase after previous read  read data phase after address phase  read-modify-write cycle for parity protected memory banks  upm cycles with additional address phases the bus does not change direction for the following cases so they need no special attention:  continued burst after the first beat  write data phase after address phase  address phase after previous write 13.5.2.1 address phase after previous read during a read cycle, the memory/peripheral drives the bus and the bus transceiver drives lad. after the data has been sampled, the output drivers of the external device must be disabled. this can take some time; for slow devices the ehtr feature of the gpcm or the programmability of the upm should be used to guarantee that those devices have stopped driving the bus when the lbc memory controller ends the bus cycle. in this case, after the previous cycle ends, lbctl goes high and changes the direction of the bus transceiver. the lbc then inserts a bus turnaround cycle to avoid contention. the external device has now already placed its data signals in high impedance and no bus contention will occur. muxed address/data buffered data lad[0:31] lbctl local bus interface buffer slower memories and peripherals device input d pin
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-88 freescale semiconductor local bus controller 13.5.2.2 read data phase after address phase during the address phase, lad actively drives the address and lbctl is high, driving the bus transceivers in the same direction as during a write. after the end of the address phase, lbctl goes low and changes the direction of the bus transceiver. the lbc places the lad signals in high impedance after its t dis (lb). the lbctl will have its new state after t en (lb) and, because this is an asynchronous input, the transceiver starts to drive those signals after its t en (transceiver) time. the system designer has to ensure, that [t en (lb) + t en (transceiver)] is larger than t dis (lb) to avoid bus contention. 13.5.2.3 read-modify-write cycle for parity protected memory banks principally, a read-modify-write cycle is a read cycle immediately followed by a write cycle. because the write cycle will have a new address phase in any case, this basically is the same case as an address phase after a previous read. 13.5.2.4 upm cycles with additional address phases the flexibility of the upm allows the user to insert additional address phases during read cycles by changing the amx field, therefore turning around the bus during one pattern. the lbc automatically inserts a single bus turnaround cycle if the bus (lad) was previously high impedance for any reason, such as a read, before lale is driven and lad is driven with the new address. the turnaround cycle is not inserted on a write, because the bus was already driven to begin with. however, bus contention could potentially still occur on the far side of a bus transceiver. it is the responsibility of the designer of the upm pattern to guarantee that enough idle cycles are inserted in the upm pattern to avoid this. 13.5.3 interface to different port-size devices the lbc supports 8-, 16-, and 32-bit data port sizes. however, the bus requires that the portion of the data bus used for a transfer to or from a particular port size be fixed. a 32-bit port must reside on d[0:31], a 16-bit port must reside on d[0:15], and an 8-bit port must reside on d[0:7]. the local bus always tries to transfer the maximum amount of data on all bus cycles. figure 13-73 shows the device connections on the data bus.
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-89 figure 13-73. interface to different port-size devices table 13-33 lists the bytes required on the data bus for read cycles. table 13-33. data bus requirements for read cycle transfer size address state 1 a[29:31] port size/data bus assignments 32-bit 16-bit 8-bit 0?7 8?15 16?23 24?31 0?7 8?15 0?7 byte 000 op0 2 ? 3 ? ? op0 ? op0 001 ? op1 ? ? ? op1 op1 010 ? ?op2?op2?op2 011 ? ? ? op3 ? op3 op3 100 op4 ? ? ? op4 ? op4 101 ? op5 ? ? ? op5 op5 110 ? ?op6?op6?op6 111 ? ? ? op7 ? op7 op7 0 31 63 op0 op1 op2 op3 op4 op5 op6 op7 d[0:7] d[8:15] d[15:23] d[24:31] op0 op1 op2 op3 op4 op5 op6 op7 op0 op1 op2 op3 op4 op5 op6 op7 op0 op7 32-bit port size interface output register 16-bit port size 8-bit port size
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-90 freescale semiconductor local bus controller 13.5.4 interfacing to sdram the following subsections provide application information on interfacing to sdram. 13.5.4.1 basic sdram capabilities of the local bus the lbc provides one sdram machine for the local bus. although there is only one machine, multiple chip selects (lcs n ) can be programmed to support multiple sdram devices. note that no limitation exists on the number of chip selects that can be programmed for sdram. this means that lcs [1:7] can be programmed to support sdram, assuming lcs0 is reserved for the gpcm to connect to flash memory. if multiple chip selects are configured to support sdram on the local bus, each sdram device should have the same port size and timing parameters. this means that all option registers (or n ) for the sdram chip selects should be programmed exactly the same. note although in principle it is possible to mix different port sizes and timing parameters, combinations are limited and this operation is not recommended. half word 000 op0 op1 ? ? op0 op1 op0 001 ? op1 op2 ? ? op1 op1 010 ? ? op2 op3 op2 op3 op2 100 op4 op5 ? ? op4 op5 op4 101 ? op5 op6 ? ? op5 op5 110 ? ? op6 op7 op6 op7 op6 word 000 op0 op1 op2 op3 op0 op1 op0 100 op4 op5 op6 op7 op4 op5 op4 1 address state is the calculated address for port size. 2 op n : these lanes are read or written during that bus transaction. op0 is the most-significant byte of a word operand and op3 is the least-significant byte. 3 ? denotes a byte not driven during that write cycle. table 13-33. data bus requirements for read cycle (continued) transfer size address state 1 a[29:31] port size/data bus assignments 32-bit 16-bit 8-bit 0?7 8?15 16?23 24?31 0?7 8?15 0?7
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-91 all the chip selects share the same local bus sdram mode register (lsdmr) for initialization along with the local bus-assigned sdram refresh timer register (lsrt) and the memory refresh timer prescaler register (mptpr) for refresh. for refresh, the memory controller supplies auto refresh to sdram according to the time interval specified in lsrt and mptpr as follows: this represents the time period required between refreshes. when the refresh timer expires, the memory controller issues a cbr to each chip select. each cbr is separated by one clock. a refresh timing diagram for multiple chip selects is shown in figure 13-51 in section 13.4.3.11.1, ?sdram refresh timing.? during a memory transaction dispatched to the local bus, the memory controller compares the memory address with the address information of each chip select (programmed with br n and or n ). if the comparison matches a chip select that is controlled by sdram, the memory controller requests service to the local bus sdram machine, depending on the information in br n . although multiple chip selects may be programmed for sdram, only one chip select is active at any given time; thus, multiple chip selects can share the same sdram machine. 13.5.4.2 maximum amount of sdram supported table 13-34 summarizes information based on sdram data sheets supplied by micron. the data port size is programmable, but the following examples use all 32 bits of the local bus. the 32-bit port size requires four sdram devices (with 8-bit i/o ports) connected in parallel to a single chip select. if 128-mbit devices are used, one chip select provides 128-mbit/device x 4 devices = 64 mbytes. if 4 chip selects are programmed for sdram use, the result is 64 mbytes x 4 = 256 mbyte. if 256-mbit sdram devices are used, the total available memory is 512 mbyte. consequently 512-mbit devices allow for 1 gbyte. although there is no technical difficulty in supporting multiple chip select configurations, in practice, the user may want to maximize the amount of sdram assigned to each chip select to minimize cost. table 13-34. micron sdram devices sdram device 64 mbit 128 mbit 256 mbit 512 mbit i/o port x4 x8 x16 x32 x4 x8 x16 x32 x4 x8 x16 x32 x4 x8 x16 x32 bank 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 row 12 12 12 11 12 12 12 12 13 13 13 13 13 13 13 tbd column 10 9 8 8 11 10 9 8 11 10 9 8 12 11 10 tbd refresh period lsrtx mptpr ptp [] () system frequency ----------------------------------------------------------------- =
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-92 freescale semiconductor local bus controller 13.5.4.3 sdram machine limitations this section describes limitations of the local bus sdram machine. 13.5.4.3.1 analysis of maximum row number due to bank select multiplexing lsdmr[bsma] is used to multiplex the bank select address. the bsma field and corresponding multiplexed address are shown below: 000 la12?la13 001 la13?la14 ? 111 la19?la20 note that la12 is the latched value of lad12. the highest address pins that the bank selects can be multiplexed with are la[12:13], which limits the pins for the row address to la[14:31]. for a 32-bit port, the maximum width of the local bus, la[30:31] are not connected, and the maximum row is la[14:29]. the local bus sdram machine supports 15 rows, which is sufficient for all devices. 13.5.4.3.2 bank select signals page-based interleaving allows bank signals to be multiplexed to the higher-order address pins to leave room for future upgrades. for example, a user could multiplex the bank select signals to la[14:15], leaving la16 to connect to the address pin for a larger memory size. this allows the system designer to design one board that can be used with a current generation of sdram devices and upgraded to the next generation without requiring a new board layout. 13.5.4.3.3 128-mbyte sdram figure 13-74 shows the connection to an sdram of 128 mbytes. note that all circuit diagrams are principal connection diagrams and do not show any means of signal integrity.
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-93 figure 13-74. 128-mbyte sdram diagram table 13-35 shows details about lad n signal connections for the example in figure 13-74 . table 13-35. lad n signal connections to 128-mbyte sdram lad (latch address) sdram address pin lad29 a0 lad28 a1 lad27 a2 lad26 a3 lad25 a4 lad24 a5 lad23 a6 lad22 a7 lad21 a8 lad20 a9 lad19 (no connect) a10 is connected to lsda10 data[0:7] data[24:31] lcs n lsdwe lad[0:31] lsdras lale lclk lcke lsdcas latch dqm0 dqm3 lsddqm[0:3] local bus interface cas 32m x 8 cs ras we ba[1:0] dqm cke clk addr[12:0] sdram dq[0:7] cas 32m x 8 cs ras we ba[1:0] dqm cke clk addr[12:0] sdram dq[0:7] x4    lsda10 a10 a10   
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-94 freescale semiconductor local bus controller consider the following sdram organization:  the 32-bit port size is organized as 8 x 8 x 32 mbit.  each device has four internal banks, 13 row address lines, and 10 column address lines. the logical address is partitioned as shown in table 13-36 . the following parameters are extracted:  cols = 011, 10 column lines  rows = 100, 13 row lines during the address phase, the sdram address port is set as shown in table 13-37 . because the internal bank selects are multiplexed over la[15:16], lsdmr[bsma] must be set to 011. table 13-38 shows the address port configuration during a read/write command. table 13-39 shows the register configuration for this example. psrt and mptpr are not shown but should be programmed according to the device?s specific refresh requirements. lad18 a11 lad17 a12 lad16 ba0 (if lsdmr[bsma] = 011) lad15 ba1 (if lsdmr[bsma] = 011) table 13-36. logical address bus partitioning a[0:4] a[5:17] a[18:19] a[20:29] a[30:31] msb of start address row bank select column lsb table 13-37. sdram device address port during address phase la[0:14] la[15:16] la[17:29] la[30:31] ? internal bank select a[18:19] row a[5:17] no-connect table 13-38. sdram device address port during read/write command la[0:14] la[15:16] la[17:18] la[19] la[20:29] la[30:31] msb of start address internal bank select don?t care ap column no-connect table 13-35. lad n signal connections to 128-mbyte sdram (continued) lad (latch address) sdram address pin
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-95 13.5.4.3.4 256-mbyte sdram this example uses the same micron sdram as in the previous example, but doubles the number of devices connected and therefore uses two chip selects. 13.5.4.3.5 512-mbyte sdram this example uses the mt48lc64m4a2fb from micron to implement 512 mbytes. in this sdram organization:  the 32-bit port size is 8 4 64 mbit 2 chip select lines.  each device has 4 internal banks, 13 row address lines, and 11 column address lines. table 13-39. register settings for 128-mbytes sdrams register field value br n ba base address xba ext. base address ps 11 = 32-bit port size ms 011 = sdram-local bus v1 or n am 11_1111_1000_0000_0000_0 xam 11 cols 011 rows 100 lsdmr rfen 1 op 000 bsma 011 rfrc from device data sheet pretoact from device data sheet acttorow from device data sheet bl 0 wrc from device data sheet bufcmd 0 cl from device data sheet
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-96 freescale semiconductor local bus controller the logical address is partitioned as shown in table 13-40 . the following parameters can be extracted:  cols = 100, 11 column lines  rows = 100, 13 row lines during the address phase, the sdram address port is set as in table 13-41 . because the internal bank selects are multiplexed over la[15:16], lsdmr[bsma] must be set to 011. table 13-42 shows the address port settings during a read/write command. table 13-43 shows the register configuration. psrt and mptpr are not shown, but they should be programmed according to the specific device?s refresh requirements. table 13-40. logical address partitioning a[0:3] a[4:16] a[17:18] a[19:29] a[30:31] msb of start address row bank select column lsb table 13-41. sdram device address port during address phase la[0:13] la[15:16] la[17:29] la[30:31] ? internal bank select (a[17:18]) row (a[4:16]) no-connect table 13-42. sdram device address port during read/write command la[0:14] la[15:16] la[17] la[18] la[19:29] la[30:31] msb of start address internal bank select don?t care ap column no-connect table 13-43. register settings for 512-mbyte sdrams register field value br n ba base address xba ext. base address ps 11 = 32-bit port size ms 011 = sdram-local bus v1 or n am 11_1110_0000_0000_0000_0 xam 11 bpd 01 cols 100 rows 100
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-97 13.5.4.3.6 power-down mode sdrams offer a power-down mode during which the device is not refreshed, and therefore, data is not maintained. this mode is invoked by driving cke low, while all internal banks are idle; note that they must be precharged first. figure 13-75 shows the timing. note that the figure does not show the precharge-all command that is issued by the lbc automatically prior to the self-refresh command. figure 13-75. sdram power-down timing cke remains low, as long as the device is powered down. after cke transitions to high, the sdram exits the power-down mode. 13.5.4.3.7 self-refresh in order to be able to stop activity on the local bus (for power save or debug), while the content of the sdram is maintained, the self-refresh mode is supported. this mode is invoked by issuing a psdmr rfen 1 op 000 bsma 011 rfrc from device data sheet pretoact from device data sheet acttorow from device data sheet bl 0 wrc from device data sheet bufcmd 0 cl from device data sheet table 13-43. register settings for 512-mbyte sdrams (continued) register field value command cke nop nop nop supplier specific minimum time new command accepted here all banks idle cannot violate minimum refresh specification (as defined by s , re , ce , w , & addr) clock low-to-high transitions
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-98 freescale semiconductor local bus controller self-refresh command to the sdram. the lbc applies the same timing as for the auto refresh, but also pulls the sdram cke (lcke) signal low in the same cycle. this can only be done with all banks being idle; the sdram machine must precharge them ahead of this. as long as cke stays low, the device refreshes itself and does not need to see any refreshes from the local bus. to exit self refresh, cke simply has to be pulled high. note that after returning from self-refresh mode the sdram needs a supplier-specific time before it can accept new commands and the auto-refresh mechanism has to be started again. figure 13-76 shows this timing. the sdram controller always uses 200 local bus clocks, which should satisfy any sdram requirements. as in the case of the power-down mode, the figure does not show the precharge-all command that is issued by the lbc automatically prior to the self-refresh command. refer to section 13.4.3.3, ?intel pc133 and jedec-standard sdram interface commands ,? for sdram interface commands and information on the self-refresh command. t figure 13-76. sdram self-refresh mode timing external ck cke s re ce w an supplier-specific minimum time new command can occur here self-refresh exit self-refresh entry all banks idle nop stable clock
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-99 13.5.4.3.8 sdram timing to allow for very high speeds on the memory bus, the capacitive loading on the local bus must be taken into consideration as shown in table 13-44 . note: capacitance values compiled from worst case numbers from various data sheets from samsung and micron to implement a system using the hierarchy described earlier for two synchronous memory banks, one address latch and one buffer loading the multiplexed address/data bus sees a loading of four loads of about 6.5 pf maximum. 30 pf can be used as a nominal load. note: ac characteristics compiled from worst-case numbers from various data sheets from samsung and micron setup and hold timing calculations: address tof (time of flight): board layout delay data tof (time of flight): board layout delay table 13-44. sdram capacitance pin min max unit clk 2.0 4.0 pf ras , cas , we , cs , cke, dqm 2.0 5.0 pf address 2.0 5.0 pf dq 0 ?dq 31 3.5 6.5 pf table 13-45. sdram ac characteristics parameter device speed unit 166 mhz 133 mhz min max min max clk cycle time cas latency = 3 6 1000 7.5 1000 ns cas latency = 2 ? 7.5 clk to valid output delay cas latency = 3 ? 5 ? 5.4 ns cas latency = 2 ? ? ? 5.4 output data hold time cas latency = 3 2.5 ? 3 ? ns cas latency = 2 ? ? 3 ? input setup time 1.5 ? 2 ? ns input hold time 1 ? 1 ? ns clk to output in hi-z cas latency = 3 ? 5 5.4 ? ns cas latency = 2 ? ? 5.4 ?
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-100 freescale semiconductor local bus controller clock skew (time of flight): clock skew between the lbc and the clock at the memory device. the local bus dll feedback mechanism must be used to control this skew to optimize the timing margins, as described in the rest of this subsection. address setup margin = cycle time ? local bus address ctq ? sdram address input setup time ? address tof + clock skew address hold margin = local bus address output hold time + address tof ? sdram address input hold time ? clock skew data write to sdram setup margin = cycle time ? local bus data ctq ? sdram data input setup time ? data tof + clock skew data write to sdram hold margin = local bus data output hold time + data tof ? sdram data input hold time ? clock skew data read from sdram setup margin = cycle time ? sdram data ctq ? local bus data input setup time ? data tof ? clock skew data read from sdram hold margin = sdram data output hold time + data tof ? local bus data input hold time + clock skew to improve the timing margins a dll is used to generate external clocks, which minimize the skew between the local bus and the memory clock. figure 13-77 shows relative timings for the local bus clock dll. figure 13-77. local bus dll operation t d = t dll + t p rbc (reference bus clock) lsync_out lsync_in lclk lbc output signals on pins t p t l
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-101 13.5.4.4 parity support for sdram contrary to older dram technologies, sdram devices typically are organized either x4, x8, x16 or x32. there are no mainstream devices that include parity support. to allow for error protection on the local bus an additional sdram for the 4 parity bits must be used. since the local bus allows for sdram accesses with less than the full port size, read-modify-write cycles are supported for sdram write cycles. figure 13-78 shows a connection diagram. figure 13-78. parity support for sdram 13.5.5 interfacing to zbt sram in many applications, sdram provides sufficient performance for the local bus. however, especially in networking applications, memory access patterns are often random and sdram is not optimized for that case. zbt srams have been designed to optimize the performance in networking applications. this section describes how to interface to zbt srams. figure 13-79    4 dp[0:3]    data[0:7] data[24:31] lcs n lsdwe lad[0:31] lsdras lale lclk lcke lsdcas latch dqm0 dqm3 lsddqm[0:3] local bus interface cas 32m 8 cs ras we ba[1:0] dqm cke clk addr[12:0] sdram dq[0:7] lsda10 a10 cas 32m 4 cs ras we ba[1:0] dqm cke clk addr[12:0] sdram dq[0:3 ] a10 cas 32m 8 cs ras we ba[1:0] dqm cke clk addr[12:0] sdram dq[0:7] a10 ldp[0:3] lpbse
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-102 freescale semiconductor local bus controller shows the connections. the upm is used to generate control signals. the same interfacing is used for pipelined and flow-through versions of zbt srams. however different upm patterns must be generated for those cases. because zbt srams will mostly be used by performance-critical applications, we assume here that, typically, the maximum width of the local bus of 32 bits will be used. zbt srams allow different configurations. for the local bus the burst order should be set to linear burst order by tying the mode pin to gnd; cke should also be tied to ground. zbt srams perform four-beat bursts. because the lbc generates eight-beat transactions (for 32 bit ports) the upm breaks down each burst into two consecutive four-beat bursts. the internal address generator of the lbc generates the new a27 for the second burst. figure 13-79. interface to zbt sram because we use linear burst on the sram, the device will itself burst with the burst addresses of [0:1:2:3]. the local bus always generates linear bursts and expects [0:1:2:3:4:5:6:7]. therefore, two consecutive linear bursts of the zbt sram with a27 = 0 for the first burst and a27 = 1 for the second burst give the desired burst pattern. dp[2:3] data[0:15] data[16:31] bw [0:1] bw [2:3] dp[0:1] ce 1m 18 adv/ld we zz bw [0:1] mode cke clk sa[19:0] zbt dq[0:17] oe sram ce 1m 18 adv/ld we zz bw [0:1] mode cke clk sa[19:0] zbt dq[0:17] oe sram lbs [0:3] lcs n lgpl0 lgpl2 lad[0:31] lgpl1 local bus interface lale ldp[0:3] lclk gpio la[27:29] latch
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-103 the upm also supports single beat accesses. because the zbt sram does not support this and always responds with a burst, the upm pattern has to take care that data for the critical beat is provided (for write) or sampled (for read), and that the rest of the burst is ignored (by negating we ). the upm controller basically has to wait for the end of the sram burst to avoid bus contention with further bus activities. zbt srams have a power down mode, which is invoked by the zz pin. connecting a gpio pin to zz allows use of that power down mode; however accesses to the sram while in power down mode do not create valid results. this should be taken care of by the system software. another observation is that srams are available with natural parity. in the example, we use a 18 sram, which holds two data bytes and two parity bits. while for the support of parity on sdram banks the local bus has to use read-modify-write cycles and compromise performance, sram banks can be used with natural parity and do not compromise performance for parity support. 13.5.6 interfacing to dsp host ports in many applications, an integrated communications processor aggregates traffic for dsps and distributes that traffic to the dsps. the local bus allows connection to a variety of different dsp host ports and this section gives some information on how to interface to some example dsps. 13.5.6.1 interfacing to msc8101 hdi16 this section describes how to interface to the hdi16 peripheral interface of the msc8101. after initial set-up of the interface, the host and hdi16 device can communicate either by a read and write transaction from the core or, if the setup on the dsp and the host are implemented appropriately, by dma transfers of the host dma controller, which can be triggered automatically by signals generated by the hdi16 peripheral. 13.5.6.1.1 hdi16 peripherals the host interface (hdi16) is a 16-bit-wide, full-duplex, double-buffered parallel port that can directly connect to the data bus of a host processor. it supports a variety of buses and gluelessly connects with a number of industry-standard microcomputers, microprocessors, and dsps. the hdi16 also supports the 8-bit host data bus, which makes it fully compatible with the dsp56300 hi08 (as viewed by the host side, not from the dsp side). the host bus can operate asynchronously to the sc140 core clock, and the hdi16 registers are divided into two banks. the host register bank is accessible to the external host, and the core register bank is accessible to the sc140 core. the msc8101hdi16 host port peripheral has two sets of 16-bit-wide registers?one set is only visible internally to the dsp, while the other set is visible only to the external host processor. figure 13-81 illustrates the relationship between the two sides.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-104 freescale semiconductor local bus controller all of the hdi16 peripheral?s registers are mapped directly onto the msc8101?s qbus, as defined by the msc8101 16-bit digital signal processor reference manual (order number msc8101rm); the transmit and receive fifos are mapped onto the dma data bus such that the dma controller can access them directly without core intervention. the addressing for each of these registers is defined in section 13.5.6.1.2, ?physical interconnections.? the hdi16 host port itself is a 16-bit-wide parallel port with various strobe and multiplexing options. the most important hdi16 host port facet is that it is specified as an asynchronous interface and so reduces concerns over clock skew between the hdi16 host port and the host device?s buses. furthermore, with all the host port registers being accessed with a single chip select and four address lines, as far as the local bus is concerned, the dsp host port is akin to an asynchronous memory mapped region. so, for the hdi16 port in single strobe mode, the host device asserts a chip select, a single data strobe and a read/write line to select hdi16 read or write bus operations. the read and write strobes are also used as the data latch control to complete the bus transactions, obviating the need for any handshake termination signal from the dsp. the upm programmer is responsible for satisfying the ac timings of the hdi16 transactions. through appropriate mode selection, the hdi16 peripheral?s feature set can be fully supported by the local bus?s upm controlled signals. the upm defined interface can be used with any of the local bus?s eight chip selects to give the 16-bit port size and strobe generation that matches that of the hdi16 host port. figure 13-80 shows the internal register diagram of the hdi16. figure 13-80. msc8101 hdi16 peripheral registers tx0 tx1 tx2 tx3 horx hcr hsr hcvr hpcr rx0 rx1 rx2 rx3 16 16 16 16 hotx isr icr cvr 16 16 16 64 64 qbus data bus dma data bus host bus 16 16 16 16 16 16 16 16 64 64
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-105 13.5.6.1.2 physical interconnections the physical interconnections between the upm controlled local bus and the hdi16 of the msc8101 hdi16 peripheral are given in table 13-46 and figure 13-81 . figure 13-81. interface to msc8101 hdi16 table 13-46. local bus to msc8101 hdi16 connections msc8101 signal(s) type description connect with local bus signal hd[0:15] i/o/z host data bus lad[0:15] ha[0] i host address line either la[27] or latched a25 ha[1] i host address line either la[28] or latched a26 ha[2] i host address line la[29] ha[3] i host address line la[30] hcs1 i host chip select 1 lcs n hcs2 i host chip select 2 tie this to v dd hrdrw i host r/w signal lgpl1 or inverted lbctl signal hds i host data strobe signal lgply hrrq/hack o receive host request op as required in application htrq/hreq o transmit host request op as required in application hd[0:15] ha[0:1] latch ha[2:3] hcs1 hrdrw hds hrrq/hack htrq/hreq lad[0:31] lale la[29:30] lcs n lgply as required lgpl1 local bus interface lad[0:15] hcs2 msc8101 la[27:28] in application or inverted lbctl
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-106 freescale semiconductor local bus controller the connections are specified as follows:  one chip select, lcs n (whatever is available in the system), is used to memory map accesses from the host local bus to the hdi16 msc8101?s hdi16 peripheral, and is connected to the hdi16 chip select line (hcs).  this interface uses two separate general-purpose strobe lines (lgpl1 and lgply): ? lgpl1 is programmed to generate the hdi16 read/write signal (hrdrw), which is typically high for a read access and low for write access. in any case, the host port requires a hr/w signal. this can be generated by using lgpl1, and allows it to adopt the timing virtually without restrictions. alternatively the designer can invert lbctl to generate this signal. it is the responsibility of the upm pattern designer to plan for the additional delay of that inverter in the upm pattern to satisfy the ac timings at the dsp host port. ? lgply is programmed to generate the hdi16 data strobe (hds), which must be asserted every 16-bit read or write transaction.  data lines?the bus data lines (lad n ) are directly connected to the hdi16 data lines (hd n ).  dma request/service request signals (hrrq & htrq)?as appropriate in the application  address lines?the address lines between the lbc and the hdi16 msc8101 can either be connected in a straightforward or a specific manner to enable burst transfers across the hdi16. the connections are defined as follows and are described in more detail in the following sub-section: ? either la[27] or latched value of a25 -> ha0 ? either la[28] or latched value of a26 -> ha1 ? la[29] -> ha2 ? la[30] -> ha3  ground lines?in order to provide the best ground plane, it is highly advised that all grounds are common and connected together. 13.5.6.1.3 supporting burst transfers as mentioned previously, to facilitate burst transfers the host?s local bus address lines can be connected in a very specific way. first, the local bus a31 signal is not required, as the hdi16 registers are 16-bit word addressed. secondly, local bus la[27] and la[28] signals can be eliminated, so that the host side transmit and receive registers wrap around the same four 16-bit word addresses. for example, host transmit register 0 on the hdi16 peripheral (address 0x04) can be obtained by the host by accessing any of the following memory mapped addresses: 0x20, 0x28, 0x30, or 0x38. this is critical for burst accesses as the source or destination addresses increment after each 16-bit
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-107 access to the interface for all 16 transactions within that burst. by using the addressing as defined, if the first access is at 0x20, the last will be at 0x3e but, more importantly, the four host tx/rx registers will have been looped around four times. 13.5.6.1.4 host 60x bus: hdi16 peripheral interface hardware timings the host upm?controlled local bus and the hdi16 msc8101?s hdi16 host interface are both programmable. careful programming of the host chip select registers and upm can meet the hdi16 msc8101 host port timings. on any bus access the critical timing for both read and write is typically around the data latch point. for the upm based read access, the host has the flexibility to latch data on a rising or falling lclk edge. the falling lclk edge is used here to latch the hdi16 data into the host msc8101 at its earliest convenience. after the data is latched, appropriate hdi16 port data hold time is ensured before the data strobe (ds) and chip select (cs1) are negated. on a upm write cycle, the critical action is in enveloping the ds assertion with cs asserted to ensure proper write data hold time after latching by the hdi16 host port. special attention needs to be given to both the host read and write access strobe (ds) negation times (hds assert). the hdi16 msc8101 specifies some restrictions for consecutive register access, which results in a hold off negation time for the read and write access strobes. rather than restrict the firmware to avoid consecutive bus accesses to host port registers, the negation hold off times should be accommodated in the upm hardware interface settings. additional clocks must be built into the end of upm based cycle giving appropriate time before the next bus cycle starts. the timings can be readily adapted to allow external decode logic to be added to support chip selects for a larger number of dsp hdi16 host ports. 13.5.6.2 interfacing to msc8102 dsi the msc8102 direct-slave interface (dsi) gives an external host direct access to the msc8102. it provides the following slave interfaces to an external host:  asynchronous sram-like interface giving the host single accesses (with no external clock).  synchronous ssram-like interface giving the host single or burst accesses of 256 bits (eight beats of 32 bits or four beats of 64 bits) with its external clock decoupled from the msc8102 internal bus clock.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-108 freescale semiconductor local bus controller the dsi supports 32- or 64-bit data bus. for connection to the local bus the dsi has to be configured in 32-bit mode. this is achieved through the dsp reset configuration. the dsi supports two addressing modes, which are determined during the msc8102 boot sequence. refer to details in the msc8102 documentation.  full address bus mode with ha[11:29] used in both 32-bit data mode and 64-bit data mode  sliding window mode with ha[14:29] used in both 32-bit data mode and 64-bit data mode 13.5.6.2.1 dsi in asynchronous sram-like mode the local bus supports the dsi single strobe as well as the dsi double strobes of operation. as an example the dual strobe configuration is shown below. figure 13-82 shows the interface to the msc8102 dsi for asynchronous mode. figure 13-82. interface to msc8102 dsi in asynchronous mode the asynchronous sram-like mode of the dsi is inherently slower than the synchronous mode and should be used, if only relatively small amounts of data are transferred between the communications controller and the msc8102. to allow for maximum timing flexibility, the upm machine of the lbc should be used. the upm programmer is responsible for ensuring correct setup and hold timings for all signals. the upm allows sufficient control to satisfy any requirements here. figure 13-83 shows an asynchronous write access. the dsi samples the host chip id signals (hcid[0:3]) on the first falling edge of the host write byte strobe signals (hwbs ) on which the host chip select signal (hcs ) is asserted. if the hcid[0:3] signals match the chipid value, the hwbs /hdbs / hwbe /hdbe [0:3] hd[0:31] ha[11:26] latch hcid[0:3] ha[27:29] hrds /hrde hta hint hbcs hcs msc8102 local bus interface lad[0:31] lale la[27:29] lgpl2 lbs [0:3] lupwait int n lcs n lcs y
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-109 dsi is accessed. the dsi will signal with the assertion of the host transfer acknowledge signal (hta ), whether it is ready to sample the host data bus (hd), and the host can terminate the access by immediately negating hwbs . the waen feature of the upm must be used to insert wait states while the dsi is busy. the uwpl bit in the m x mr must be cleared to interpret the correct polarity of hta . the dsi samples the host address bus (ha) and the host data bus (hd) on the rising edge of hwbs . in addition the assertion of hwbs [0:3] are sampled at the end and are part of the access attributes. because the upm is used for this mode, the dcr[4]:htaad should be set to 1 and dcr[9?10]:htadt should be defined to a value different than 00. this mode is to be used in implementations with a pull-up resistor on hta . the host can start its next access (back-to-back accesses) without negating hcs between accesses. if the next access is not to the same msc8102, then to prevent contention on the hta signal, the host must wait until the previous dsi stops driving hta before it accesses the next device. if the next access is to the same msc8102, the host must not start consecutive accesses before hta is actively driven to a value of 1 by the previous access. the easiest way to achieve this is to insert idle cycles at the end of the upm pattern to guarantee that hta is inactive. figure 13-83. asynchronous write to msc8102 dsi figure 13-84 shows an asynchronous read access. the dsi samples the host address bus (ha ) and the hcid on the first falling edge of the host read strobe signal (hrds ) on which the hcs is asserted. if hcid[0:3] match the chipid value, the dsi is accessed. when the dcr[8]:rpe bit is set, read access to the memory space (not to the register space) initiates data prefetching from consecutive addresses in the internal memory space. the dsi signals (with the assertion of the host transfer acknowledge signal (hta )) that data is valid, and the host can sample the host data bus hcs hcid[0:3] ha[11:29] hdst[0:1] hd[0:63] hwbs [0:7] hrds hta legend: timing conventions: valid value that can be 1 or 0 don?t care three-state output signal that is not driven by the dsi 1 0 1 0 htaad=0 & htadt=00 htaad=1 & htadt=01,10,11
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-110 freescale semiconductor local bus controller (hd) and terminate the access by negating hrds . if the data for this access is already in the read buffer due to the prefetch mechanism, assertion time of hta is improved. the waen feature of the upm must be used to insert wait states while the dsi is busy. m x mr[uwpl] has to be cleared to interpret the correct polarity of the hta signal. because the upm is used in the mode, the dcr[4]:htaad should be set to 1 and the drive time control field, dcr[9?10]:htadt, should be defined to a value different than 00. this mode is specially designed to be used for implementations with a pull-up resistor on hta . the host can start its next access (back-to-back accesses) without negating the hcs signal between accesses. if the next access is not to the same msc8102, then to prevent contention on hta , the host must wait until the previous dsi stops driving hta before it accesses the next device. if the next access is to the same msc8102, the host must not start consecutive access before hta is actively driven to 1 by the previous access. the easiest way to achieve this is to insert idle cycles at the end of the upm pattern to guarantee that hta is inactive. figure 13-84. asynchronous read from msc8102 dsi 13.5.6.2.2 dsi in synchronous mode the synchronous ssram-like mode of the dsi is inherently faster than the asynchronous mode and should be used if larger amounts of data are transferred between the communications controller and the msc8102. this will optimize the bus utilization, especially if several msc8102s are connected to one local bus. the upm machine of the lbc must be used to implement this interface. figure 13-85 shows the interface for synchronous mode. because the dsi will assert and negate hta in synchronous mode even within a burst transfer on a clock-by-clock basis and because the hcs hcid[0:3] ha[11:29] hdst[0:1] hd[0:63] hwbs [0:7] hrds hta legend: timing conventions: valid value that can be 1 or 0 don?t care three-state output signal that is not driven by the dsi 1 0 1 0 htaad = 0 & htadt = 00 htaad = 1 & htadt = 01,10,11
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-111 dsi expects the host to react within one clock cycle, some tricks can be implemented to support the synchronous mode. hta drives lupwait of the upm. m x mr[uwpl] must be cleared to interpret the correct polarity of hta . because this signal influences the internal state machine of the local bus clock, the local bus cannot react to hta changes correctly within one local bus clock. refer to section 13.4.4.4.10, ?wait mechanism (waen),? for more detailed information. the solution to this lies in that the local bus operates at a higher frequency than the dsi interface of the dsp. the local bus clock can be divided by an integer divider (1:2, 1:3 or 1:4) to generate the dsi clock. this should not be a problem because the local bus is designed for much higher frequencies than the dsi. because all timings are given in dsp dsi clock cycles, the upm patterns must be adjusted appropriately and need to assert a signal for 2, 3 or 4 clocks (as many as the divider ratio) instead of one. fortunately, the upm has the redo feature, which allows every upm ram entry to be executed 1 , 2 , 3 or 4 , which should be sufficient for any divider ratio that would be used in this case. figure 13-85. interface to msc8102 dsi in synchronous mode this solution allows the local bus to react within multiple local bus clocks to the hta signal and be still within one dsi clock. typically, lupwait is synchronized internally, and only 2 clocks after lupwait changes, new data can be sampled or presented. for example, if the local bus hwbs /hdbs / hwbe /hdbe [0:3] hd[0:31] ha[11:26] latch hcid[0:3] ha[27:29] hrds /hrde hint hbrst hbcs hcs msc8102 local bus interface lad[0:31] lale la[27:29] lgpl2 lbs [0:3] int n lgpl n lcs n lcs y hclkin hta clock lclk lupwait lgply divider sync logic
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-112 freescale semiconductor local bus controller clock ratio is 3 the dsi clock, data can be sampled in the third local bus sub-clock, which is the last third of the dsi clock. if the local bus clock ratio is only 2 the dsi clock, there is a special mode, where the lupwait is not synchronized. refer to section 13.4.4.5, ?synchronous sampling of lupwait for early transfer acknowledge,? for more detailed information. in this mode, data is sampled in the 2nd subclock, which is the second half of the dsi clock. ac timing of lupwait must be met in this mode; otherwise indeterministic behavior may occur. the remaining issue is the synchronization of the upm cycles to the beginning of the dsi clock cycle. because the upm executes n cycles for every cycle of the dsi, a mechanism must be used to ensure that the upm changes transitions in a way that is synchronized to the dsi clock. the solution is to use a special synchronize cycle at the beginning of the pattern. a gpl signal is used to control a multiplexer and to activate external synchronization logic, which uses the dsi clock to stall the upm by asserting lupwait until the beginning of the next dsi cycle. after that, this gpl signal must be negated and the multiplexer connects lupwait to hta instead, for the rest of the bus cycle. note that the gpl signals should be used in the inverted state of their inactive state (gpl[0:4] are 1 when inactive, gpl5 is 0 when inactive) to start the synchronization process. figure 13-86 shows an example for a synchronization mechanism for a clock divider of 3. note that the length of the synchronization cycle depends on the relative start of the synchronization process and varies with every access. it can vary in length from one to n (clock ratio) local bus clocks. the second column (compensation cycle) is intended to compensate for the reaction time of lupwait to get in lockstep with the dsi clock. for example, if the clock divider ratio is 1:3 and the lupwait reaction time is two local bus clocks, because lupwait is synchronized, then one local bus clock should be inserted. figure 13-86. upm synchronization cycle table 13-47. upm synchronization cycles sync cycle compensation cycle dsi cycle 1 bits cst1?cst4 0?3 bst1?bst4 4?7 g0xx 8?11 g1tx 12?13 lclk dsi_clk lgply lupwait
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-113 this section describes synchronous single write and read, and synchronous burst write and read operations. the local bus supports the dsi single strobe as well as the dsi double strobes of operation. the dual strobe configuration is shown as an example. g2tx 14?15 g3tx 16?17 g4t1 18 g4t3 10 19 g5tx 20?21 redo[0] 0 0 1 22 redo[1] 0 0 0 23 loop 0 0 24 exen 0 25 amx0 0 0 26 amx1 0 0 27 na 0 28 uta 0 29 todt 0 30 last 0 31 table 13-47. upm synchronization cycles (continued) sync cycle compensation cycle dsi cycle 1 bits
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-114 freescale semiconductor local bus controller synchronous single write figure 13-87 shows a synchronous single write access. figure 13-87. synchronous single write to msc8102 dsi the dsi samples ha, hdst, hcid, hd, hwbe , hrde , and hbrst on the first hclkin rising edge on which hcs is asserted. if hcid[0:3] match the chipid value, the dsi is accessed. at least one hwbe signal is asserted, and hrde and hbrst are negated. assertion of hta indicates that the dsi is ready to complete the current access and the host must terminate this access. because hta is connected to the lupwait signal of the upm, all local bus signals are frozen until hta goes to 0 and then the upm continues in its pattern. typically, hta is asserted immediately. if the write buffer is full, hta assertion is delayed. hta is asserted for one hclkin cycle, driven to logic 1 in the next cycle, and stops being driven on the next rising edge of hclkin. the host can start its next access to the same msc8102 immediately on the next hclkin rising edge without negating hcs between accesses. if the next access is not to the same msc8102, then, to prevent contention on hta , the host must wait to access the next device until the previous dsi stops driving hta . the easiest way to achieve this is to insert idle cycles at the end of the upm pattern to guarantee that hta is inactive. hclkin hcs hcid[0:3] ha[11:29] hdst[0:1] hd[0:63] hwbe [0:7] hrde hbrst hta legend: timing conventions: valid value that can be 1 or 0 don?t care three-state output signal that is not driven by the dsi 1 0 1 0
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-115 synchronous single read figure 13-88 shows a synchronous single read access. figure 13-88. synchronous single read from msc8102 dsi the dsi samples ha, hdst, hcid, hwbe , hrde , and hbrst on the first hclkin rising edge on which hcs is asserted. if the hcid[0:3] signals match the chipid value, the dsi is accessed. hrde is asserted, and hwbe and hbrst are negated. if dcr[8]:rpe is set (see msc8102 documentation), read access to the memory space (not to the register space) initiates prefetching data from consecutive addresses in the internal memory space. assertion of hta indicates that data is valid and the host must sample the hd and terminate the access. because hta is connected to the upm lupwait signal, all local bus signals are frozen until hta goes to 0; then the upm continues in its pattern. hta is asserted earlier when the data for this access is already prefetched to the read buffer. it asserted for one hclkin cycle and driven to logic 1 in the next cycle. it stops being driven on the next rising edge of hclkin. the host can start its next access to the same msc8102 immediately in the next hclkin rising edge without negating hcs between accesses. if the next access is not to the same msc8102, then, to prevent contention on hta , the host must wait to access the next device until the previous dsi stops driving hta . the easiest way to achieve this is to insert idle cycles at the end of the upm pattern to guarantee that hta is inactive. hclkin hcs hcid[0:3] ha[11:29] hdst[0:1] hd[0:63] hwbe [0:7] hrde hbrst hta legend: timing conventions: valid value that can be 1 or 0 don?t care three-state output signal that is not driven by the dsi 1 0 1 0
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-116 freescale semiconductor local bus controller synchronous burst write figure 13-89 shows a synchronous burst write access. figure 13-89. synchronous burst write to msc8102 dsi the dsi samples ha, hdst, hcid, hd, hwbe , hrde , and hbrst on the first hclkin rising edge on which hcs is asserted. if hcid[0:3] match the chipid value, the dsi is accessed. hwbe are asserted, hbrst is asserted, and hrde is negated. assertion of hta indicates that the dsi is ready to complete the current beat of the access and the host must proceed to the next beat of this access. when the host reaches the last beat of the access, it must terminate the burst access. typically hta is asserted immediately for each beat of the access. if the write buffer is full, hta assertion is delayed. because hta is connected to the lupwait signal of the upm, all local bus signals are frozen until hta goes to 0 and then the upm continues in its pattern. after the last beat of the access, hta is driven to logic 1 and stops being driven on the next rising edge of hclkin. the host can start its next access to the same msc8102 immediately in the next hclkin rising edge without negating hcs between accesses. if the next access is not to the same msc8102, then, to prevent contention on hta , the host must wait to access the next device until the previous dsi stops driving hta . the easiest way to achieve this is to insert idle cycles at the end of the upm pattern to guarantee that hta is inactive. hclkin d(a+ n ) d(a+2) d(a+1) d(a) d(a+2) hcs hcid[0:3] ha[11:29] hdst[0:1] hd[0:63] hwbe [0:7] hrde hbrst hta legend: timing conventions: valid value that can be 1 or 0 don?t care three-state output signal that is not driven by the dsi 1 0 1 0 n = 3 in 64-bit data bus interface n = 7 in 32-bit data bus interface a
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-117 synchronous burst read figure 13-90 shows a synchronous burst read access. the dsi samples ha, hdst, hcid, hwbe , hrde , and hbrst on the first hclkin rising edge on which hcs is asserted. if hcid[0:3] match the chipid value, the dsi is accessed. figure 13-90. synchronous burst read from msc8102 dsi hrde and hbrst are asserted and hwbe are negated. when the dcr[8]:rpe bit (see the msc8102 documentation) is set, a burst read access initiates data prefetching from consecutive addresses in the internal memory space. assertion of hta indicates that data is valid for the current beat of the access and the host must proceed to the next beat of this access. because hta is connected to the lupwait signal of the upm, all local bus signals are frozen until hta goes to 0 and then the upm continues in its pattern. when the host reaches the last beat of the access, it must terminate the burst access. the hta is asserted earlier when the data for this access is already prefetched to the read buffer. typically, after the first beat of the burst access, hta remains asserted until the end of the access. after the last beat of the access, hta is driven to 1 and stops being driven in the next rising edge of hclkin. the host can start its next access to the same msc8102 immediately in the next h clkin rising edge without negating hcs between accesses. if the next access is not to the same msc8102, to prevent contention on hta , the host must wait to access the next device until the previous dsi stops driving the hta signal. the easiest way to achieve this is insert idle cycles at the end of the upm pattern to guarantee that hta is inactive. hclkin d(a+ n ) d(a+2) d(a+1) d(a+2) hcs hcid[0:3] ha[11:29] hdst[0:1] hd[0:63] hwbe [0:7] hrde hbrst hta legend: timing conventions: valid value that can be 1 or 0 don?t care three-state output signal that is not driven by the dsi 1 0 1 0 n = 3 in 64-bit data bus interface n = 7 in 32-bit data bus interface a d(a)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-118 freescale semiconductor local bus controller 13.5.6.2.3 broadcast accesses using hbcs , a host can share one chip-select signal between multiple msc8102 devices for broadcasting write accesses. in broadcast mode, the dsi does not drive its hta signal to prevent contention between multiple devices driving different values to the same signal. also, the dsi does not decode hcid[0:3]. note that broadcasting is allowed only for write accesses. the dsi sets the dsi error register (der) ovf bit if there is an overflow during broadcast accesses. this bit can be cleared by writing a value of 1 to it. note to avoid overflow when accessing dsi registers during broadcast accesses, wait at least 10 host clock cycles in synchronous mode or 8 internal clock cycles in asynchronous mode between each dsi register access. to avoid data corruption, if der[0]:ovf is set, no broadcast access is written until the bit is reset. therefore, after the last broadcast access, and before any regular write access, der[0]:ovf must first be read and reset if it is set. note in asynchronous mode, write data from a previous access (even a normal write access) may be lost due to overflow during broadcast accesses. to prevent such a loss, ensure that previous access data has propagated to the fifo or dsi registers, depending on the type of previous access. this can be achieved by performing a read access prior to the first broadcast access. in broadcast accesses, the host must comply with the following rules:  in asynchronous mode, h wbs [0:3]/hdbs [0:3] assertion time should be at least the minimum, which is defined in the ac characteristics section of the msc8102 technical data sheet.  in synchronous mode single access, the host must wait 1 cycle before terminating the access. access signals must be in the same valid state during two positive edges of the host clock cycles. access duration is two clock cycles (the dsi may translate accesses lasting longer than two clock cycles as two or more back-to-back accesses).  in synchronous mode burst accesses, broadcast accesses are not allowed. 13.5.6.3 interfacing to ehpi from texas instruments tms320c xxxx dsps the enhanced host port interface (ehpi) on dsps from texas instruments provides a 16-bit-wide parallel port through which a host processor can directly access the memory of the dsp. the host
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-119 and the dsp can exchange information through memory internal or external to the dsp and within the address reach of the ehpi. the ehpi uses 23-bit addresses, where each address is assigned to a 16-bit word in memory. the ehpi has two modes, one for multiplexed address/data and one with separate buses.to allow the connection of multiple dsps and other peripherals on the local bus, the use of the ehpi non-multiplexed mode is recommended. the ehpi uses the signals in figure 13-48 . to achieve the timings required by the dsp host port and optimize the bus usage, the use of one of the upms is recommended. note that the dsp address signals reflect 16-bit addresses, whereas local bus address signals reflect byte addresses. this essentially shifts address signals by one bit. the ehpi host port?s two strobe pins, hds1 and hds2 , allow different options to control transfers. the upm supports any of those options; however, the easiest is to use the single active-low strobe mode and connect one upm lgpl signal (whatever is available) to hds . table 13-48. ehpi signals signals type description connect with hd[15:0] i/o/z host data bus: non-muxed mode: data only lad[0:15] ha[19:4] i host address bus: non-muxed mode: addresses latched a[11:26] ha[3:0] host address bus: lsbs la[27:30] hbe[1:0] i host byte-enable signals 00 word, 0 msb, 10 lsb, 11 reserved lbs [0:1] hcs i chip select signal lcs n hr/w ir/w signal lgply or inverted lbctl hds1 , hds2 i data strobe signals must be at least 2 dsp clocks wide  host has separate active-low read and write strobe pins: connect one to hds1 , one to hds2  host has one active-low strobe pin: connect to hds1 or hds2 , the other to 1  host has one active high-strobe pin: connect to hds1 or hds2 , the other to 0 lgpl n hrdy o ehpi ready signal lupwait hcntl0 i ehpi control signals. non-muxed mode:  hcntl=1: access dsp data memory  hcntl=0: access ehpi control register application specific: either gpio pin or latched address lines has i address strobe signal hmode i ehpi mode signal high: non-muxed mode low: muxed mode high rst_mode i reset mode signal hint o dsp to host interrupt signal int n
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-120 freescale semiconductor local bus controller in any case, the host port requires a hr/w signal. this can be generated by using another lgpl signal and allows to adopt the timing virtually without restrictions. alternatively the designer can invert lbctl to generate this signal. it is the responsibility of the upm pattern designer to plan for the additional delay of that inverter in the upm pattern to satisfy ac timings at the dsp host port. figure 13-91. interface to texas instruments ehpi in non-multiplexed mode the dsp does not necessarily have deterministic access times. hrdy indicates whether the ehpi is ready for an access. if the signal is low, wait states must be inserted in the cycle. the lupwait function of the upm provides this mechanism. m x mr[uwpl] must be set to connect to this active-low signal. hd[15:0] ha[19:4] latch hcntl0 ha[3:0] hr/w hcs hbe[1:0] hrdy hint hds1 /hds2 lad[0:31] lale la[27:30] lgply or inverted lbctl lcs n lbs[1:0] lupwait int n lgpl n local bus interface lad[16:31] rst_mode hmode ehpi MPC8540
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 13-121 figure 13-92 shows read timing required by the ehpi in non-multiplexed mode. figure 13-92. ehpi non-multiplexed read timings figure 13-93 shows write timing required by the ehpi in non-multiplexed mode. figure 13-93. ehpi non-multiplexed write timings 13.5.6.3.1 expansion to multiple dsps the connection shown above can be adapted easily to interface to multiple dsps instead of only one. each dsp host port needs to receive its own chip select and interrupt signals, and hrdy must be connected differently, depending on which dsp is used. all other signals can be connected to all host ports in parallel. hcs hds hr/w ha[18:0] hd[15:0] hrdy ? data valid address ? while hcs is not selected, hrdy is in hi-z state. hcs hds hr/w ha[18:0] hd[15:0] hrdy ? valid address data valid data valid valid address ? while hcs is not selected, hrdy is in hi-z state.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 13-122 freescale semiconductor local bus controller hrdy signals can be bussed for certain dsps (such as, tms320vc5510); for others (such as, tms320vc5509), an external multiplexer must be used to decide which hrdy signal is routed to the local bus. this multiplexer can be controlled by the respective chip selects. for a larger number of dsps, this scheme must be extended with external logic, which uses additional address signals to generate multiple dsp hcss for one local bus chip select and to multiplex the hint and hrdy signals. the flexibility of the upm allows for additional delay for that external logic.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-1 chapter 14 three-speed ethernet controllers this chapter describes the two three-speed ethernet controllers of the MPC8540. the two controllers are referenced as tsec1 and tsec2. note that this chapter does not include the description of the separate 10/100 ethernet controller (fec) on the MPC8540. 14.1 introduction the ethernet ieee 802.3 protocol is widely used on lans that are based on the carrier-sense multiple access/collision detect (csma/cd) approach. because ethernet and ieee 802.3 protocols are similar and can coexist on the same lan, both are referred to as ethernet in this manual, unless otherwise noted. 10/100 ethernet provides increased ethernet speed from 10 to 100 megabits per second (mbps) and provides a simple, cost-effective option for backbone and server connectivity. this three-speed ethernet controller (tsec) also implements a gigabit ethernet protocol, which builds on top of the ethernet protocol, but increases speed tenfold over 10/100 ethernet to 1000 mbps, or one gigabit per second (gbps). gigabit ethernet looks identical to ethernet from the data link layer upward but it uses the ansi x3t11 fiberchannel fc-0 (interface and media) and fc-1 (encode/decode) for the phy layer. in this manner, the standard takes advantage of the existing high-speed physical interface technology of fiberchannel while maintaining the ieee 802.3 ethernet frame format, backward compatibility for installed media, and the use of full- or half-duplex csma/cd. the ethernet protocol implements the bottom two layers of the open systems interconnection (osi) 7-layer model, that is, the data link and physical layers. figure 14-1 shows the typical ethernet protocol stack and the relationship to the osi model.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-2 freescale semiconductor three-speed ethernet controllers figure 14-1. ethernet protocol in relation to the osi protocol stack gigabit ethernet provides the following sublayers:  media access control (mac) sublayer?the mac sublayer provides a logical connection between the mac and its peer station. its primary responsibility is to initialize, control, and manage the connection with the peer station.  reconciliation sublayer?the reconciliation sublayer acts as a command translator. it maps the terminology and commands used in the mac layer into electrical formats appropriate for the physical layer entities.  mii (media-independent interface) sublayer?the mii sublayer provides a standard interface between the mac layer and the physical layer for 10/100 mbps operations. it isolates the mac layer and the physical layer, enabling the mac layer to be used with various implementations of the physical layer.  gmii (gigabit media-independent interface) sublayer?the gmii sublayer provides a standard interface between the mac layer and the physical layer for 1-gbps operation. it isolates the mac layer and the physical layer, enabling the mac layer to be used with various implementations of the physical layer.  pcs (physical coding sublayer)?the pcs sublayer is responsible for encoding and decoding data stream to and from the mac sublayer. medium (1000basex) 8b/10b coding is used for fiber. medium (1000baset) 8b1q coding is used for unshielded twisted pair (utp).  pma (physical medium attachment) sublayer?the pma sublayer is responsible for serializing code groups into a bit stream suitable for serial bit-oriented physical devices data link physical logical link control (llc) media access control (mac) osi reference model layers lan csma/cd layers higher layers 10/100 mbps 1-gbps 10/100 ethernet ethernet reconciliation pcs pma pmd mdi mii physical medium reconciliation pcs pma pmd mdi gmii physical medium phy
introduction MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-3 (serdes) and vice versa. synchronization is also performed for proper data decoding in this sublayer. the pma sits between the pcs and the pmd sublayers. for fiber medium (1000basex) the interface on the pmd side of the pma is a 1-bit 1250-mhz signal, while on the pma?s pcs side the interface is a 10-bit interface (tbi) at 125 mhz. the tbi is an alternative to the gmii interface. if the tbi is used, the gigabit ethernet controller must be capable of performing the pcs function. for utp medium, the pmd interface side of the pma consists of four pair of 62.5-mhz pam5 encoded signals, while the pcs side provides the 1250 mbps input to a 8b1q4 pcs.  pmd (physical medium dependent) sublayer?the pmd sublayer is responsible for signal transmission. the typical pmd functionality includes amplifier, modulation, and wave shaping. different pmd devices may support different media.  mdi (medium-dependent interface) sublayer?mdi is a connector. it defines different connector types for different physical media and pmd devices. figure 14-2 describes the different physical interface standards. figure 14-2. ieee 802.3z and 802.3ab physical standards ethernet/ieee 802.3 frames are based on the frame structure shown in figure 14-3 . the term ?packet? is sometimes used to refer to the frame plus the preamble and start frame delimiter (sfd). figure 14-3. ethernet/ieee 802.3 frame structure gigabit media-independent interface (gmii) (optional) 1000basex pcs 8 bytes/10 bytes auto-negotiation 1000baselx fiber optics 1000basesx fiber optics 1000basecx copper mac full-duplex and/or half-duplex 802.3ab 1000baset pcs 1000baset pma shielded copper cable (25 m) multimode fiber (500 m) single-mode or multimode fiber (3 km) tbi 802.3z unshielded twisted pair (100 m) start frame delimiter preamble data destination address source address type/ length 6 bytes 1 byte 7 bytes 2 bytes 6 bytes 46?1500 bytes 4 bytes frame check sequence frame length is 64?1518 bytes
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-4 freescale semiconductor three-speed ethernet controllers the elements of an ethernet frame are as follows:  preamble? the 7-byte preamble of alternating ones and zeros used for receiver timing synchronization (each byte containing the value 0x55).  start frame delimiter (sfd)?a sequence of 0xd5 (10101011 because the bit ordering is lsb first) indicates the beginning of the frame.  48-bit destination address (da)?the first bit identifies the address as an individual address (0) or a group address (1). the second bit is used to indicate whether the address is locally-defined (1) or globally-defined (0).  48-bit source address (sa)? (original versions of the ieee 802.3 specification allowed 16-bit addressing, which has never been used widely.)  ethernet type field/ieee 802.3 length field?the type field signifies the protocol (for example, tcp/ip) used in the rest of the frame. the length field specifies the length of the data portion of the frame. for both ethernet and ieee 802.3 frames to exist on the same lan, the length field must be unique from any type fields used in ethernet. this limitation requires that a type field be identified by a decimal number equal to or greater than 1536 (0x0600) but less than 65535 (0xffff). if the number, however, is between 0 and 1,500 (0x0000 through 0x05dc) then this field indicates the length of the mac client data. the range from 1,501 to 1,535 (0x5dd through 0x5ff) was intentionally left undefined.  data and padding?padding is optional. it is only needed if the data is smaller than 46 octets (one octet = one byte) to ensure the minimum frame size of 64 octets as specified in the ieee 802.3 standard. in 802.3x the first two octets of the data field are used as opcode (op) (pause = 0x0001) and the second two octets are used to transmit a pause time (pt) parameter (pausetime = 0x0000 for on and 0xffff for off). in addition, a third two-octet field can be used for an extended pause control parameter (pte). because the use of these fields varies with the protocol used, the ability to examine them and report their content can significantly accelerate ethernet frame processing.  frame-check sequence (fcs)?specifies the standard 32-bit cyclic redundancy check (crc) obtained using the standard ccitt-crc polynomial on all fields except the preamble, sfd and crc. figure 14-4 provides additional details of the ethernet/ieee 802.3 frame structure.
introduction MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-5 figure 14-4. ethernet/ieee 802.3 frame structure with more details relative to figure 14-4 , the ieee 802.3 section 3.11 (mac frame format) defines the frame format such that the octets of a frame are transmitted from left to right (preamble first, the fcs last), and the bits of each octet are transmitted least-significant bit (lsb) first. the destination address example shown in figure 14-4 (02608c:876543) which would normally be written as 0000 0010 0110 0000 1000 1100 1000 0111 0110 0101 0100 0011 is transmitted bit by bit as 0100 0000 0000 0110 0011 0001 1110 0001 1010 0110 1100 0010 which is an individual address (because the lsb is cleared) but locally-defined (because the second least-significant bit is set). when first originated, a type field was used for protocol identification. the ieee 802.3 specification eliminated the type field, replacing it with the length field. the length field is used to identify the length, in bytes, of the data field. the protocol type in 802.3 frames are held within the data portion of the packet. the logical link control (llc) is responsible for providing services to the network layer regardless of media type, such as fddi, ethernet, token ring, and others. the llc layer makes use of llc protocol data units (pdus) in order to communicate between the media access control (mac) layer and the upper layers of the protocol stack. three variables determine access into the upper layers via the llc-pdu. the variables include the destination service access point (dsap), the source service access point (ssap), and a control variable. the dsap address specifies a unique identifier within the station providing protocol information for the upper layer. the ssap provides the same information for the source address. the llc defines service access for protocols that conform to the open system interconnection (osi) model for network protocols. however, many protocols do not obey the rules for those start frame delimiter preamble data destination address source address type/ length 6 bytes 1 byte 7 bytes vendor uservalue 2 bytes control ssap dsap information 6 bytes 46?1500 bytes 4 bytes llc frame yzxx_xxxx xxxx_xxxx xxxx_xxxx xxxx_xxxx xxxx_xxxx xxxx_xxxx bit 0 bit 47 destination address u/l i/g example: 02608c: 876543 (02608c = 3com, 876543 = uservalue assigned by 3com) 3 bytes frame check sequence frame length is 64?1518 bytes
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-6 freescale semiconductor three-speed ethernet controllers layers and additional information must be added to the llc in order to provide information regarding those protocols. protocols that fall into this category include ip and ipx. the method used to provide this additional protocol information is called a subnetwork access protocol (snap) frame. a snap encapsulation is indicated by the dsap and ssap addresses being set to 0xaa and the llc control field being set to 0x03. if that address is seen, a snap header follows. the snap header is five bytes long. the first three bytes consist of the organization code (snap oui), which is assigned by the ieee. the last two bytes become the type value set from the original ethernet specifications if snap oui = 0, or they become a snap protocol identifier if snap oui is non zero. the three-speed ethernet controller (tsec) allows the flexibility to accelerate the identification and retrieval of all the standard and non-standard protocols mentioned above. figure 14-5 shows the block diagram of the tsec. figure 14-5. tsec block diagram address/data filtering mac layer dma tx system clk data path pack words unpack words rx fifo 2 kbytes fifo control tx fifo 2 kbytes tx/rx descriptors tx/rx data tx/rx status block interface clocks to p h y to p h y to p h y to p h y gmii reduced signal reduced signal tbi tbi gmii rgmi rtbi tbi or or or mii mgmt mib counters interface interface
features MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-7 14.1.1 three-speed ethernet controller overview the tsec is designed to support 10, 100, and 1000 mbps ethernet/802.3 networks and contains the following components:  ethernet media access controller (mac)  first-in first-out (fifo) controller  direct memory access (dma) controller  ten-bit interface (tbi)  register-based statistical module that supports management information base (mib) remote monitoring (rmon) the most-significant byte of data in a receive or transmit data buffer corresponds to the most-significant byte of a frame, respectively. the complete tsec is designed for single mac applications. the tsec supports several standard mac-phy interfaces to connect to an external ethernet transceiver:  mii interface running at 10/100 mbps  gmii interface running at 1 gbps  tbi interface that can be connected to a serdes device for fibre channel applications.  reduced signal count versions of the gmii (rgmii) and ten-bit (rtbi) interfaces while most of this document refers to the non-reduced signal count interfaces, it must be understood that these references also apply to the reduced signal count interfaces. the tsec software programming model is similar to the mpc8260 (powerquicc ii) device. hence, it enables freescale customers to leverage already implemented ethernet drivers, reducing the software development cycle. 14.2 features the MPC8540 tsec includes these distinctive features:  ieee 802.3, 802.3u, 802.3x, 802.3z, 802.3ac, 802.3ab compliant  support for different ethernet physical interfaces: ? 10/100/1gb ieee 802.3 gmii ? 10/100 mbps ieee 802.3 mii ? 10-mbps ieee 802.3 mii ? 1-gbps ieee 802.3z tbi ? 10/100 mbps rmii ? 1-gbps full-duplex rgmii ? 1-gbps rtbi
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-8 freescale semiconductor three-speed ethernet controllers  full- and half-duplex support (1 gbps supports only full-duplex)  ieee 802.3 full-duplex flow control (automatic pause frame generation or software programmed pause frame generation and recognition)  support for out-of-sequence transmit queue (for initiating flow control)  programmable maximum frame length supports jumbo frames (up to 9.6 kbytes) and ieee 802.1 virtual local area network (vlan) frames  retransmission from transmit fifo following a collision  support for crc generation and verification of inbound/outbound packets  address recognition ? each exact match can be programmed to be accepted or rejected ? broadcast address (accept/reject) ? exact match 48-bit individual (unicast) address ? hash (256-bit hash) check of individual (unicast) addresses ? hash (256-bit hash) check of group (multicast) addresses ? promiscuous mode  extraction data and its associated buffer descriptors can be directed to the processor?s l2 cache to reduce access latency  interrupt coalescing subject to a threshold frame counter and/or a threshold timer (independent functionality for received and transmitted frames)  rmon statistics support 14.3 modes of operation the primary tsec operational modes are the following:  full- and half-duplex operation this is determined by maccfg2 register?s full duplex bit. full-duplex mode is intended for use on point to point links between switches or end node to switch. half-duplex mode is used in connections between an end node and a repeater or between repeaters. if configured in half-duplex mode (only 10- and 100-mbps operation; maccfg2 register?s full duplex bit is cleared), the mac complies with the ieee csma/cd access method. if configured in full-duplex mode (10/100/1gb operation; maccfg2 register?s full duplex bit is set), the mac supports flow control. if flow control is enabled, it allows the mac to receive or send pause frames.
external signal descriptions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-9  10- and 100-mbps mii interface operation the mac-phy interface operates in mii mode by configuring bits 22?23 of maccfg2 (maccfg2[i/f mode] = 01). the mii is the media-independent interface defined by the 802.3 standard for 10/100 mbps operation. the speed of operation is determined by the tsec n _tx_clk and tsec n _rx_clk signals, which are driven by the transceiver. the transceiver either auto-negotiates the speed or it may be controlled by software via the serial management interface (ec_mdc/ec_mdio signals) to the transceiver.  1-gbps gmii and tbi interface operation the mac-phy interface operates in gmii mode by configuring bits 22?23 of maccfg2 (maccfg2[i/f mode] = 10). the gmii is the gigabit media-independent interface defined by the 802.3 standard for 1-gbps operation. independently, the mac-phy interface can also operate in tbi mode. note that either the tbi or gmii interface is chosen; not both at the same time. tbi is the ten-bit interface which contains pcs functions (ten-bit encoding/decoding) as defined by the 802.3 standard. in reduced signal count mode (rgmii or rtbi), the mac remains configured in gmii or tbi but the tsec multiplexes and decodes the input signals and provides the mac with the expected interface. tsec provides the tsec n _gtx_clk to the phy in either gmii or tbi mode of operation.  address recognition options the options supported are promiscuous, broadcast, exact individual address hash or exact match, and multicast hash match. for detailed descriptions refer to section 14.5.3.8.1, ?individual address registers 0?7 (iaddrn),? section 14.5.3.8.2, ?group address registers 0?7 (gaddrn),? section 14.5.3.4.1, ?receive control register (rctrl) ,? and section 14.6.2.6, ?frame recognition.?  rmon support see section 14.6.2.5, ?rmon support.?  internal loop back internal loop back mode is selected through the loop back bit in the maccfg1 register. see section 14.6.2.10, ?internal and external loop back,? for details. 14.4 external signal descriptions this section defines the tsec signals. the buses are described using the bus convention used in ieee 802.3 because the phy follows this same convention (that is, txd[7:0] means 0 is the lsb). notice that except for external physical interfaces the buses and registers follow a big-endian format.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-10 freescale semiconductor three-speed ethernet controllers the tsec network interface supports multiple options:  the mii option requires 18 i/o signals (including the ec_mdio and ec_mdc mii management interface) and supports both a data and a management interface to the phy (transceiver) device. the mii option supports both 10- and 100-mbps ethernet rates.  the gmii option is a superset of the mii signals and supports a 1-gbps ethernet rate.  the tbi interface shares signals with the gmii interface signals.  finally, rgmii and rtbi options are reduced-signal implementations of the gmii and tbi interfaces. 14.4.1 detailed signal descriptions table 14-1 contains detailed descriptions of the tsec interface signals. for rgmii mode details please refer to the hewlett-packard reduced gigabit media-independent interface (rgmii) specification version 1.2a, dated 9/22/2000. all other modes follow the ieee 802.3 standard, 2000 edition. input signals not used are internally disabled. output signals not used are driven low. table 14-1. tsec signals?detailed signal descriptions signal i/o description tsec n _col i collision input. the behavior of this signal is not specified while in full-duplex mode. state meaning asserted/negated?in mii mode, this signal is asserted upon detection of a collision, and must remain asserted while the collision persists. this signal is not used in the tsec gmii, tbi, rtbi and rgmii modes. timing asserted/negated?this signal is not required to transition synchronously with tsec n _tx_clk or tsec n _rx_clk. tsec n _crs i carrier sense input. in tbi and rtbi modes this signal can be used as sdet (signal detect), an optional signal that some phys generate in tbi or rtbi modes. this signal is not used in the tsec gmii or rgmii modes. state meaning asserted/negated?in mii mode, tsec n _tx_clk is asserted while the transmit or receive medium is not idle. in the event of a collision, tsec n _crs must remain asserted for the duration of the collision. timing asserted/negated?this signal is not required to transition synchronously with tsec n _tx_clk or tsec n _rx_clk. tsec n _gtx_clk o gigabit transmit clock. this signal is an output from the tsec into the phy. in gmii, tbi, or rtbi mode tsec n _gtx_clk is a 125-mhz clock that provides a timing reference for tx_en, txd, and tx_er. in rgmii mode tsec n _gtx_clk becomes the transmit clock and provides timing reference during 1000base-t (125-mhz), 100base-t (25-mhz) and 10base-t (2.5-mhz) transmissions. this signal is not used in mii mode. ec_gtx_clk125 i gigabit transmit 125-mhz source. this signal must be generated externally with a crystal or oscillator, or is sometimes provided by the phy. in gmii, rgmii, rtbi or tbi mode, ec_gtx_clk125 is a 125-mhz input into the tsec and is used to generate all 125-mhz related signals and clocks. this input is not used in mii mode.
external signal descriptions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-11 ec_mdc o management data clock. in gmii, mii, rgmii, rtbi or tbi mode this signal is a clock (typically 2.5 mhz) supplied by the mac (ieee?set minimum period of 400 ns or a frequency of 2.5 mhz, but the device may be configured up to 12.5 mhz if supported by the phy at that speed). this clock is generated by dividing the core complex bus (ccb) clock by eight. the ratio can be modified further by writing to miimcfg[29:31]. note that this signal is used during reset to configure the tsec interface to ?reduced-signal? or ?non-reduced-signal? mode. see section 4.4.3, ?power-on reset configuration,? for more information. ec_mdio i/o management data input/output, bidi state meaning asserted/negated?in gmii, mii, rgmii, rtbi or tbi mode ec_mdio is a bidirectional signal to input phy-supplied status during management read cycles and output control during mii management write cycles. timing asserted/negated?this signal is required to be synchronous with the ec_mdc signal. tsec n _rx_clk i receive clock. in gmii, mii or rgmii mode, the receive clock tsec n _rx_clk is a continuous clock (2.5, 25, or 125 mhz) that provides a timing reference for tsec n _rx_dv, tsec n _rxd, and tsec n _rx_er. in tbi mode, tsec n _rx_clk is the input for a 62.5-mhz pma receive clock, 0 split phase with pma_rx_clk1 and is supplied by the serdes. in rtbi mode it is a 125-mhz receive clock. tsec n _rx_dv i receive data valid. in gmii or mii mode, if tsec n _rx_dv is asserted, the phy is indicating that valid data is present on the gmii and mii interfaces. in rgmii mode, tsec n _rx_dv becomes rx_ctl. the rx_dv and rx_err are received on this signal on the rising and falling edges of tsec n _rx_clk. in tbi mode, tsec n _rx_dv represents receive code group (rcg) bit 8. together, with rcg[9] and rcg[7:0], they represents the 10-bit encoded symbol of gmii receive signals. in rtbi mode, tsec n _rx_dv represents receive code group (rcg) bit 4 and 9. on the positive edge of the tsec n _rx_clk, rcg[4] and rcg[3:0] represents the first half of the 10-bit encoded symbol. on the negative edge of the tsec n _rx_clk, rcg[9] and rcg[8:4] represents the second half of the 10-bit encoded symbol. tsec n _rxd[7:0] i receive data in. in gmii mode, tsec n _rxd[7:4] with tsec n _rxd[3:0], represent one complete octet of data to be transferred from the phy to the mac when tsec n _rx_dv is asserted. in tbi mode, tsec n _rxd[7:4] represents rcg[7:4]. together, with rcg[9:8] and rcg[3:0], they represent the 10-bit encoded symbol of gmii receive signals. in gmii mode, tsec n _rxd[3:0] represents a nibble of data to be transferred from the phy to the mac when tsec n _rx_dv is asserted. a completely-formed sfd must be passed across the mii. while tsec n _rx_dv is not asserted, tsec n _rxd has no meaning. in rgmii or rtbi mode, tsec n _rxd[3:0] are received on the rising edge of tsec n _rx_clk and tsec n _rxd[7:4] are received on the falling edge of tsec n _rx_clk. in tbi mode, tsec n _rxd[3:0] represents rcg[3:0]. together, with rcg[9:4], they represent the 10-bit encoded symbol of gmii receive signals. table 14-1. tsec signals?detailed signal descriptions (continued) signal i/o description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-12 freescale semiconductor three-speed ethernet controllers tsec n _rx_er i receive error state meaning asserted/negated?in gmii or mii mode, if tsec n _rx_er and tsec n _rx_dv are asserted, the phy has detected an error in the current frame. in tbi mode, tsec n _rx_er represents rcg[9]. together, with rcg[8:0], they represent the 10-bit encoded symbol of gmii receive signals. this signal is not used in the tsec rtbi or rgmii modes. tsec n _tx_clk i transmit clock in. in mii mode, tsec n _tx_clk is a continuous clock (2.5 or 25 mhz) that provides a timing reference for the tsec n _tx_en, tsec n _txd, and tsec n _tx_er signals. in gmii mode, tsec n _tx_clk provides the 2.5 or 25-mhz timing reference during 10base-t and 100base-t and comes from the phy. in 1000base-t this clock is not used and tsec n _gtx_clk (125 mhz) becomes the timing reference. the tsec n _gtx_clk is generated in the tsec and provided to the phy and the mac. the tsec n _tx_clk is generated in the phy and provided to the mac. in tbi mode, this signal is pma receive clock 1 62.5 mhz, split phase with pma_rx_clk0, and is supplied by the serdes. this signal is not used in the tsec rtbi or rgmii modes. tsec n _txd[7:0] o transmit data out. in gmii mode, tsec n _txd[7:4], together with tsec n _txd[3:0], represent one complete octet of data to be sent from the mac to the phy when tsec_tx_dv is asserted and has no meaning while tsec n _tx_en is negated. in tbi mode, tsec n _txd[7:4] represents transmit code group (tcg) bits 7:4. together, with tcg[9:8] and tcg[3:0], they represent the 10-bit encoded symbol. in gmii or mii mode, tsec n _txd[3:0] represent a nibble of data to be sent from the mac to the phy when tsec n _tx_en is asserted and have no meaning while tsec n _tx_en is negated. in rgmii or rtbi mode, tsec n _txd[3:0] are transmitted on the rising edge of tsec n _tx_clk, and tsec n _txd[7:4] are transmitted on the falling edge of tsec n _tx_clk. in tbi mode, tsec n _txd[3:0] represents tcg[3:0]. together, with tcg[9:4], they represent the 10-bit encoded symbol. note that some of these signals are also used during reset to configure the tsec interface in gmii or tbi mode. additionally, some of these signals are used for other reset configuration settings for the MPC8540. see section 4.4.3, ?power-on reset configuration,? for more information. tsec n _tx_en o transmit data valid. in gmii or mii mode, if tsec n _tx_en is asserted, the mac is indicating that valid data is present on the gmii?s or the mii?s tsec n _txd signals. in rgmii mode, tsec n _tx_en becomes tx_ctl. tx_en and tx_err are asserted on this signal on rising and falling edges of the tsec n _tx_clk, respectively. in tbi mode, tsec n _tx_en represents tcg[8]. together, with tcg[9] and tcg[7:0], they represent the 10-bit encoded symbol. in rtbi mode, tsec n _tx_en represents tcg[4]. together with tcg[9], tcg[3:0] and tcg[8:5], they represent the 10-bit encoded symbol. tsec n _tx_er o transmit error. in gmii or mii mode, assertion of tsec n _tx_er for one or more clock cycles while tsec n _tx_en is asserted causes the phy to transmit one or more illegal symbols. asserting tsec n _tx_er has no effect while operating at 10 mbps or while tsec n _tx_en is negated. this signal transitions synchronously with respect to tsec n _tx_clk. in tbi mode, tsec n _tx_er represents tcg[9]. together, with tcg[8:0], they represents the 10-bit encoded symbol. this signal is not used in the tsec rtbi or rgmii modes. table 14-1. tsec signals?detailed signal descriptions (continued) signal i/o description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-13 14.5 memory map/register definition the tsec uses a software model similar to that employed by the fast ethernet function supported on the freescale mpc8260 cpm fcc and in the fec of the mpc860t. the tsec device is programmed by a combination of control/status registers (csr) and buffer descriptors. the csrs are used for mode control, interrupts, and to access status information. the descriptors are used to pass data buffers and related buffer status or frame information between the hardware and software. all accesses to and from the registers must be made with 32-bit accesses. there is no support for accesses of sizes other than 32 bits. this section of the document defines the memory map and describes the registers in detail. the buffer descriptor is described in section 14.6.3, ?buffer descriptors.? the ten-bit interface (tbi) module mii registers are also described in this section. the tbi registers are defined like phy registers and, as such, are accessed via the mii management interface in the same way as the phys are accessed. for detailed descriptions of the tbi registers (the mii register set for the ten-bit interface) please refer to section 14.5.4, ?ten-bit interface (tbi).? 14.5.1 top-level module memory map the tsec implementation requires 4 kbytes of memory-mapped space, of which more than 1 kbyte is reserved for future expansion. the space is divided into the following sections:  general control/status registers  transmit-specific control/status registers  receive-specific control/status registers  mac registers  event/statistic counters held in the mib block  hash function registers table 14-2 defines the top-level memory map. table 14-2. module memory map summary address function 000?0ff tsec general control/status registers 100?2ff tsec transmit control/status registers 300?4ff tsec receive control/status registers 500?5ff tsec mac registers
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-14 freescale semiconductor three-speed ethernet controllers 14.5.2 detailed memory map?control/status registers table 14-3 lists the address, name, and a cross-reference to the complete description of each register. the offsets to the memory map table are defined for both tsecs. that is, tsec1 starts at 0x2_4000 address offset and tsec2 starts at 0x2_5000 address offset. the registers for tsec1 are listed in table 14-3 , but the registers for tsec2 are not. note in table 14-3 that the registers are the same for tsec2 except that the offset changes from 0x2_4 nnn to 0x2_5 nnn . 600?7ff tsec rmon mib registers 800?8ff tsec hash function registers 900?aff reserved b00?bff tsec attribute registers c00?fff future expansion space table 14-3. module memory map offset name access 1 reset section/page tsec1 general control and status registers 0x2_4000? 0x2_400c reserved r 0x0000_0000 ? 0x2_4010 ievent?interrupt event register r/w 0x0000_0000 14.5.3.1.1/14-20 0x2_4014 imask?interrupt mask register r/w 0x0000_0000 14.5.3.1.2/14-23 0x2_4018 edis?error disabled register r/w 0x0000_0000 14.5.3.1.3/14-24 0x2_401c reserved r 0x0000_0000 ? 0x2_4020 ecntrl?ethernet control register r/w 0x0000_0000 14.5.3.1.4/14-25 0x2_4024 minflr?minimum frame length register r/w 0x0000_0040 14.5.3.1.5/14-26 0x2_4028 ptv?pause time value register r/w 0x0000_0000 14.5.3.1.6/14-27 0x2_402c dmactrl?dma control register r/w 0x0000_0000 14.5.3.1.7/14-28 0x2_4030 tbipa?tbi phy address register r/w 0x0000_0000 14.5.3.1.8/14-29 0x2_4034? 0x2_4048 reserved r 0x0000_0000 ? tsec1 fifo control and status registers 0x2_404c fifo_pause_ctrl?fifo pause control register r/w 0x0000_0000 14.5.3.2.1/14-30 0x2_4050? 0x2_4088 reserved r 0x0000_0000 ? 0x2_408c fifo_tx_thr?fifo transmit threshold register r/w 0x0000_0100 14.5.3.2.2/14-31 table 14-2. module memory map summary (continued)
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-15 0x2_4090? 0x2_4094 reserved r 0x0000_0000 ? 0x2_4098 fifo_tx_starve?fifo transmit starve register r/w 0x0000_0080 14.5.3.2.3/14-32 0x2_409c fifo_tx_starve_shutoff?fifo transmit starve shutoff register r/w 0x0000_0100 14.5.3.2.4/14-32 0x2_40a0? 0x2_40fc reserved r 0x0000_0000 ? tsec1 transmit control and status registers 0x2_4100 tctrl?transmit control register r/w 0x0000_0000 14.5.3.3.1/14-33 0x2_4104 tstat?transmit status register r/w 0x0000_0000 14.5.3.3.2/14-34 0x2_4108 reserved r 0x0000_0000 ? 0x2_410c tbdlen?txbd data length register r 0x0000_0000 14.5.3.3.3/14-35 0x2_4110 txic?transmit interrupt coalescing configuration register r/w 0x0000_0000 14.5.3.3.4/14-35 0x2_4114? 0x2_4120 reserved r 0x0000_0000 ? 0x2_4124 ctbptr?current txbd pointer register r 0x0000_0000 14.5.3.3.5/14-36 0x2_4128? 0x2_4180 reserved r 0x0000_0000 ? 0x2_4184 tbptr?txbd pointer register r/w 0x0000_0000 14.5.3.3.6/14-37 0x2_4188? 0x2_4200 reserved r 0x0000_0000 ? 0x2_4204 tbase?txbd base address register r/w 0x0000_0000 14.5.3.3.7/14-37 0x2_4208? 0x2_42ac reserved r 0x0000_0000 ? 0x2_42b0 ostbd?out-of-sequence txbd register r/w 0x0800_0000 14.5.3.3.8/14-38 0x2_42b4 ostbdp?out-of-sequence tx data buffer pointer register r/w 0x0000_0000 14.5.3.3.9/14-40 0x2_42b8? 0x2_42fc reserved r 0x0000_0000 ? tsec1 receive control and status registers 0x2_4300 rctrl?receive control register r/w 0x0000_0000 14.5.3.4.1/14-41 0x2_4304 rstat?receive status register r/w 0x0000_0000 14.5.3.4.2/14-41 0x2_4308 reserved r 0x0000_0000 ? 0x2_430c rbdlen?rxbd data length register r 0x0000_0000 14.5.3.4.3/14-42 table 14-3. module memory map (continued) offset name access 1 reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-16 freescale semiconductor three-speed ethernet controllers 0x2_4310 rxic?receive interrupt coalescing configuration register r/w 0x0000_0000 14.5.3.4.4/14-43 0x2_4314? 0x2_4320 reserved r 0x0000_0000 ? 0x2_4324 crbptr?current rxbd pointer register r 0x0000_0000 14.5.3.4.5/14-44 0x2_4328? 0x2_433c reserved r 0x0000_0000 ? 0x2_4340 mrblr?maximum receive buffer length register r/w 0x0000_0000 14.5.3.4.6/14-44 0x2_4344? 0x2_4380 reserved r 0x0000_0000 ? 0x2_4384 rbptr?rxbd pointer register r/w 0x0000_0000 14.5.3.4.7/14-45 0x2_4388? 0x2_4400 reserved r 0x0000_0000 ? 0x2_4404 rbase?rxbd base address register r/w 0x0000_0000 14.5.3.4.8/14-45 0x2_4408? 0x2_44fc reserved r 0x0000_0000 ? tsec1 mac registers 0x2_4500 maccfg1?mac configuration register 1 r/w 0x0000_0000 14.5.3.6.1/14-49 0x2_4504 maccfg2?mac configuration register 2 r/w 0x0000_7000 14.5.3.6.2/14-51 0x2_4508 ipgifg?inter-packet gap/inter-frame gap register r/w 0x4060_5060 14.5.3.6.3/14-52 0x2_450c hafdup?half-duplex register r/w 0x00a1_f037 14.5.3.6.4/14-53 0x2_4510 maxfrm?maximum frame length register r/w 0x0000_0600 14.5.3.6.5/14-54 0x2_4514? 0x2_451c reserved r 0x0000_0000 ? 0x2_4520 miimcfg?mii management configuration register r/w 0x0000_0000 14.5.3.6.6/14-54 0x2_4524 miimcom?mii management command register r/w 0x0000_0000 14.5.3.6.7/14-55 0x2_4528 miimadd?mii management address register r/w 0x0000_0000 14.5.3.6.8/14-56 0x2_452c miimcon?mii management control register w 0x0000_0000 14.5.3.6.9/14-57 0x2_4530 miimstat?mii management status register r 0x0000_0000 14.5.3.6.10/14-57 0x2_4534 miimind?mii management indicator register r 0x0000_0000 14.5.3.6.11/14-58 0x2_4538 reserved r 0x0000_0000 ? 0x2_453c ifstat?interface status register r/w 0x0000_0000 14.5.3.6.12/14-58 0x2_4540 macstnaddr1?station address register, part 1 r/w 0x0000_0000 14.5.3.6.13/14-59 table 14-3. module memory map (continued) offset name access 1 reset section/page
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-17 0x2_4544 macstnaddr2?station address register, part 2 r/w 0x0000_0000 14.5.3.6.14/14-60 0x2_4548? 0x2_467c reserved r 0x0000_0000 ? tsec1 rmon mib registers tsec1 transmit and receive counters 0x2_4680 tr64?transmit and receive 64-byte frame counter register r/w 0x0000_0000 14.5.3.7.1/14-61 0x2_4684 tr127?transmit and receive 65- to 127-byte frame counter register r/w 0x0000_0000 14.5.3.7.2/14-61 0x2_4688 tr255?transmit and receive 128- to 255-byte frame counter register r/w 0x0000_0000 14.5.3.7.3/14-62 0x2_468c tr511?transmit and receive 256- to 511-byte frame counter register r/w 0x0000_0000 14.5.3.7.4/14-62 0x2_4690 tr1k?transmit and receive 512- to 1023-byte frame counter register r/w 0x0000_0000 14.5.3.7.5/14-63 0x2_4694 trmax?transmit and receive 1024- to 1518-byte frame counter register r/w 0x0000_0000 14.5.3.7.6/14-63 0x2_4698 trmgv?transmit and receive 1519- to 1522-byte good vlan frame count register r/w 0x0000_0000 14.5.3.7.7/14-64 tsec1 receive counters 0x2_469c rbyt?receive byte counter register r/w 0x0000_0000 14.5.3.7.8/14-64 0x2_46a0 rpkt?receive packet counter register r/w 0x0000_0000 14.5.3.7.9/14-65 0x2_46a4 rfcs?receive fcs error counter register r/w 0x0000_0000 14.5.3.7.10/14-65 0x2_46a8 rmca?receive multicast packet counter register r/w 0x0000_0000 14.5.3.7.11/14-66 0x2_46ac rbca?receive broadcast packet counter register r/w 0x0000_0000 14.5.3.7.12/14-66 0x2_46b0 rxcf?receive control frame packet counter register r/w 0x0000_0000 14.5.3.7.13/14-67 0x2_46b4 rxpf?receive pause frame packet counter register r/w 0x0000_0000 14.5.3.7.14/14-67 0x2_46b8 rxuo?receive unknown op code counter register r/w 0x0000_0000 14.5.3.7.15/14-68 0x2_46bc raln?receive alignment error counter register r/w 0x0000_0000 14.5.3.7.16/14-68 0x2_46c0 rflr?receive frame length error counter register r/w 0x0000_0000 14.5.3.7.17/14-69 0x2_46c4 rcde?receive code error counter register r/w 0x0000_0000 14.5.3.7.18/14-69 0x2_46c8 rcse?receive carrier sense error counter register r/w 0x0000_0000 14.5.3.7.19/14-70 0x2_46cc rund?receive undersize packet counter register r/w 0x0000_0000 14.5.3.7.20/14-70 0x2_46d0 rovr?receive oversize packet counter register r/w 0x0000_0000 14.5.3.7.21/14-71 0x2_46d4 rfrg?receive fragments counter register r/w 0x0000_0000 14.5.3.7.22/14-71 table 14-3. module memory map (continued) offset name access 1 reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-18 freescale semiconductor three-speed ethernet controllers 0x2_46d8 rjbr?receive jabber counter register r/w 0x0000_0000 14.5.3.7.23/14-72 0x2_46dc rdrp?receive drop register r/w 0x0000_0000 14.5.3.7.24/14-72 tsec1 transmit counters 0x2_46e0 tbyt?transmit byte counter register r/w 0x0000_0000 14.5.3.7.25/14-73 0x2_46e4 tpkt?transmit packet counter register r/w 0x0000_0000 14.5.3.7.26/14-73 0x2_46e8 tmca?transmit multicast packet counter register r/w 0x0000_0000 14.5.3.7.27/14-74 0x2_46ec tbca?transmit broadcast packet counter register r/w 0x0000_0000 14.5.3.7.28/14-74 0x2_46f0 txpf?transmit pause control frame counter register r/w 0x0000_0000 14.5.3.7.29/14-75 0x2_46f4 tdfr?transmit deferral packet counter register r/w 0x0000_0000 14.5.3.7.30/14-75 0x2_46f8 tedf?transmit excessive deferral packet counter register r/w 0x0000_0000 14.5.3.7.31/14-76 0x2_46fc tscl?transmit single collision packet counter register r/w 0x0000_0000 14.5.3.7.32/14-76 0x2_4700 tmcl?transmit multiple collision packet counter register r/w 0x0000_0000 14.5.3.7.33/14-77 0x2_4704 tlcl?transmit late collision packet counter register r/w 0x0000_0000 14.5.3.7.34/14-77 0x2_4708 txcl?transmit excessive collision packet counter register r/w 0x0000_0000 14.5.3.7.35/14-78 0x2_470c tncl?transmit total collision counter register r/w 0x0000_0000 14.5.3.7.36/14-78 0x2_4710 reserved r 0x0000_0000 ? 0x2_4714 tdrp?transmit drop frame counter register r/w 0x0000_0000 14.5.3.7.37/14-79 0x2_4718 tjbr?transmit jabber frame counter register r/w 0x0000_0000 14.5.3.7.38/14-79 0x2_471c tfcs?transmit fcs error counter register r/w 0x0000_0000 14.5.3.7.39/14-80 0x2_4720 txcf?transmit control frame counter register r/w 0x0000_0000 14.5.3.7.40/14-80 0x2_4724 tovr?transmit oversize frame counter register r/w 0x0000_0000 14.5.3.7.41/14-81 0x2_4728 tund?transmit undersize frame counter register r/w 0x0000_0000 14.5.3.7.42/14-81 0x2_472c tfrg?transmit fragments frame counter register r/w 0x0000_0000 14.5.3.7.43/14-82 tsec1 general registers 0x2_4730 car1?carry register one r/w 0x0000_0000 14.5.3.7.44/14-82 0x2_4734 car2?carry register two r/w 0x0000_0000 14.5.3.7.45/14-84 0x2_4738 cam1?carry register one mask register r/w 0xfe01_ffff 14.5.3.7.46/14-85 0x2_473c cam2?carry register two mask register r/w 0x000f_ffff 14.5.3.7.47/14-86 0x2_4740? 0x2_47fc reserved r 0x0000_0000 ? table 14-3. module memory map (continued) offset name access 1 reset section/page
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-19 tsec1 hash function registers 0x2_4800 iaddr0?individual address register 0 r/w 0x0000_0000 14.5.3.8.1/14-88 0x2_4804 iaddr1?individual address register 1 r/w 0x0000_0000 0x2_4808 iaddr2?individual address register 2 r/w 0x0000_0000 0x2_480c iaddr3?individual address register 3 r/w 0x0000_0000 0x2_4810 iaddr4?individual address register 4 r/w 0x0000_0000 0x2_4814 iaddr5?individual address register 5 r/w 0x0000_0000 0x2_4818 iaddr6?individual address register 6 r/w 0x0000_0000 0x2_481c iaddr7?individual address register 7 r/w 0x0000_0000 0x2_4820? 0x2_487c reserved r 0x0000_0000 ? 0x2_4880 gaddr0?group address register 0 r/w 0x0000_0000 14.5.3.8.2/14-88 0x2_4884 gaddr1?group address register 1 r/w 0x0000_0000 0x2_4888 gaddr2?group address register 2 r/w 0x0000_0000 0x2_488c gaddr3?group address register 3 r/w 0x0000_0000 0x2_4890 gaddr4?group address register 4 r/w 0x0000_0000 0x2_4894 gaddr5?group address register 5 r/w 0x0000_0000 0x2_4898 gaddr6?group address register 6 r/w 0x0000_0000 0x2_489c gaddr7?group address register 7 r/w 0x0000_0000 0x2_48a0? 0x2_4afc reserved r 0x0000_0000 ? tsec1 attribute registers 0x2_4b00? 0x2_4bf4 reserved r 0x0000_0000 ? 0x2_4bf8 attr?attribute register r 0x0000_0000 14.5.3.9.1/14-89 0x2_4bfc attreli?attribute el & ei register r 0x0000_0000 14.5.3.9.2/14-90 tsec1 future expansion space 0x2_4c00? 0x2_4ffc reserved r 0x0000_0000 ? table 14-3. module memory map (continued) offset name access 1 reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-20 freescale semiconductor three-speed ethernet controllers 14.5.3 memory-mapped register descriptions this section provides a detailed description of all the tsec registers. because all of the tsec registers are 32 bits wide, only 32-bit register accesses are supported. 14.5.3.1 tsec general control and status registers this section describes general control and status registers used for both transmitting and receiving ethernet frames. all of the registers are 32 bits wide. 14.5.3.1.1 interrupt event register (ievent) if an event occurs that sets a bit in the interrupt event (ievent) register, shown in figure 14-6 , an interrupt is generated if the corresponding bit in the interrupt enable register (imask) is also set. clearing the ievent bit clears the interrupt signal. the bit in the ievent register is cleared if a 1 is written to that bit position. a write of 0 has no effect. these interrupts can be divided into operational interrupts, transceiver/network error interrupts, and internal error interrupts. interrupts that may occur in normal operation are:  gtsc, grsc, txf, txb, txc, rxf, rxb, rxc, and msro interrupts resulting from errors/problems detected in the network or transceiver are:  babr, babt, lc, and crl/xda interrupts resulting from internal errors are:  eberr, xfun, and bsy some of the error interrupts are independently counted in the management information base (mib) block counters. software may choose to mask off these interrupts because these errors are visible to network management through the mib counters. tsec2 registers 0x2_5000? 0x2_5ffc tsec2 registers 2 1 r = means read-only, w = write only, r/w = read and write, lh = latches high, sc = self-clearing. 2 tsec2 has the same memory-mapped registers that are described for tsec1 from 0x 2_4000 to 0x2_4fff except the offsets are from 0x 2_5000 to 0x2_5fff. table 14-3. module memory map (continued) offset name access 1 reset section/page
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-21 table 14-4 describes the fields of the ievent register. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 r babr rxc bsy eberr 0 msro gtsc babt txc txe txb txf 0 lc crl/ xda xfun w reset 0000_0000_0000_0000 16 17 22 23 24 25 31 r rxb 00 000 0 grsc rxf 0000000 w reset 0000_0000_0000_0000 offset tsec1:0x2_4010; tsec2:0x2_5010 figure 14-6. ievent register definition table 14-4. ievent field descriptions bits name description 0 babr babbling receive error. this bit indicates that a frame was received with length in excess of the mac?s maximum frame length register while maccfg2[huge frame] is set. 0 excessive frame not received 1 excessive frame received 1 rxc receive control interrupt. a control frame was received. if maccfg1[rx_flow] is set, a pause operation is performed lasting for the duration specified in the received pause control frame and beginning when the frame was received. 0 control frame not received 1 control frame received 2 bsy busy condition interrupt. indicates that a frame was received and discarded due to a lack of buffers. when ievent[bsy] is set rstat[qhlt] is also set. in order to begin receiving packets again, the user must clear rstat[qhlt]. this bit and rstat[qhlt] are set whenever the tsec reads an rxbd with its empty field cleared. 0 no frame received and discarded 1 frame received and discarded 3 eberr ethernet bus error. this bit indicates that a system bus error for a memory read occurred while a dma transaction was underway. if the eberr is set while transmission is in progress, the dma stops sending data to the tx fifo which eventually causes an underrun error (xfun) and tstat[thlt] is set. if the eberr is set while receiving a frame, the dma discards the frame and rstat[qhlt] is set. 0 no system bus error occurred 1 system bus error occurred 4?reserved 5 msro mstat register overflow. this interrupt is asserted if the count for one of the mstat registers has exceeded the size of the register. 0 mstat count not exceeding register size 1 mstat count exceeds register size
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-22 freescale semiconductor three-speed ethernet controllers 6 gtsc graceful transmit stop complete. this interrupt is asserted following the completion of a graceful stop, which was intitiated by setting either dmactrl[gts] or tctrl[tfc_pause]. graceful stop means that the transmitter is put into a pause state after completion of the frame currently being transmitted. 0 graceful transmit stop not complete or not initiated 1 graceful transmit stop completed 7 babt babbling transmit error. this bit indicates that the transmitted frame length has exceeded the value in the mac?s maximum frame length register and maccfg2[huge frame] is cleared. frame truncation occurs when this condition occurs. txbd[txtrunc] is set in the last txbd (txbd[l] is set) of the frame. 0 transmitted frame length not exceeding maximum frame length 1 transmitted frame length exceeding maximum frame length 8 txc transmit control interrupt. this bit indicates that a control frame was transmitted. 0 control frame not transmitted 1 control frame transmitted 9 txe transmit error. this bit indicates that an error occurred on the transmitted channel that has caused tstat[thlt] to be set by tsec. this bit is set whenever any transmit error occurs that causes the transmitter to halt (eberr, lc, crl/xda, xfun). it is not set if dmactrl[wop] is set and tsec runs out of txbds to process. in order to begin transmitting packets again, the user must clear tstat[thlt]. 0 no transmit channel error occurred 1 transmit channel error occurred 10 txb transmit buffer. this bit indicates that a transmit buffer descriptor was updated whose i (interrupt) bit was set in its status word and was not the last buffer descriptor of the frame. 0 no transmit buffer descriptor updated 1 transmit buffer descriptor updated 11 txf transmit frame interrupt. this bit indicates that a frame was transmitted and that the last corresponding transmit buffer descriptor (txbd) was updated. this only occurs if the i (interrupt) bit in the status word of the buffer descriptor is set. 0 no frame transmitted/txbd not updated 1 frame transmitted/txbd updated 12 ? reserved 13 lc late collision. this bit indicates that a collision occurred beyond the collision window (slot time) in half-duplex mode. the frame is truncated with a bad crc and the remainder of the frame is discarded. 0 no late collision occurred 1 late collision occurred 14 crl/ xda collision retry limit/excessive defer abort. this bit indicates either one of two conditions occurred while attempting to transmit a frame: 1) the number of successive transmission collisions has exceeded the mac?s hafdup[retransmission maximum] count or 2) an excessive defer abort condition has occurred. an excessive defer abort condition occurs when the tsec waits more than 3036 bytes while attempting to send a frame and hafdup[excess_defer] is 0. the txbd[def] or ostbd[def] is also set. in either case the frame is discarded without being transmitted and the tsec is halted (tstat[thlt] is set). the crl or xda condition can only occur while in half-duplex mode. 0 successive transmission collisions do not exceed maximum and no excessive defer abort condition has occurred. 1 successive transmission collisions exceed maximum or an excessive defer abort condition has occurred. table 14-4. ievent field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-23 14.5.3.1.2 interrupt mask register (imask) the interrupt mask register provides control over which possible interrupt events are allowed to generate an actual interrupt. all implemented bits in this csr are r/w. this register is cleared upon a hardware reset. if the corresponding bits in both the ievent and imask registers are set, an interrupt is generated. the interrupt signal can be cleared by clearing the corresponding ievent bit. figure 14-7 shows the imask register. 15 xfun transmit fifo underrun. this bit indicates that the transmit fifo became empty before the complete frame was transmitted. 0 transmit fifo not underrun 1 transmit fifo underrun 16 rxb receive buffer. these bits indicate that a receive buffer descriptor was updated which had the i (interrupt) bit set in its status word and was not the last buffer descriptor of the frame. 0 receive buffer descriptor not updated 1 receiver buffer descriptor updated 17?22 ? reserved 23 grsc graceful receive stop complete. this interrupt is asserted if a graceful receive stop is completed. it allows the user to know if the system has completed the stop and it is safe to write to receive registers (status, control or configuration registers) t hat are used by the system during normal operation. 0 graceful stop not completed 1 graceful stop completed 24 rxf receive frame interrupt. the last receive buffer descriptor (rxbd) of a frame was updated. this occurs only if the i (interrupt) bit in the buffer descriptor status word is set. 0 frame not received 1 frame received 25?31 ? reserved 012 345 6 7 89101112131415 r bren rxcen bsyen eberren 0 msroen gtscen bten txcen txeen txben txfen 0 lcen crl/ xdaen xfunen w reset 0000_0000_0000_0000 16 17 22 23 24 25 31 r rxben 00 000 0 grscen rxfen 000000 0 w reset 0000_0000_0000_0000 offset tsec1:0x2_4014; tsec2:0x2_5014 figure 14-7. imask register definition table 14-4. ievent field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-24 freescale semiconductor three-speed ethernet controllers table 14-5 describes the fields of the imask register. 14.5.3.1.3 error disabled register (edis) the error disabled register, shown in figure 14-8 , controls error reporting by the tsec. the ievent bit corresponding to an error will not be set if the error is disabled in edis. table 14-5. imask field descriptions bits name description 0 bren babbling receiver interrupt enable 1 rxcen receive control interrupt enable 2 bsyen busy interrupt enable 3 eberren ethernet controller bus error enable 4?reserved 5 msroen mstat register overflow interrupt enable 6 gtscen graceful transmit stop complete interrupt enable 7 bten babbling transmitter interrupt enable 8 txcen transmit control interrupt enable 9 txeen transmit error interrupt enable 10 txben transmit buffer interrupt enable 11 txfen transmit frame interrupt enable 12 ? reserved 13 lcen late collision enable 14 crl/xdaen collision retry limit/excessive defer enable 15 xfunen transmit fifo underrun enable 16 rxben receive buffer interrupt enable 17?22 ? reserved 23 grscen graceful receive stop complete interrupt enable 24 rxfen receive frame interrupt enable 25?31 ? reserved 01 2 3 4 12 13 14 31 r00 bsydis eberrdis 000000 0 0 0 lcdis 0 0 0 00000000000000 0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4018; tsec2:0x2_5018 figure 14-8. error disabled register (edis)
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-25 table 14-6 describes the fields of the edis register. 14.5.3.1.4 ethernet control register (ecntrl) ecntrl, shown in figure 14-9 , is used to reset, configure, and initialize the tsec. table 14-7 describes the fields of the ecntrl register. table 14-6. edis field descriptions bits name description 0?1 ? reserved 2 bsydis busy disable 0 allow tsec to report ievent[bsy] status and halt buffer descriptor queue if bsy condition occurs. 1 do not set ievent[bsy] and do not halt buffer descriptor queue if bsy condition occurs. 3 eberrdis ethernet controller bus error disable 0 allow tsec to report ievent[eberr] status and halt buffer descriptor queue if eberr condition occurs. 1 do not set ievent[eberr] and do not halt buffer descriptor queue if eberr condition occurs. 4?12 ? reserved 13 lcdis late collision disable 0 allow tsec to report ievent[lc] status, set the buffer descriptor lc field, and halt buffer descriptor queue if lc condition occurs. 1 do not set ievent[lc] nor the buffer descriptor lc field, and do not halt buffer descriptor queue if lc condition occurs. 14?31 ? reserved 01617181920252627282931 r0000000000000000 0 clrcnt autoz sten 000000tbimrpm r100m 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4020; tsec2:0x2_5020 figure 14-9. ecntrl register definition table 14-7. ecntrl field descriptions bits name description 0?16 ? reserved 17 clrcnt clear all statistics counters 0 allow mstat counters to continue to increment. 1 reset all mstat counters. this bit is self-resetting.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-26 freescale semiconductor three-speed ethernet controllers 14.5.3.1.5 minimum frame length register (minflr) minflr is written by the user. it tells tsec the smallest packet to accept and place in a receive buffer pointed to by the rxbd. figure 14-10 shows the minflr register. 18 autoz automatically zero addressed statistical counter values, input to mstat module. 0 the user must write the addressed counter zero after a host read. 1 the addressed counter value is zeroed on a host read. this is a steady state signal and must be set prior to enabling the ethernet controller and must not be changed without proper care. 19 sten statistics enabled, input to mstat module. 0 statistics not enabled 1 enables internal counters to update this is a steady state signal and must be set prior to enabling the ethernet controller and must not be changed without proper care. 20?25 ? reserved 26 tbim ten-bit interface mode. if this bit is set, ten-bit interface mode is enabled. this bit can be signal configured at reset to set or clear using the tsec n _gtx_clk signal. 0 gmii or mii mode interface 1 tbi mode interface 27 rpm reduced signal mode. if this bit is set, a reduced signal interface is expected. ecntrl[tbi mode] selects gmii or tbi. if rpm is selected, the mac must be in gmii or tbi mode (rmii is not supported). this register can be signal configured at reset to 0 or 1 with the ec_mdc signal. 0 gmii or tbi in non-reduced signal mode configuration 1 rgmii or rtbi reduced signal mode 28 r100m rgmii 100 mode. this bit is ignored unless rpm is set and maccfg2[i/f mode] is assigned to 10/100 (01). if this bit is set, the tsec interface is in 100 mbps speed. 0 rgmii is in 10 mbps mode 1 rgmii is in 100 mbps mode 29?31 ? reserved 0 24 25 31 r0000000000000000000000000 minflr w reset 0000_0000_0000_0000_0000_0000_0100_0000 offset tsec1:0x2_4024; tsec2:0x2_502 figure 14-10. minflr register definition table 14-7. ecntrl field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-27 table 14-8 describes the fields of the minflr register. 14.5.3.1.6 pause time value register (ptv) ptv, shown in figure 14-11 , is written by the user to store the pause duration used when the tsec initiates a pause frame via tctrl[tfc_pause]. the low-order 16 bits (pt) represent the pause time and the high-order 16 bits (pte) represent the extended pause control parameter. the pause time is measured in units of pause_quanta, equal to 512 bit times. the pause time can range from 0 to 65,535 pause_quanta, or 0 to 33,553,920 bit times. see section 14.6.2.7, ?flow control for additional details. table 14-9 describes the fields of the ptv register. table 14-8. minflr field descriptions bits name description 0?24 ? reserved 25?31 minflr minimum receive frame length (typically 64 decimal). if the ethernet receives an incoming frame shorter than minflr, it discards that frame unless rctrl[rsf] (receive short frames) is set, in which case rxbd[sh] (frame too short) is set in the last rxbd. the largest allowable value for minflr is 64. unlike the mpc8260, in which pads are added to make the transmit frame equal to minflr bytes, if padding is requested, tsec always pads transmit frames to 64 bytes ignoring minflr. minflr is only used to determine the minimum size of acceptable receive frames. 0151631 r pte pt w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4028; tsec2:0x2_5028 figure 14-11. ptv register definition table 14-9. ptv field descriptions bits name description 0?15 pte extended pause control. this field allows software to add a 16-bit additional control parameter into the pause frame to be sent when tctrl[tfc_pause] is set. note that current ieee 802.3 pause frame format requires this parameter to be set to 0. 16?31 pt pause time value. represents the 16-bit pause quanta (that is, 512 bit times). this pause value is used as part of the pause frame to be sent when tctrl[tfc_pause] is set. see section 14.6.2.7, ?flow control,? for more information.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-28 freescale semiconductor three-speed ethernet controllers 14.5.3.1.7 dma control register (dmactrl) dmactrl, shown in figure 14-12 , is used to configure the dma block. register. table 14-10 describes the fields of the dmactrl register. 0232425262728293031 r 0 000000000000000000000 0 0 tdsen tbdsen 0 grs gts 0 wwr wop w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_402c; tsec2:0x2_502c figure 14-12. dmactrl register definition table 14-10. dmactrl field descriptions bits name description 0?23 ? reserved 24 tdsen tx data snoop enable 0 disables snooping of all transmit frames from memory. 1 enables snooping of all transmit frames from memory. 25 tbdsen txbd snoop enable 0 disables snooping of all transmit bd memory accesses. 1 enables snooping of all transmit bd memory accesses. 26 ? reserved 27 grs graceful receive stop. if this bit is set, the ethernet controller stops receiving frames following completion of the frame currently being received, that is, after a valid end of frame was received. the buffer of the receive frame associated with the eof is closed and the ievent[grsc] is set. because the mac?s receive enable bit (maccfg[rx_en]) may still be set, the mac may continue to receive but the tsec ignores the receive data until grs is cleared. if this bit is cleared, the tsec scans the input data stream for the start of a new frame (preamble sequence and start of frame delimiter) and the first valid frame received uses the next rxbd. if grs is set, the user must monitor the graceful receive stop complete (grsc) bit in the ievent register to insure that the graceful receive stop was completed. the user can then clear ievent[grsc] and can write to receive registers that are accessible to both user and the tsec hardware without fear of conflict. 0 tsec scans input data stream for valid frame. 1 tsec stops receiving frames following completion of current frame. 28 gts graceful transmit stop. if this bit is set, the ethernet controller stops transmission after the completion of any frame that is currently being transmitted and the gtsc interrupt in the ievent register is asserted. if frame transmission is not currently underway, the gtsc interrupt is asserted immediately. once transmission has completed, a ?restart? can be accomplished by clearing gts. 0 controller continues. 1 controller stops transmission after completion of current frame. 29 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-29 14.5.3.1.8 tbi physical address register (tbipa) this tbipa, shown in figure 14-13 , is writable by the user to assign a physical address to the tbi for mii management configuration. the tbi registers are accessed at the offset of tbipa. for detailed descriptions of the tbi registers (the mii register set for the ten-bit interface) please refer to section 14.5.4, ?ten-bit interface (tbi).? 30 wwr write with response. this bit gives the user the assurance that a bd was updated in memory before it receives an interrupt concerning a transmit or receive frame. 0 do not wait for acknowledgement from system for bd writes before setting ievent bits. 1 before setting ievent bits txb, txf, txe, ie, xfun, lc, crl/xda, rxb, rxf, the tsec waits for acknowledgement from system that the transmit or receive bd being updated was stored in memory. 31 wop wait or poll. this bit, which is applicable only to the transmitter, provides the user the option for the tsec to periodically poll txbd or to wait for software to tell tsec to fetch a buffer descriptor. while operating in the ?wait? mode, the tsec allows two additional reads of a descriptor which is not ready before entering a halt state. no interrupt is driven. (ievent[txe] is clear.) to resume transmission, software must clear tstat[thlt]. note that if this bit is set, the user must ensure that all txbds involved with sending a frame have their ready bits set before any transmission begins. otherwise, tsec behaves in a boundedly undefined fashion. a buffer descriptor is considered not ready when its txbd[ready] field is clear or its txbd[data length] field is zero. it is considered ready when both txbd[ready] is set and txbd[data length] is non-zero. in wait mode (dmactrl[wop] is set) when tsec is processing a frame and an intermediate txbd?s ready bit is cleared, tsec does not halt, but instead continuously polls the same txbd until the txbd becomes ready or an ethernet interface error or a memory error is encountered. cxbd becomes ready, tsec reports the error in both the ievent register as well as the txbd for ethernet interface errors, or the ievent[eberr] for a memory error and sets the tstat[thlt] bit. note that software must eventually set all of its txbds for a frame, because tsec continuously reads an intermediate txbd until it becomes ready if insufficient data has been read to surpass the fifo transmit threshold (fifo_tx_thr) register value. 0 poll txbd every 512 clocks. 1 do not poll, but wait for a write to tstat[thlt]. 0 26 27 31 r000000000000000000000000000 tbipa w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4030; tsec2:0x2_5030 figure 14-13. tbipa register definition table 14-10. dmactrl field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-30 freescale semiconductor three-speed ethernet controllers table 14-11 describes the fields of the tbipa register. 14.5.3.2 tsec fifo control and status registers the following registers allow the user to change some of the default settings in the fifo that can be used to optimize operation for performance or for safety. they must be set carefully in order to avoid an underrun condition. underrun is an error condition in which data is not retrieved from external memory quickly enough, leaving the tx fifo empty before the complete frame is transmitted. because different combinations of events, several of which are determined by the user, can lead to underrun, the tsec provides several fifo registers that allow the user to select the proper setting to be able to tune the system and obtain the maximum performance with minimal chance of underrun. the principal causes for underrun in the tsec are:  misaligned data buffer addresses  small data buffer sizes  combinations of the above it is recommended that the minimum size data buffers be 64 bytes and that data buffers be 64-byte aligned. the user can deviate from these recommended values to try to increase performance or to use less memory, but unless the default values of some of the fifo registers are adjusted, the probability of an underrun may also increase. the fifo_tx_thr (default is 256 entries or 1 kbytes) indicates the amount of data required to be in the fifo before starting the transmission of a frame. the fifo_tx_starve (default is 128 entries or 512 bytes) is used to indicate that the amount of data in the fifo is so low that the risk of underrun is extremely high. the fifo_tx_starve_shutoff (default is 256 entries or 1 kbyte) contains the watermark level to be used for exiting the starve state. these registers are intended to allow the user to make the proper trade-off. if triggered, the starve mode, for instance, automatically raises the priority of tsec fetches from memory. 14.5.3.2.1 fifo pause control register (fifo_pause_ctrl) fifo_pause_ctrl, shown in figure 14-14 , is writable by the user to configure the properties of the tsec fifo. table 14-11. tbipa field descriptions bits name description 0?26 ? reserved 27?31 tbipa tbi phy address. this field is used to program the phy address of the ten-bit interface?s mii management bus. to access the tbi register the user must write the tbipa value to the miimadd [phy address] register located in the mac register section. refer to section 14.5.3.6.8, ?mii management address register (miimadd).?
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-31 table 14-12 describes the fields of the fifo_pause_ctrl register. 14.5.3.2.2 fifo transmit threshold register (fifo_tx_thr) the main purpose of the threshold register is to trigger the unloading of fifo data to the phy. it represents the numerical sram entry (0-511 for 2-kbyte fifo) to trigger the threshold function. if the number of valid entries in the fifo is equal to or greater than the threshold register, transmission can begin. this register is read/write by software and is initialized to 0000_0000_0000_0000_0000_0001_0000_0000 at system reset. figure 14-15 shows the fifo_tx_thr register. 0 15 r00000000000000 0 0 w reset 0000_0000_0000_0000 16 29 30 31 r00000000000000 tfc_pause_en 0 w reset 0000_0000_0000_0000 offset tsec1:0x2_404c; tsec2:0x2_504c figure 14-14. fifo_pause_ctrl register definition table 14-12. fifo_pause_ctrl field descriptions bits name description 0?29 ? reserved 30 tfc_pause_en tfc_pause enable. this bit enables the ability to transmit a pause control frame by setting the tctrl[tfc_pause] bit. this bit is cleared at reset. 0 pause control frame transmission disabled. 1 pause control frame transmission enabled. 31 ? reserved 0 22 23 31 r00000000000000000000000 fifo_tx_thr w reset 0000_0000_0000_0000_0000_0001_0000_0000 offset tsec1:0x2_408c; tsec2:0x2_508c figure 14-15. fifo_tx_thr register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-32 freescale semiconductor three-speed ethernet controllers table 14-13 describes the fields of the fifo_tx_thr register. 14.5.3.2.3 fifo transmit starve register (fifo_tx_starve) the purpose of the starve register, shown in figure 14-16 , is to inform the system of extremely imminent underrun conditions. it represents the numerical sram entry (0-511 for 2-kbyte fifo) to trigger the starve function. if the number of valid entries in the fifo is less than or equal to the starve register, a starve alert is triggered. table 14-14 describes the fields of the fifo_tx_starve register. 14.5.3.2.4 fifo transmit starve shutoff register (fifo_tx_starve_shutoff) the starve shutoff register, shown in figure 14-17 , contains the watermark level to be used for exiting the starve state. if the starve state is in effect and the number of valid entries in the fifo becomes greater than or equal to the value in the fifo transmit starve shutoff register, the starve condition ends. this register is read/write by software. table 14-13. fifo_tx_thr field descriptions bits name description 0?22 ? reserved 23?31 fifo_tx_thr fifo transmit threshold. these bits mark the number of entries in the transmit fifo that, if reached, trigger the unloading of frame data into the mac. 0 22 23 31 r00000000000000000000000 fifo_tx_starve w reset 0000_0000_0000_0000_0000_0000_1000_0000 offset tsec1:0x2_4098; tsec2:0x2_5098 figure 14-16. fifo_tx_starve register definition table 14-14. fifo_tx_starve field descriptions bits name description 0?22 ? reserved 23?31 fifo_tx_starve fifo transmit starve. these bits indicate the value to trigger the transmit starve function. it triggers once the number of valid entries in the fifo is less than or equal to the fifo tx starve. the starve state turns off if the number of valid entries in the fifo becomes greater than or equal to the fifo tx starve shutoff register.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-33 table 14-15 describes the fields of the fifo transmit starve shutoff register. 14.5.3.3 tsec transmit control and status registers this section describes the control and status registers that are used specifically for transmitting ethernet frames. all of the registers are 32 bits wide. 14.5.3.3.1 transmit control register (tctrl) tctrl, shown in figure 14-18 , is writable by the user to configure the transmit block. table 14-16 describes the fields of the tctrl register. 0 22 23 31 r00000000000000000000000 fifo_tx_starve_shutoff w reset 0000_0000_0000_0000_0000_0001_0000_0000 offset tsec1:0x2_409c; tsec2:0x2_509c figure 14-17. fifo_tx_starve_shutoff register definition table 14-15. fifo_tx_starve_shutoff field descriptions bits name description 0?22 ? reserved 23?31 fifo_tx_starve_ shutoff fifo transmit starve shutoff. indicates the value bey ond which to exit the starve state. the starve state turns off if the number of valid entries in the fifo becomes greater than or equal to the fifo tx starve shutoff register. 01920212627282931 r000000000000000 0 000 0 thdf 0 0 0 0 0 0 rfc_pause tfc_pause 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4100; tsec2:0x2_5100 figure 14-18. tctrl register definition table 14-16. tctrl field descriptions bits name description 0?19 ? reserved 20 thdf transmit half-duplex flow control. written by user. this bit is not self-resetting. 0 disable back pressure. 1 back pressure is applied to media.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-34 freescale semiconductor three-speed ethernet controllers 14.5.3.3.2 transmit status register (tstat) tstat, shown in figure 14-19 , is written by tsec to convey dma status information. table 14-17 describes the fields of the tstat register. 21?26 ? reserved 27 rfc_pause receive flow control pause frame. written by tsec. this read-only status bit is set if a flow control pause frame was received and the transmitter is paused for the duration defined in the received pause frame. this bit automatically clears after the pause duration is complete. 0 pause duration complete. 1 pause duration in progress. 28 tfc_pause transmit flow control pause frame. use this bit to transmit a pause frame. to transmit a flow control pause frame, first set fifo_pause_ctrl[tfc_pause_en]. next, set maccfg1[gts]. if tfc_pause is then set, the mac stops transmission of data frames after the current transmission completes. the gtsc interrupt in the ievent register is asserted. with transmission of data frames stopped, the mac transmits a mac control pause frame with the duration value obtained from the ptv register. the txc interrupt occurs after sending the control pause frame. next, the mac clears tfc_pause and resumes transmitting data frames. note that if the transmitter is paused due to user assertion of gts or reception of a pause frame, the mac may still transmit a mac control pause frame. 0 no outstanding pause frame transmission request. 1 pause frame transmission requested. 29?31 ? reserved 01 31 r thlt 0000000000000000000000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4104; tsec2:0x2_5104 figure 14-19. tstat register definition table 14-17. tstat field descriptions bits name description 0 thlt transmit halt 0 no hardware-initiated transmission halt. 1 tsec transmission function halted. this bit is written by tsec to inform the user that it is no longer processing transmit frames and that the transmit dma function is disabled by hardware. to re-start the transmission function, the user must clear this bit by writing a one. 1?31 ? reserved table 14-16. tctrl field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-35 14.5.3.3.3 txbd data length register (tbdlen) tbdlen is a dma register that contains the number of bytes remaining in the current transmit buffer. figure 14-20 shows the tbdlen register. table 14-18 describes the fields of the tbdlen register. 14.5.3.3.4 transmit interrupt coalescing configuration register (txic) txic, shown in figure 14-21 , enables and configures the operational parameters for interrupt coalescing associated with transmitted frames. refer to section 14.6.2.8.1, ?interrupt coalescing,? for a functional description of interrupt coalescing. 0151631 r0000000000000000 tbdlen w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_410c; tsec2:0x2_510c figure 14-20. tbdlen register definition table 14-18. tbdlen field descriptions bits name description 0?15 ? reserved 16?31 tbdlen internally written by the dma module. the transmit channel remains active until tbdlen is 0. 0 1 2 3 10 11 15 16 31 r icen 00 icfct 00000 ictt w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4110; tsec2:0x2_5110 figure 14-21. txic register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-36 freescale semiconductor three-speed ethernet controllers table 14-18 describes the fields of the txic register. 14.5.3.3.5 current transmit buffer descriptor pointer register (ctbptr) ctbptr contains the address of the transmit buffer descriptor either currently being processed, or processed most recently. figure 14-22 shows the ctbptr register. table 14-19. txic field descriptions bits name description 0 icen interrupt coalescing enable 0 interrupt coalescing is disabled. interrupts are raised as they are received if the tsec transmit frame interrupt is enabled (imask[txfen] is set). 1 interrupt coalescing is enabled. if the tsec tran smit frame interrupt is enabled (imask[txfen] is set), an interrupt is raised when the threshold number of frames is reached (defined by txic[icfct]) or when the threshold timer expires (defined by txic[ictt]). 1?2 ? reserved 3?10 icfct interrupt coalescing frame count threshold. while interrupt coalescing is enabled (txic[icen] is set), this value determines how many frames are transmitted before raising an interrupt 1 . valid values for this field are from 1 to 255. a value of 0 is illegal. if set to 0, an interrupt can only be cleared by first clearing txic[icen] and then clearing the ievent[txf] bit. note that a value of 1 functionally defeats the advantages of interrupt coalescing since the frame threshold is reached with each frame transmitted. 1 interrupts resulting from the interrupt bit (i) of the buffer descriptor in question and enabled subject to the imask register (imask[txfen] is set). 11?15 ? reserved 16?31 ictt interrupt coalescing timer threshold. while interrupt coalescing is enabled (txic[icen] is set), this value determines the maximum amount of time after transmitting a frame before raising an interrupt 1 , subject also to imask[txfen]. if frames have been transmitted but the frame count threshold has not been met, an interrupt is raised when the threshold timer expires. the threshold timer is reset once an interrupt has been asserted. it begins counting once the interrupt is cleared and ievent[txf] is set. the threshold value is represented in units equal to 64 tsec interface clocks. valid values for this field are from 1 to 65535. a value of 0 is illegal. if set to 0, an interrupt can only be cleared by first clearing txic[icen] and then clearing the ievent[txf] bit. 0 28 29 31 r ctbptr 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4124; tsec2:0x2_5124 figure 14-22. ctbptr register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-37 table 14-20 describes the fields of the ctbptr register. 14.5.3.3.6 transmit buffer descriptor pointer register (tbptr) tbptr, shown in figure 14-23 , contains the low-order 32 bits of the next transmit buffer descriptor address. tbptr takes on the tbase value when tbase is written by software. although not necessary in most applications, the user can modify this register when the transmitter has been gracefully stopped or halted, as indicated by ievent[gtsc] or tstat[thlt]. table 14-21 describes the fields of the tbptr register. 14.5.3.3.7 transmit descriptor base address register (tbase) the tbase register, shown in figure 14-24 , is written by the user with the txbd base address. the value must be divisible by eight for the 8-byte data buffer descriptors. table 14-20. ctbptr field descriptions bits name description 0?28 ctbptr the ctbptr register is internally written by the dma module. the value of this field increments by one (causing the register value to increment by eight) each time a descriptor is read from memory. 29?31 ? reserved 0 28 29 31 r tbptr 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_4184; tsec2:0x2_5184 figure 14-23. tbptr register definition table 14-21. tbptr field descriptions bits name description 0?28 tbptr the tbptr register is internally written by the dma module. the value of this field increments by one (causing the register value to increment by eight) each time a descriptor is read from memory. 29?31 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-38 freescale semiconductor three-speed ethernet controllers table 14-22 describes the fields of the tbase register. 14.5.3.3.8 out-of-sequence txbd register (ostbd) the out-of-sequence txbd register, ostbd, shown in figure 14-25 , includes the status/control and data length in the same format as a regular txbd. it is useful for sending flow control frames. ostbd[r] is always checked between frames. if it is not ready, a regular frame is sent. if a flow control frame is sent and ostbd[i] is set, a txc event is generated after frame transmission. this area must be cleared while not in use. once the tsec is in paused mode the out-of-sequence buffer descriptor cannot be used to send another flow control frame because the mac regards it as a regular txbd. 0 28 29 31 r tbase 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_4204; tsec2:0x2_5204 figure 14-24. tbase register definition table 14-22. tbase field descriptions bits name description 0?28 tbase transmit base. tbase defines the starting location in the memory map for the tsec txbds. this field must be 8-byte aligned. together with setting the w (wrap) bit in the last bd, the user can select how many bds to allocate for the transmit packets. the user must initialize tbase before enabling the tsec transmit function. 29?31 ? reserved 0 1 2 3 4 5 6 7 8 9 10 13 14 15 16 31 r r pad/crc w i l tc def to1 hfe/lc rl rc un 0 ostbdlen w reset 0000_1000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_42b0; tsec2:0x2_52b0 figure 14-25. ostbd register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-39 table 14-23 describes the fields of the ostbd register. table 14-23. ostbd field descriptions bits name description 0 r ready. written by tsec and user. 0 the data buffer associated with this bd is not ready for transmission. the user is free to manipulate this bd or its associated data buffer. the tsec clears this bit after the buffer is transmitted or after an error condition is encountered. 1 the data buffer, which was prepared for transmission by the user, was not transmitted or is currently being transmitted. no fields of this bd may be written by the user once this bit is set. 1 pad/crc padding and crc attachment for short frames. (valid only when maccfg2[pad/crc] is cleared, and maccfg2[crc en] bit is cleared.) if maccfg2[pad/crc] is set, pads are added to all short frames; however, this bit is ignored. 0 do not add pads to short frames unless ostbd[tc] is set. 1 add pads to short frames. pad bytes are inserted until the length of the transmitted frame equals 64 bytes. unlike the mpc8260 which pads up to minflr value, tsec always pads up to the ieee minimum frame length of 64 bytes. 2 w wrap. written by user. this bit is ignored by tsec. 3 i interrupt. written by user. 0 no interrupt is generated after this buffer is serviced. 1 ievent[txf] is set after this buffer is serviced. this bit can cause an interrupt if imask[txfen] is enabled. 4 l last in frame. the ostbd is always the last in the frame, so l is always set. (hardwired to a value of 1.) 5 tc tx crc. written by user. (valid only while it is set in the first bd and ostbd[pad/crc] is cleared, maccfg2[pad/crc] is cleared, and maccfg2[crc en] is cleared.) if maccfg2[pad/crc] is set or maccfg2[crc en] is set, a crc is added to all frames and this bit is ignored. 0 end transmission immediately after the last data byte, unless ostbd[pad/crc] is set. 1 transmit the crc sequence after the last data byte. 6 def defer indication. written by tsec. hardware updates this bit after transmitting a frame if used as a ?defer indicator.? software/user updates this bit while building a transmit buffer descriptor if used as a ?hardware event indicator.? 0 this frame was not deferred. 1 this frame did not have a collision before it was sent but it was sent late because of deferring. 7 to1 transmit software ownership. this read/write bit may be utilized by software, as necessary. its state does not affect the hardware nor is it affected by the hardware. 8 hfe/lc huge frame enable (written by user)/late collision (written by tsec) huge frame enable. written by user. valid only while it is set in first bd and the maccfg2[huge frame] is cleared. if maccfg2[huge frame] is set, this bit is ignored. 0 truncate transmit frame if its length is greater than the mac?s maximum frame length register. 1 do not truncate the transmit frame. late collision. written by tsec. 0 no late collision. 1 a collision occurred after 64 bytes are sent. the tsec terminates the transmission and updates lc. 9 rl retransmission limit. written by tsec. 0 transmission before maximum retry limit is hit. 1 the transmitter failed (max. retry limit + 1) attempts to successfully send a message due to repeated collisions. the tsec terminates the transmission and updates rl.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-40 freescale semiconductor three-speed ethernet controllers 14.5.3.3.9 out-of-sequence tx data buffer pointer register (ostbdp) the out-of-sequence tx data buffer pointer register (ostbdp), shown in figure 14-26 , contains the data buffer pointer fields in the same format as a regular txbd. with ostbd, it provides the complete 8-byte descriptor. this area must be cleared while not in use. table 14-24 describes ostbdp. 14.5.3.4 tsec receive control and status registers this section describes the control and status registers that are used specifically for receiving ethernet frames. all of the registers are 32 bits wide. 10?13 rc retry count. written by tsec. 0 the frame is sent correctly the first time. 1 more than zero attempts were needed to send the transmit frame. if this field is 15, 15 or more retries were needed. the ethernet controller updates rc after sending the buffer. 14 un underrun. written by tsec. 0 no underrun encountered (data was retrieved from external memory in time to send a complete frame). 1 the ethernet controller encountered a transmitter underrun condition while sending the associated buffer. the tsec terminates the transmission and updates un. 15 ? reserved 16?31 ostbdlen out-of-sequence txbd data length. written by user. data length is the number of octets the tsec transmits from this bd?s data buffer. it is never modified by the tsec. this field must be greater than zero in order for a transfer to take place. 0 31 r ostbdp w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_42b4; tsec2:0x2_52b4 figure 14-26. ostbdp register definition table 14-24. ostbdp field descriptions bits name description 0?31 ostdbp out-of-sequence tx data buffer pointer. written by user. the transmit data buffer pointer contains the address of the associated data buffer. there are no alignment requirements for this address. table 14-23. ostbd field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-41 14.5.3.4.1 receive control register (rctrl) rctrl, shown in figure 14-27 , controls the operational mode of the receive block. it must be written only after a system reset (at initialization) or if dmactrl[grs] is cleared. table 14-25 describes the fields of the rctrl register. 14.5.3.4.2 receive status register (rstat) tsec writes to rstat, shown in figure 14-28 , under the following conditions:  the receiver runs out of descriptors.  the receiver was halted because an error condition was encountered while receiving a frame. software must clear the qhlt bit to take the tsec receiver function out of a halt state. 0 26 27 28 29 30 31 r000000000000000 0 0 000000000 0 bc_rej prom rsf 00 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4300; tsec2:0x2_5300 figure 14-27. rctrl register definition table 14-25. rctrl field descriptions bits name description 0?26 ? reserved 27 bc_rej broadcast frame reject. if this bit is set, frames with da (destination address) = ffff_ffff_ffff are rejected unless rctrl[prom] is set. if both bc_rej and rctrl[prom] are set, then frames with broadcast da are accepted and the m (miss) bit is set in the receive bd. 0 broadcast frame reject is disabled. 1 broadcast frame reject is enabled. 28 prom promiscuous mode. when set, all frames except pause frames are accepted. 0 promiscuous mode is disabled. 1 promiscuous mode is enabled. 29 rsf receive short frame mode. when set, enables the reception of frames shorter than minflr bytes. note that in order for short frames to be received when rsf is set, a da hit must occur. when rsf is cleared, all frames shorter than minflr are automatically rejected. 0 receive short fram mode is disabled. 1 receive short frame mode is enabled. 30?31 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-42 freescale semiconductor three-speed ethernet controllers table 14-26 describes the fields of the rstat register. 14.5.3.4.3 rxbd data length register (rbdlen) rbdlen is a dma register that contains the number of bytes remaining in the current receive buffer. figure 14-29 shows the rbdlen register. table 14-27 describes the fields of the rbdlen register. 0 789 31 r0 0000000 qhlt 000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4304; tsec2:0x2_5304 figure 14-28. rstat register definition table 14-26. rstat field descriptions bits name description 0?7 ? reserved 8 qhlt rxbd queue is halted. when ievent[bsy] or ievent[eberr] is set during reception of a packet, rstat[qhlt] is also set. in order to begin receiving packets again, the user must clear rstat[qhlt]. this bit is set whenever the tsec reads an rxbd with its empty field cleared or encounters a system bus error while processing an rx packet. it is a hardware-initiated stop indication (dma_ctrl[grs] being set by the user does not cause this bit to be set.). the current frame and all other frames directed to the halted queue are discarded. a write with a value of 1 re-enables the queue for receiving. 0 rxbd queue is enabled for ethernet reception. (that is, it is not halted.) 1 all ethernet controller receive activity to rxbd queue is halted. 9?31 ? reserved 0151631 r0000000000000000 rbdlen w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_430c; tsec2:0x2_530c figure 14-29. rbdlen register definition table 14-27. rbdlen field descriptions bits name description 0?15 ? reserved 16?31 rbdlen the rbdlen is internally written by the dma module. if rbdlen is cleared, all activity in the receive channel stops.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-43 14.5.3.4.4 receive interrupt coalescing configuration register (rxic) the rxic register enables and configures the operational parameters for interrupt coalescing associated with received frames. refer to section 14.6.2.8.1, ?interrupt coalescing,? for a functional description of interrupt coalescing as additional details regarding the use of this register. figure 14-30 shows the rxic register. table 14-18 describes the fields of the rxic register. 0 1 2 3 10 11 15 16 31 r icen 00 icfct 00000 ictt w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4310; tsec2:0x2_5310 figure 14-30. rxic register definition table 14-28. rxic field descriptions bits name description 0 icen interrupt coalescing enable 0 interrupt coalescing is disabled. interrupts are raised as they are received if the tsec receive frame interrupt is enabled (imask[rxfen] is set). 1 interrupt coalescing is enabled. if the tsec receive frame interrupt is enabled (imask[rxfen] is set), an interrupt is raised when the threshold number of frames is reached (defined by rxic[icfct]) or when the threshold timer expires (defined by rxic[ictt]). 1?2 ? reserved 3?10 icfct interrupt coalescing frame count threshold. while interrupt coalescing is enabled (rxic[icen] is set), this value determines how many frames are received before raising an interrupt 1 . valid values for this field are from 1 to 255. a value of 0 is illegal. if set to 0, an interrupt can only be cleared by first clearing rxic[icen] and then clearing the ievent[rxf] bit. note that a value of 1 functionally defeats the advantages of interrupt coalescing since the frame threshold is reached with each frame received. 1 interrupts resulting from the interrupt bit (i) of the buffer descriptor in question and enabled subject to the imask register (imask[rxfen] is set). 11?15 ? reserved 16?31 ictt interrupt coalescing timer threshold. while interrupt coalescing is enabled (rxic[icen] is set), this value determines the maximum amount of time after receiving a frame before raising an interrupt 1 , subject also to imask[rxfen]. if frames have been received but the frame count threshold has not been met, an interrupt is raised when the threshold timer expires. the threshold timer is reset once an interrupt has been asserted. it begins counting once the interrupt is cleared and ievent[rxf] is set. the threshold value is represented in units equal to 64 tsec interface clocks. valid values for this field are from 1 to 65535. a value of 0 is illegal. if set to 0, an interrupt can only be cleared by first clearing rxic[icen] and then clearing the ievent[rxf] bit.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-44 freescale semiconductor three-speed ethernet controllers 14.5.3.4.5 current receive buffer descriptor pointer register (crbptr) crbptr contains the address of the receive buffer descriptor either currently being processed, or processed most recently. figure 14-31 shows the crbptr register. table 14-29 describes the fields of the crbptr register. \ 14.5.3.4.6 maximum receive buffer length register (mrblr) the mrbl register is written by the user. it informs the tsec how much space is in the receive buffer pointed to by the rxbd. figure 14-32 shows the mrblr. 0 28 29 31 r crbptr 0 0 0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_4324; tsec2:0x2_5324 figure 14-31. crbptr register definition table 14-29. crbptr field descriptions bits name description 0?28 crbptr the crbptr register is internally written by the dma module. the value of this field increments by one (causing the register value to increment by eight) each time a descriptor is read from memory. 29?31 ? reserved 01516252631 r0000000000000000 mrbl 000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4340; tsec2:0x2_5340 figure 14-32. mrbl register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-45 table 14-30 describes the fields of the mrbl register. \\ 14.5.3.4.7 receive buffer descriptor pointer register (rbptr) rbptr contains the receive buffer descriptor address. figure 14-33 shows the rbptr register. this register takes on the value of rbase when the rbase register is written by software. although not necessary in most applications, the user can modify this register when the transmitter has been gracefully stopped or halted, as indicated by tstat[thlt]. table 14-31 describes the fields of the rbptr register. 14.5.3.4.8 receive descriptor base address register (rbase) the rbase register is written by the user with the rxbd base address and must be divisible by eight for the 8-byte buffer descriptors. figure 14-34 shows the rbase register. table 14-30. mrblr field descriptions bits name description 0?15 ? to ensure that mrbl is a multiple of 64, these bits are reserved and must be cleared. 16?25 mrbl maximum receive buffer length. mrbl is the number of bytes that the tsec receiver writes to the receive buffer. the mrbl register is written by the user with a multiple of 64 for all modes. tsec can write fewer bytes to the buffer than the value set in mrbl if a condition such as an error or end-of-frame occurs, but it never exceeds the mrbl value; therefore, user-supplied buffers must be at least as large as the mrbl. 26?31 ? to ensure that mrbl is a multiple of 64, these bits are reserved and must be cleared. 0 28 29 31 r rbptr 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4384; tsec2:0x2_5384 figure 14-33. rbptr register definition table 14-31. rbptr field descriptions bits name description 0?28 rbptr the rbptr register is internally written by the dma module. the value of this field increments by one (causing the register value to increment by eight) each time a descriptor is read from memory. 29?31 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-46 freescale semiconductor three-speed ethernet controllers table 14-32 describes the fields of the rbase register. \ 14.5.3.5 mac functionality this section describes the mac registers and provides a brief overview of the functionality that can be exercised through the use of these registers, particularly those that provide functionality not explicitly required by the ieee 802.3 standard. all of the mac registers are 32 bits wide. 14.5.3.5.1 configuring the mac mac configuration registers 1 and 2 provide a way to configure the mac in multiple ways:  adjusting the preamble length?the length of the preamble can be adjusted from the nominal seven bytes to some other (non-zero) value.  varying pad/crc combinations?three pad/crc combinations are provided to handle a variety of system requirements. the most simple are frames that already have a valid fcs field. in this case, the crc is checked and reported via the transmit statistics vector (tsv[51:0]). the other two options include appending a valid crc, or padding and then appending a valid crc, resulting in a minimum frame of 64 octets. in addition to the programmable register set, the pad/crc behavior can be dynamically adjusted on a per-packet basis. 14.5.3.5.2 controlling csma/cd the half-duplex register (hafdup) allows control over the carrier-sense multiple access/collision detection (csma/cd) logic of the tsec. half-duplex is only supported for 10 mbps and 100 mbps operation. following the completion of the packet transmission the part begins timing the inter packet gap (ipg) as programmed in the back-to-back ipg configuration register. the system is now free to begin another frame transfer. 0 28 29 31 r rbase 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4404; tsec2:0x2_5404 figure 14-34. rbase register definition table 14-32. rbase field descriptions bits name description 0?28 rbase receive base. rbase defines the starting location in the memory map for the tsec rxbd. 29?31 ? reserved. these bits must be set to zero, to cause the value of rbase to be a multiple of eight.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-47 in full-duplex mode both the carrier sense (crs) and collision (col) indications from the phy are ignored, but in half-duplex mode the tsec defers to crs and, following a carrier event, times the ipg using the non-back-to-back ipg configuration values that include support for the optional two-thirds/one-third crs deferral process. this optional ipg mechanism enhances system robustness and ensures fair access to the medium. during the first two-thirds of the ipg, the ipg timer is cleared if crs is sensed. during the final one-third of the ipg, crs is ignored and the transmission begins once ipg is timed. the two-thirds/one-third ratio is the recommended value. 14.5.3.5.3 handling packet collisions while transmitting a packet in half-duplex mode, the tsec is sensitive to col. if a collision occurs, it aborts the packet and outputs the 32-bit jam sequence. the jam sequence is comprised of several bits of the crc, inverted to guarantee an invalid crc upon reception. a signal is sent to the system indicating that a collision occurred and that the start of the frame is needed for retransmission. the tsec then backs off of the medium for a time determined by the truncated binary exponential back-off (beb) algorithm. following this back-off time, the packet is retried. the back-off time can be skipped if configured via the half-duplex register. however, this is non-standard behavior and its use must be carefully applied. should any one packet experience excessive collisions, the packet is aborted. the system must flush the frame and move to the next one in line. if the system requests to send a packet while the tsec is deferring to a carrier, the tsec simply waits until the end of the carrier event and the timing of ipg before it honors the request. if packet transmission attempts experience collisions, the tsec outputs the jam sequence and waits some amount of time before retrying the packet. this amount of time is determined by a controlled randomization process called truncated binary exponential back-off. the amount of time is an integer number of slot times. the number of slot times to delay before the n th retransmission attempt is chosen as a uniformly-distributed random integer r in the range: 0 r 2 k , where k = min( n ,10). so, after the first collision, tsec backs-off either 0 or 1 slot times. after the fifth collision, tsec backs-off between 0 and 32 slot times. after the tenth collision, the maximum number of slot times to back-off is 1024. this can be adjusted through the half-duplex register. an alternate truncation point, such as 7 for instance, can be programmed. on average, the mac is more aggressive after seven collisions than other stations on the network. 14.5.3.5.4 controlling packet flow packet flow can be dealt with in a number of ways within tsec. a default retransmit attempt limit of 15 can be reduced using the half-duplex register. the slot time or collision window can be used to gate the retry window and possibly reduce the amount of transmit buffering within the system. the slot time for 10/100 mbps is 512 bit times. because the slot time begins at the beginning of
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-48 freescale semiconductor three-speed ethernet controllers the packet, the end occurs around the 56th byte of the frame data. slot time in 1-gbps mode is not supported. full-duplex flow control is provided for in ieee 802.3x. currently the standard does not address flow control in half-duplex environments. common in the industry, however, is the concept of back pressure. the tsec implements the optional back pressure mechanism using the raise carrier method. if the system receive logic wishes to stop the reception of packets in a network-friendly way, transmit half-duplex flow control (thdf) is set (tctrl[thdf]). if the medium is idle, the tsec raises carrier by transmitting preamble. other stations on the half-duplex network then defer to the carrier. in the event the preamble transmission happens to cause a collision, tsec ensures the minimum 96-bit presence on the wire, then drops preamble and waits a back-off time depending on the value of the configuration bit, back pressure no back-off (half-duplex) [bpnb]. these transmitting-preamble-for-back pressure collisions are not counted. if bpnb is set, the tsec waits an inter-packet gap before resuming the transmission of preamble following the collision and does not defer. if cleared, the tsec adheres to the truncated beb algorithm that allows the possibility of packets being received. this also can be detrimental in that packets can now experience excessive collisions, causing them to be dropped in the stations from which they originate. to reduce the likelihood of lost packets and packets leaking through the back pressure mechanism, bpnb must be set. the tsec drops carrier (cease transmitting preamble) periodically to avoid excessive defer conditions in other stations on the shared network. if, while applying back pressure, the tsec is requested to send a packet, it stops sending preamble, and waits one ipg before sending the packet. bpnb applies for any collision that occurs during the sending of this packet. tsec does not defer while attempting to send packets while in back pressure. again, back pressure is non-standard, yet it can be effective in reducing the flow of receive packets. 14.5.3.5.5 controlling phy links control and status to and from the phy is provided via the two-wire mii management interface described in ieee 802.3u. the mii management registers (mii management configuration, command, address, control, status, and indicator registers) are used to exercise this interface between a host processor and one or more phy devices (including the tbi). external phys may only be configured using the mii management interface of tsec1 since the interface signals (ec_mdc and ec_mdio) are only driven by tsec1. the tsec mii?s registers provide the ability to perform continuous read cycles, called a scan cycle. if requested (by setting miimcom[scan cycle]), the part performs repetitive read cycles of the phy status register, for example. in this way, link characteristics may be monitored more efficiently. the different fields in the mii management indicator register (scan, not valid and busy) are used to indicate availability of each read of the scan cycle to the host from miimstat[phy status].
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-49 yet another parameter that can be modified through the mii registers is the length of the mii management interface preamble. after establishing that a phy supports preamble suppression, the host may so configure the tsec. while enabled, the length of mii management frames are reduced from 64 clocks to 32 clocks. this effectively doubles the efficiency of the interface. 14.5.3.6 mac registers the following are the mac registers. 14.5.3.6.1 mac configuration register 1 (maccfg1) the maccfg1 register is written by the user. figure 14-35 shows the maccfg1 register. table 14-33 describes the fields of the maccfg1 register. \ 0 1 11 12 13 14 15 r soft_reset 00000 0 0 0 0 0 0 reset rx mc reset tx mc reset rx fun reset tx fun w reset 0000_0000_0000_0000 16 22 23 24 25 26 27 28 29 30 31 r 0 00000 0 loop back 00 rx_flow tx_flow sync?d rx en rx_en sync?d tx en tx_en w reset 0000_0000_0000_0000 offset tsec1:0x2_4500; tsec2:0x2_5500 figure 14-35. maccfg1 register definition table 14-33. maccfg1 field descriptions bits name description 0 soft_reset soft reset. this bit is cleared by default. see section 14.6.2.2, ?soft reset and reconfiguring procedure,? for more information on setting this bit. 0 normal operation 1 place all modules within the mac in reset. 1?11 ? reserved 12 reset rx mc reset receive mac control block. this bit is cleared by default. 0 normal operation 1 place the receive mac control block in reset. this block detects control frames and contains the pause timers. 13 reset tx mc reset transmit mac control block. this bit is cleared by default. 0 normal operation 1 place the petmc transmit mac control block in reset. this block multiplexes data and control frame transfers. it also responds to xoff pause control frames.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-50 freescale semiconductor three-speed ethernet controllers 14 reset rx fun reset receive function block. this bit is cleared by default. 0 normal operation 1 place the receive function block in reset. this block performs the receive frame protocol. 15 reset tx fun reset transmit function block. this bit is cleared by default. 0 normal operation 1 place the transmit function block in reset. this block performs the frame transmission protocol. 16?22 ? reserved 23 loop back loop back. this bit is cleared by default. 0 normal operation 1 loop back the mac transmit outputs to the mac receive inputs. 24?25 ? reserved 26 rx_flow receive flow. this bit is cleared by default. 0 the receive mac control ignores pause flow control frames. 1 the receive mac control detects and acts on pause flow control frames. 27 tx_flow transmit flow. this bit is cleared by default. 0 the transmit mac control may not send pause flow control frames if requested by the system. 1 the transmit mac control may send pause flow control frames if requested by the system. 28 sync?d rx en receive enable synchronized to the receive stream (read-only) 0 frame reception is not enabled. 1 frame reception is enabled. 29 rx_en receive enable. this bit is cleared by default. if set, prior to clearing this bit, set dmactrl[grs] then confirm subsequent occurrence of the graceful receive stop interrupt (ievent[grsc] is set). 0 the mac may not receive frames from the phy. 1 the mac may receive frames from the phy. 30 sync?d tx en transmit enable synchronized to the transmit stream (read-only) 0 frame transmission is not enabled. 1 frame transmission is enabled. 31 tx_en transmit enable. this bit is cleared by default. if set, prior to clearing this bit, set dmactrl[gts] then confirm subsequent occurrence of the graceful transmit stop interrupt (ievent[gtsc] is set). 0 the mac may not transmit frames from the system. 1 the mac may transmit frames from the system. table 14-33. maccfg1 field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-51 14.5.3.6.2 mac configuration register 2 (maccfg2) the maccfg2 register is written by the user. figure 14-36 shows the maccfg2 register. table 14-34 describes the fields of the maccfg2 register. 0 15 16 19 202122 232425 26 27 28 29 30 31 r000000000000000 0 preamble length 00 i/f mode 00 huge frame length check 0 pad/ crc crc en full duplex w reset 0000_0000_0000_0000_0111_0000_0000_0000 offset tsec1:0x2_4504; tsec2:0x2_5504 figure 14-36. maccfg2 register definition table 14-34. maccfg2 field descriptions bits name description 0?15 ? reserved 16?19 preamble length determines the length in bytes of the preamble field of the packet. its default is 0x7. a preamble length of 0 is not supported. 20?21 ? reserved 22?23 i/f mode determines the type of interface to which the mac is connected. its default is 00. 00 reserved 01 nibble mode (mii) 10 byte mode (gmii/tbi) 11 reserved 24?25 ? reserved 26 huge frame huge frame enable. cleared by default. 0 limit the length of frames to the maximum frame length value. 1 frames longer than the maximum frame length may be transmitted and received. 27 length check length check. this bit is cleared by default. 0 no length field checking is performed. 1 the mac checks the frame?s length field to ensure it matches the actual data field length. 28 ? reserved 29 pad/crc pad and append crc. this bit is cleared by default. 0 frames presented to the mac have a valid length and contain a crc. 1 the mac pads all transmitted short frames and appends a crc to every frame regardless of padding requirement. 30 crc en crc enable. if the configuration bit pad/crc or the per-packet pad/crc bit is set, crc en is ignored. this bit is cleared by default. 0 frames presented to the mac have a valid length and contain a valid crc. 1 the mac appends a crc on all frames. clear this bit if frames presented to the mac have a valid length and contain a valid crc. 31 full duplex full duplex configure. this bit is cleared by default. 0 the mac to operate in half-duplex mode only. 1 the mac operates in full-duplex mode.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-52 freescale semiconductor three-speed ethernet controllers 14.5.3.6.3 inter-packet gap/inter-frame gap register (ipgifg) the ipgifg register is written by the user. figure 14-37 shows the ipgifg register. table 14-35 describes the fields of the ipgifg register. 0 1 7 8 9 15 16 23 24 25 31 r 0 non-back-to-back inter-packet-gap, part 1 0 non-back-to-back inter-packet-gap, part 2 minimum ifg enforcement 0 back-to-back inter-packet-gap w reset 0100_0000_0110_0000_0101_0000_0110_0000 offset tsec1:0x2_4508; tsec2:0x2_5508 figure 14-37. ipgifg register definition table 14-35. ipgifg field descriptions bits name description 0?reserved 1?7 non-back-to-back inter-packet-gap, part 1 programmable field representing the optional carrier sense window referenced in ieee 802.3/4.2.3.2.1 ?carrier deference?. if carrier is detected during the timing of ipgr1, the mac defers to carrier. if, however, carrier becomes active after ipgr1, the mac continues timing ipgr2 and transmits, knowingly causing a collision; thus, ensuring fair access to medium. its range of values is 0x00 to ipgr2. its default is 0x40 (64d) which follows the two-thirds/one-third guideline. 8?reserved 9?15 non-back-to-back inter-packet-gap, part 2 programmable field representing the non-back-to-back inter-packet-gap in bits. its default is 0x60 (96d), which represents the minimum ipg of 96 bits. 16?23 minimum ifg enforcement programmable field representing the minimum number of bits of ifg to enforce between frames. a frame is dropped whose ifg is less than that programmed. the default setting of 0x50 (80d) represents half of the nominal minimum ifg which is 160 bits. 24 ? reserved 25?31 back-to-back inter-packet-gap programmable field representing the ipg between back-to-back packets. this is the ipg parameter used exclusively in full-duplex mode and in half-duplex mode if two transmit packets are sent back-to-back. set this field to the number of bits of ipg desired. the default setting of 0x60 (96d) represents the minimum ipg of 96 bits.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-53 14.5.3.6.4 half-duplex register (hafdup) the hafdup register is written by the user. figure 14-38 shows the hafdup register. table 14-36 describes the fields of the hafdup register. 0 78 1112131415 r 0 0000000 alternate beb truncation alt beb bp no backoff no backoff excess defer w reset 0000_0000_1010_0001 16 19 20 25 26 31 r retransmission maximum 00000 0 collision window w reset 1111_0000_0011_0111 offset tsec1:0x2_450c; tsec2:0x2_550c figure 14-38. half-duplex register definition table 14-36. hafdup field descriptions bits name description 0?7 ? reserved 8?11 alternate beb truncation this field is used while alternate binary exponential back-off enable is set. the value programmed is substituted for the ethernet standard value of ten. its default is 0xa. 12 alt beb alternate binary exponential back-off. this bit is cleared by default. 0 the tx mac follows the standard binary exponential back-off rule. 1 the tx mac uses the alternate binary exponential back-off truncation setting instead of the 802.3 standard tenth collision. the standard specifies that any collision after the tenth uses one less than 2 10 (2 10 ? 1) as the maximum back-off time. 13 bp no backoff back pressure no back-off. this bit is cleared by default. 0 the tx mac follows the binary exponential back-off rule. 1 the tx mac immediately re-transmits, following a collision, during back pressure operation. 14 no backoff no back-off. this bit is cleared by default. 0 the tx mac follows the binary exponential back-off rule. 1 the tx mac immediately re-transmits following a collision. 15 excess defer excessively deferred. this bit is set by default. 0 the tx mac aborts the transmission of a packet that is excessively deferred. 1 the tx mac allows the transmission of a packet that is excessively deferred. 16?19 retransmission maximum this is a programmable field specifying the number of retransmission attempts following a collision before aborting the packet due to excessive collisions. the standard specifies the attempt limit to be 0xf (15d). its default value is 0xf.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-54 freescale semiconductor three-speed ethernet controllers 14.5.3.6.5 maximum frame length register (maxfrm) the maxfrm register is written by the user. figure 14-39 shows the maxfrm register. table 14-37 describes the fields of the maxfrm register. 14.5.3.6.6 mii management configuration register (miimcfg) the miimcfg register is written by the user. figure 14-40 shows the miimcfg register. 20?25 ? reserved 26?31 collision window this is a programmable field representing the slot time or collision window during which collisions occur in properly configured networks. because the collision window starts at the beginning of transmission, the preamble and sfd are included. its default of 0x37 (55d) corresponds to the count of frame bytes at the end of the window. 0151631 r0000000000000000 maximum frame w reset 0000_0000_0000_0000_0000_0110_0000_0000 offset tsec1:0x2_4510; tsec2:0x2_5510 figure 14-39. maximum frame length register definition table 14-37. maxfrm field descriptions bits name description 0?15 ? reserved 16?31 maximum frame by default this field is set to 0x0600 (1536d). it sets the maximum frame size in both the transmit and receive directions. (refer to maccfg2[huge frame].) 01 26 27 28 29 31 r reset mgmt 00000000000000000000000000 no pre 0mgmt clock select w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4520; tsec2:0x2_5520 figure 14-40. mii management configuration register definition table 14-36. hafdup field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-55 table 14-38 describes the fields of the miimcfg register. 14.5.3.6.7 mii management command register (miimcom) the miimcom register is written by the user. figure 14-41 shows the miimcom register. table 14-38. miimcfg field descriptions bits name description 0 reset mgmt reset management. this bit is cleared by default. 0 allow the mii mgmt to perform management read/write cycles if requested. 1 reset the mii mgmt. 1?26 ? reserved 27 no pre preamble suppress. this bit is cleared by default. 0 the mii mgmt performs management read/write cycles with 32 clocks of preamble. 1 the mii mgmt suppresses preamble generation and reduces the management cycle from 64 clocks to 32 clocks. this is in accordance with ieee 802.3/22.2.4.4.2. 28 ? reserved 29?31 mgmt clock select this field determines the clock frequency of the mgmt clock (ec_mdc). its default value is 000. the source clock frequency is equal to the core complex bus clock divided first by eight and then futher divided by the following value: 000 source clock divided by 4 001 source clock divided by 4 010 source clock divided by 6 011 source clock divided by 8 100 source clock divided by 10 101 source clock divided by 14 110 source clock divided by 20 111 source clock divided by 28 0 29 30 31 r0 00000000000000000000000000000 scan cycle read cycle w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4524; tsec2:0x2_5524 figure 14-41. miimcom register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-56 freescale semiconductor three-speed ethernet controllers table 14-39 describes the fields of the miimcom register. 14.5.3.6.8 mii management address register (miimadd) the miimadd register is written by the user. figure 14-42 shows the miimadd register. table 14-40 describes the fields of the miimadd register. table 14-39. miimcom field descriptions bits name description 0?29 ? reserved 30 scan cycle scan cycle. this bit is cleared by default. 0 normal operation. 1 the mii management continuously performs read cycles. this is useful for polling a phy register, for example, monitoring link fails. data is returned in register miimstat[phy status]. 31 read cycle read cycle. this bit is cleared by default but is not self-clearing once set. 0 normal operation. 1 the mii management performs a single read cycle upon the transition of this bit from 0 to 1 using the phy address (at miimadd[phy address]) and the register address (at miimadd[register address]). the 0 to 1 transition of this bit also causes the miimind[busy] bit to be set. the read is complete when the miimind[busy] bit clears. data is returned in register miimstat[phy status]. 0 18 19 23 24 26 27 31 r0000000000000000000 phy address 000 register address w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4528; tsec2:0x2_5528 figure 14-42. miimadd register definition table 14-40. miimadd field descriptions bits name description 0?18 ? reserved 19?23 phy address this field represents the 5-bit phy address field of management cycles. up to 31 phys can be addressed (0 is reserved). 24?26 ? reserved 27?31 register address this field represents the 5-bit register address field of management cycles. up to 32 registers can be accessed. its default value is 0x00.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-57 14.5.3.6.9 mii management control register (miimcon) the miimcon register is written by the user. figure 14-43 shows the miimcon register. table 14-41 describes the fields of the miimcon register. 14.5.3.6.10mii management status register (miimstat) the miimstat, shown in figure 14-44 , is read-only by the user. table 14-42 describes the fields of the miimstat register. 0151631 r0000000000000000 phy control w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_452c; tsec2:0x2_552c figure 14-43. mii management control register definition table 14-41. miimcon field descriptions bits name description 0?15 ? reserved 16?31 phy control if written, an mii mgmt write cycle is performed using this 16-bit data, the pre-configured phy address (at miimadd[phy address]) and the register address (at miimadd[register address]). its default value is 0x0000. 0151631 r0000000000000000 phy status w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4530; tsec2:0x2_5530 figure 14-44. miimstat register definition table 14-42. miimstat field descriptions bits name description 0?15 ? reserved 16?31 phy status following an mii mgmt read cycle, the 16-bit data can be read from this location. its default value is 0x0000.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-58 freescale semiconductor three-speed ethernet controllers 14.5.3.6.11 mii management indicator register (miimind) the miimind register is read-only by the user. figure 14-45 shows the miimind register. table 14-43 describes the fields of the miimind register. 14.5.3.6.12interface status register (ifstat) figure 14-46 shows the ifstat register. 0 28 29 30 31 r 0 000000000000000000000000000 0not validscanbusy w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4534; tsec2:0x2_5534 figure 14-45. mii management indicator register definition table 14-43. miimind field descriptions bits name description 0?28 ? reserved 29 not valid not valid 0 mii mgmt read cycle has completed and the read data is valid. 1 mii mgmt read cycle has not completed and the read data is not yet valid. 30 scan scan in progress 0 a scan operation (continuous mii mgmt read cycles) is not in progress. 1 a scan operation (continuous mii mgmt read cycles) is in progress. 31 busy busy 0 mii mgmt block is not currently performing an mii mgmt read or write cycle. 1 mii mgmt block is currently performing an mii mgmt read or write cycle. 0 21 22 23 27 28 29 31 r 000000000000000000000 0 excess defer 0 000 0 link fail 00 0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_453c; tsec2:0x2_553c figure 14-46. interface status register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-59 table 14-44 describes the fields of the ifstat register. 14.5.3.6.13station address register part 1 (macstnaddr1) the macstnaddr1 register is written by the user. figure 14-47 shows the macstnaddr1 register. the value of the station address written by the user into macstnaddr1 and macstnaddr2 is byte-reversed from how it would appear in the da field of a frame in memory. for example, for a station address of 0x12345678abcd, perform a write to macstnaddr1 of 0xcdab7856, and to macstnaddr2 of 0x34120000. when the user reads macstnaddr1, 0xcdab7856 is returned. a read of macstnaddr2 returns a value of 0x34120000. note, the i/g and u/l bits of the frame?s da field is located at the lsbs of the 1st octet stored in macstnaddr2, where the i/g bit is bit 15, and the u/l bit is bit 14. table 14-44. ifstat field descriptions bits name description 0?21 ? reserved 22 excess defer excessive transmission defer. this bit latches high and is cleared when read. this bit is cleared by default. 0 normal operation 1 the mac excessively defers a transmission. 23?27 ? reserved 28 link fail link fail. this bit indicates the status of signal detection. 0 the100x module has detected a ?signal detect? for longer than 330 ms. 1 the100x module has detected a ?signal detect? for less than 330 ms or not at all. 29?31 ? reserved 0781516232431 r station address, 6th octet station address, 5th octet station address, 4th octet station address, 3rd octet w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4540; tsec2:0x2_5540 figure 14-47. station address part 1 register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-60 freescale semiconductor three-speed ethernet controllers table 14-45 describes the fields of the macstnaddr1 register. 14.5.3.6.14station address register part 2 (macstnaddr2) the macstnaddr2 register is written by the user. figure 14-48 shows the macstnaddr2 register. note, the i/g and u/l bits of the frame?s da field is located at the lsbs of the 1st octet stored in macstnaddr2, where the i/g bit is bit 15, and the u/l bit is bit 14. table 14-46 describes the fields of the macstnaddr2 register. 14.5.3.7 mib registers this section describes the mib registers. the tsec mstat module has 37 separate statistics counters, which simply count or accumulate statistical events that occur as packets are transmitted and received. these counters support table 14-45. macstnaddr1 field descriptions bits name description 0?7 station address, 6th octet this field holds the sixth octet of the station address. the sixth octet (station address bits 40?47) defaults to a value of 0x00. 8?15 station address, 5th octet this field holds the fifth octet of the station address. the fifth octet (station address bits 32?39) defaults to a value of 0x00. 16?23 station address, 4th octet this field holds the fourth octet of the station address. the fourth octet (station address bits 24?31) defaults to a value of 0x00. 24?31 station address, 3rd octet this field holds the third octet of the station address. the third octet (station address bits 16?23) defaults to a value of 0x00. 0781516 31 r station address, 2nd octet station address, 1st octet 0000000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4544; tsec2:0x2_5544 figure 14-48. station address part 2 register definition table 14-46. macstnaddr2 field descriptions bits name description 0?7 station address, 2nd octet this field holds the second octet of the station address. the second octet (station address bits 8?15) defaults to a value of 0x00. 8?15 station address, 1st octet this field holds the first octet of the station address. the first octet (station address bits 0?7) defaults to a value of 0x00. 16?31 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-61 rmon mib group 1, rmon mib group 2, rmon mib group 3, rmon mib group 9, rmon mib 2, and the 802.3 ethernet mib. the detection of one or more of these statistical events triggers the mstat module to update its statistics counters. these counters are stored in internal data registers. the user may access the internal data registers at any time. an interrupt can be generated upon any one counter?s rollover condition via a carry interrupt output from the mstat. each counter?s rollover condition can be discreetly masked from causing an interrupt by internal masking registers. in addition, each individual counter value may be reset on read access, or all counters may be simultaneously reset by assertion of an external module input signal. figure 14-49 shows the tr64 register. 14.5.3.7.1 transmit and receive 64-byte frame counter register (tr64) table 14-47 describes the fields of the tr64 register. 14.5.3.7.2 transmit and receive 65- to 127-byte frame counter register (tr127) figure 14-50 shows the tr127 register. 0910 31 r0000000000 tr64 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4680; tsec2:0x2_5680 figure 14-49. transmit and receive 64-byte frame register definition table 14-47. tr64 field descriptions bits name description 0?9 ? reserved 10?31 tr64 transmit and receive 64-byte frame counter?increment for each good or bad frame transmitted and received which is 64 bytes in length, inclusive (excluding preamble and sfd but including fcs bytes) 0910 31 r0 000000000 tr127 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4684; tsec2:0x2_5684 figure 14-50. transmit and receive 65- to 127-byte frame register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-62 freescale semiconductor three-speed ethernet controllers table 14-48 describes the fields of the tr127 register. 14.5.3.7.3 transmit and receive 128- to 255-byte frame counter register (tr255) figure 14-51 shows the tr255 register. table 14-49 describes the fields of the tr255 register. 14.5.3.7.4 transmit and receive 256- to 511-byte frame counter register (tr511) figure 14-52 shows the tr511 register. table 14-48. tr127 field descriptions bits name description 0?9 ? reserved 10?31 tr127 transmit and receive 65- to 127-byte frame counter?increment for each good or bad frame transmitted and received which is 65 to 127 bytes in length, inclusive (excluding preamble and sfd but including fcs bytes) 0910 31 r0 000000000 tr255 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4688; tsec2:0x2_5688 figure 14-51. transmit and receive 128- to 255-byte frame register definition table 14-49. tr255 field descriptions bits name description 0?9 ? reserved 10?31 tr255 transmit and receive 128- to 255-byte frame counter?increments for each good or bad frame transmitted and received which is 128 to 255 bytes in length, inclusive (excluding preamble and sfd but including fcs bytes) 0910 31 r0 000000000 tr511 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_468c; tsec2:0x2_568c figure 14-52. transmit and receive 256- to 511-byte frame register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-63 table 14-50 describes the fields of the tr511 register. 14.5.3.7.5 transmit and receive 512- to 1023-byte frame counter register (tr1k) figure 14-53 shows the tr1k register. table 14-51 describes the fields of the tr1k register. 14.5.3.7.6 transmit and receive 1024- to 1518-byte frame counter register (trmax) figure 14-54 shows the trmax register. table 14-50. tr511 field descriptions bits name description 0?9 ? reserved 10?31 tr511 increments for each good or bad frame transmitted and received which is 256 to 511 bytes in length, inclusive (excluding preamble and sfd but including fcs bytes) 0910 31 r0000000000 tr1k w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4690; tsec2:0x2_5690 figure 14-53. transmit and receive 512- to 1023-byte frame register definition table 14-51. tr1k field descriptions bits name description 0?9 ? reserved 10?31 tr1k increments for each good or bad frame transmitted and received which is 512 to 1023 bytes in length, inclusive (excluding preamble and sfd but including fcs bytes) 0910 31 r0 000000000 trmax w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4694; tsec2:0x2_5694 figure 14-54. transmit and receive 1024- to 1518-byte frame register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-64 freescale semiconductor three-speed ethernet controllers table 14-52 describes the fields of the trmax register. 14.5.3.7.7 transmit and receive 1519- to 1522-byte vlan frame counter register (trmgv) figure 14-55 shows the trmgv register. table 14-53 describes the fields of the trmgv register. 14.5.3.7.8 receive byte counter register (rbyt) figure 14-56 shows the rbyt register. table 14-52. trmax field descriptions bits name description 0?9 ? reserved 10?31 trmax increments for each good or bad frame transmitted and received which is 1024 to 1518 bytes in length, inclusive (excluding preamble and sfd but including fcs bytes) 0910 31 r0000000000 trmgv w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4698; tsec2:0x2_5698 figure 14-55. transmit and receive 1519- to 1522-byte vlan frame register definition table 14-53. trmgv field descriptions bits name description 0?9 ? reserved 10?31 trmgv increments for each good or bad frame transmitted and received which is 1519 to 1522 bytes in length, inclusive (excluding preamble and sfd but including fcs bytes) 01 31 r0 rbyt w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_469c; tsec2:0x2_569c figure 14-56. receive byte counter register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-65 table 14-54 describes the fields of the rbyt register. 14.5.3.7.9 receive packet counter register (rpkt) figure 14-57 shows the rpkt register. table 14-55 describes the fields of the rpkt register. 14.5.3.7.10receive fcs error counter register (rfcs) figure 14-58 shows the rfcs register. table 14-54. rbyt field descriptions bits name description 0?reserved 1?31 rbyt receive byte counter. increments by the byte count of frames received, including those in bad packets, excluding preamble and sfd but including fcs bytes. 0910 31 r0 000000000 rpkt w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46a0; tsec2:0x2_56a0 figure 14-57. receive packet counter register definition table 14-55. rpkt field descriptions bits name description 0?9 ? reserved 10?31 rpkt receive packet counter. increments for each frame received packet (including bad packets, all unicast, broadcast, and multicast packets). 0151631 r0 0000000000 00000 rfcs w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46a4; tsec2:0x2_56a4 figure 14-58. receive fcs error counter register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-66 freescale semiconductor three-speed ethernet controllers table 14-56 describes the fields of the rfcs register. 14.5.3.7.11 receive multicast packet counter register (rmca) figure 14-59 shows the rmca register. table 14-57 describes the fields of the rmca register. 14.5.3.7.12receive broadcast packet counter register (rbca) figure 14-59 shows the rbca register. table 14-56. rfcs field descriptions bits name description 0?15 ? reserved 16?31 rfcs receive fcs error counter. increments for each frame received that has an integral 64 to 1518 length and contains a frame check sequence error. 0910 31 r0000000000 rmca w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46a8; tsec2:0x2_56a8 figure 14-59. receive multicast packet counter register definition table 14-57. rmca field descriptions bits name description 0?9 ? reserved 10?31 rmca receive multicast packet counter. increments for each multicast good frame of lengths 64 to 1518 (non vlan) or 1522 (vlan), excluding broadcast frames. this count does not include range/length errors. 0910 31 r0000000000 rbca w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46ac; tsec2:0x2_56ac figure 14-60. receive broadcast packet counter register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-67 table 14-58 describes the fields of the rbca register. 14.5.3.7.13receive control frame packet counter register (rxcf) figure 14-61 shows the rxcf register. table 14-59 describes the fields of the rxcf register. 14.5.3.7.14receive pause frame packet counter register (rxpf) figure 14-62 shows the rxpf register. table 14-58. rbca field descriptions bits name description 0?9 ? reserved 10?31 rbca receive broadcast packet counter. increments for each broadcast good frame of lengths 64 to 1518 (non vlan) or 1522 (vlan), excluding multicast frames. does not include range/length errors. 01516 31 r0 0000000000 0000 0 rxcf w reset 0000_0000_0000_0000)0000_0000_0000_0000 offset tsec1:0x2_46b0; tsec2:0x2_56b0 figure 14-61. receive control frame packet counter register definition table 14-59. rxcf field descriptions bits name description 0?15 ? reserved 16?31 rxcf receive control frame packet counter. increments for each mac control frame received (both pause control frames and control frames unsupported by ieee). 01516 31 r0 0000000000 0 0 0 0 0 rxpf w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46b4; tsec2:0x2_56b4 figure 14-62. receive pause frame packet counter register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-68 freescale semiconductor three-speed ethernet controllers table 14-60 describes the fields of the rxpf register. 14.5.3.7.15receive unknown opcode packet counter register (rxuo) figure 14-63 shows the rxuo register. table 14-61 describes the fields of the rxuo register. 14.5.3.7.16receive alignment error counter register (raln) figure 14-64 shows the raln register. table 14-60. rxpf field descriptions bits name description 0?15 ? reserved 16?31 rxpf receive pause frame packet counter. increments each time a valid pause mac control frame is received. 01516 31 r0 0000000000 0 0 0 0 0 rxuo w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46b8; tsec2:0x2_56b8 figure 14-63. receive unknown opcode packet counter register definition table 14-61. rxuo field descriptions bits name description 0?15 ? reserved 16?31 rxuo receive unknown opcode counter. increments each time a mac control frame is received which contains an opcode other than a pause. 01516 31 r0 0000000000 0 0 0 0 0 raln w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46bc; tsec2:0x2_56bc figure 14-64. receive alignment error counter register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-69 table 14-62 describes the fields of the raln register. 14.5.3.7.17receive frame length error counter register (rflr) figure 14-65 shows the rflr register. table 14-63 describes the fields of the rflr register. 14.5.3.7.18receive code error counter register (rcde) figure 14-66 shows the rcde register. table 14-62. raln field descriptions bits name description 0?15 ? reserved 16?31 raln receive alignment error counter. increments for each received frame from 64 to 1518 (non vlan) or 1522 (vlan) which contains an invalid fcs and is not an integral number of bytes. 01516 31 r0 000000000 00000 0 rflr w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46c0; tsec2:0x2_56c0 figure 14-65. receive frame length error counter register definition table 14-63. rflr field descriptions bits name description 0?15 ? reserved 16?31 rflr receive frame length error counter. increments for each frame received in which the 802.3 length field did not match the number of data bytes actually received (46 ?1500 bytes). the counter does not increment if the length field is not a valid 802.3 length, such as an ethertype value. 01516 31 r0 0000000000 0 0 0 0 0 rcde w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46c4; tsec2:0x2_56c4 figure 14-66. receive code error counter register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-70 freescale semiconductor three-speed ethernet controllers table 14-64 describes the fields of the rcde register. 14.5.3.7.19receive carrier sense error counter register (rcse) figure 14-67 shows the rcse register. table 14-65 describes the fields of the rcse register. 14.5.3.7.20receive undersize packet counter register (rund) figure 14-68 shows the rund register. table 14-64. rcde field descriptions bits name description 0?15 ? reserved 16?31 rcde receive code error counter. increments each time a valid carrier is present and at least one invalid data symbol is detected. 01516 31 r00000000000 0 0 00 0 rcse w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46c8; tsec2:0x2_56c8 figure 14-67. receive carrier sense error counter register definition table 14-65. rcse field descriptions bits name description 0?15 ? reserved 16?31 rcse receive false carrier counter. increments each time a false carrier is detected during idle, as defined by a 1 on tsec n _rx_er and an 0xe on tsec n _rxd. the event is reported along with the statistics generated on the next received frame. only one false carrier condition can be detected and logged between frames. 01516 31 r0 0000000000 0 0 0 0 0 rund w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46cc; tsec2:0x2_56cc figure 14-68. receive undersize packet counter register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-71 table 14-66 describes the fields of the rund register. 14.5.3.7.21receive oversize packet counter register (rovr) figure 14-69 shows the rovr register. table 14-67 describes the fields of the rovr register. 14.5.3.7.22receive fragments counter register (rfrg) figure 14-70 shows the rfrg register. table 14-66. rund field descriptions bits name description 0?15 ? reserved 16?31 rund receive undersize packet counter. increments each time a frame is received which is less than 64 bytes in length and contains a valid fcs and were otherwise well formed. this count does not include range length errors. 01516 31 r0 0000000000 0 0 0 0 0 rovr w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46d0; tsec2:0x2_56d0 figure 14-69. receive oversize packet counter register definition table 14-67. rovr field descriptions bits name description 0?15 ? reserved 16?31 rovr receive oversize packet counter. increments each time a frame is received which exceeded 1518 (non vlan) or 1522 (vlan) and contains a valid fcs and was otherwise well formed. this count does not include range length errors. 0 15 16 31 r0000000000000000 rfrg w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46d4; tsec2:0x2_56d4 figure 14-70. receive fragments counter register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-72 freescale semiconductor three-speed ethernet controllers table 14-68 describes the fields of the rfrg register. 14.5.3.7.23receive jabber counter register (rjbr) figure 14-71 shows the rjbr register. table 14-69 describes the fields of the rjbr register. 14.5.3.7.24receive dropped packet counter register (rdrp) figure 14-72 shows the rdrp register. table 14-68. rfrg field descriptions bits name description 0?15 ? reserved 16?31 rfrg receive fragments counter. increments for each frame received which is less than 64 bytes in length and contains an invalid fcs. this includes integral and non-integral lengths. 01516 31 r0 0000000000 0 0 0 0 0 rjbr w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46d8; tsec2:0x2_56d8 figure 14-71. receive jabber counter register definition table 14-69. rjbr field descriptions bits name description 0?15 ? reserved 16?31 rjbr receive jabber counter. increments for frames received which exceed 1518 (non vlan) or 1522 (vlan) bytes and contain an invalid fcs. this includes alignment errors. 01516 31 r0 0000000000 0 0 0 0 0 rdrp w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46dc; tsec2:0x2_56dc figure 14-72. receive dropped packet counter register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-73 table 14-70 describes the fields of the rdrp register. 14.5.3.7.25transmit byte counter register (tbyt) figure 14-73 shows the tbyt register. table 14-71 describes the fields of the tbyt register. 14.5.3.7.26transmit packet counter register (tpkt) figure 14-74 shows the tpkt register. table 14-70. rdrp field descriptions bits name description 0?15 ? reserved 16?31 rdrp receive dropped packets counter. increments for frames received which are streamed to system but are later dropped due to lack of system resources. 01 31 r0 tbyt w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46e0; tsec2:0x2_56e0 figure 14-73. transmit byte counter register definition table 14-71. tbyt field descriptions bits name description 0?reserved 1?31 tbyt transmit byte counter. increments by the number of bytes that were put on the wire including fragments of frames that were involved with collisions. this count does not include preamble/sfd or jam bytes. this counter does not count if the frame is truncated. 0910 31 r0 000000000 tpkt w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46e4; tsec2:0x2_56e4 figure 14-74. transmit packet counter register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-74 freescale semiconductor three-speed ethernet controllers table 14-72 describes the fields of the tpkt register. 14.5.3.7.27transmit multicast packet counter register (tmca) figure 14-75 shows the tmca register. table 14-73 describes the fields of the tmca register. 14.5.3.7.28transmit broadcast packet counter register (tbca) figure 14-76 shows the tbca register. table 14-72. tpkt field descriptions bits name description 0?9 ? reserved 10?31 tpkt transmit packet counter. increments for each transmitted packet (including bad packets, excessive deferred packets, excessive collision packets, late collision packets, all unicast, broadcast, and multicast packets). 0910 31 r0000000000 tmca w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46e8; tsec2:0x2_56e8 figure 14-75. transmit multicast packet counter register definition table 14-73. tmca field descriptions bits name description 0?9 ? reserved 10?31 tmca transmit multicast packet counter. increments for each multicast valid frame transmitted (excluding broadcast frames). 0910 31 r0000000000 tbca w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46ec; tsec2:0x2_56ec figure 14-76. transmit broadcast packet counter register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-75 table 14-74 describes the fields of the tbca register. 14.5.3.7.29transmit pause control frame counter register (txpf) figure 14-77 shows the txpf register. table 14-75 describes the fields of the txpf register. 14.5.3.7.30transmit deferral packet counter register (tdfr) figure 14-78 shows the tdfr register. table 14-74. tbca field descriptions bits name description 0?9 ? reserved 10?31 tbca transmit broadcast packet counter. increments for each broadcast frame transmitted (excluding multicast frames). 01516 31 r0 0000000000 0 0 0 0 0 txpf w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46f0; tsec2:0x2_56f0 figure 14-77. transmit pause control frame counter register definition table 14-75. txpf field descriptions bits name description 0?15 ? reserved 16?31 txpf transmit pause frame packet counter. increments each time a valid pause mac control frame is transmitted. 0 19 20 31 r0000000000000000 0 0 0 0 tdfr w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46f4; tsec2:0x2_56f4 figure 14-78. transmit deferral packet counter register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-76 freescale semiconductor three-speed ethernet controllers table 14-76 describes the fields of the tdfr register. 14.5.3.7.31transmit excessive deferral packet counter register (tedf) figure 14-79 shows the tedf register. table 14-77 describes the fields of the tedf register. 14.5.3.7.32transmit single collision packet counter register (tscl) figure 14-80 shows the tscl register. table 14-76. tdfr field descriptions bits name description 0?19 ? reserved 20?31 tdfr transmit deferral packet counter. increments for each frame, which was deferred on its first transmission attempt. this count does not include frames involved in co llisions. 0 19 20 31 r0000000000000000 0 0 0 0 tedf w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46f8; tsec2:0x2_56f8 figure 14-79. transmit excessive deferral packet counter register definition table 14-77. tedf field descriptions bits name description 0?19 ? reserved 20?31 tedf transmit excessive deferral packet counter. increments for frames aborted which were deferred for an excessive period of time (3036 byte times). 0 19 20 31 r0000000000000000 0 0 0 0 tscl w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_46fc; tsec2:0x2_56fc figure 14-80. transmit single collision packet counter register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-77 table 14-78 describes the fields of the tscl register. 14.5.3.7.33transmit multiple collision packet counter register (tmcl) figure 14-81 shows the tmcl register. table 14-79 describes the fields of the tmcl register. 14.5.3.7.34transmit late collision packet counter register (tlcl) figure 14-82 shows the tlcl register. table 14-78. tscl field descriptions bits name description 0?19 ? reserved 20?31 tscl transmit single collision packet counter. increments for each frame transmitted which experienced exactly one collision during transmission. 0 19 20 31 r0000000000000000 0 0 0 0 tmcl w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4700; tsec2:0x2_5700 figure 14-81. transmit multiple collision packet counter register definition table 14-79. tmcl field descriptions bits name description 0?19 ? reserved 20?31 tmcl transmit multiple collision packet counter. increments for each frame transmitted which experienced 2-15 collisions (including any late collisions) during transmission as defined using the half_duplex[retransmission maximum] field. 0 19 20 31 r0000000000000000 0 0 0 0 tlcl w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4704; tsec2:0x2_5704 figure 14-82. transmit late collision packet counter register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-78 freescale semiconductor three-speed ethernet controllers table 14-80 describes the fields of the tlcl register. 14.5.3.7.35transmit excessive collision packet counter register (txcl) figure 14-83 shows the txcl register. 14.5.3.7.36transmit total collision counter register (tncl) figure 14-84 shows the tncl register. table 14-80. tlcl field descriptions bits name description 0?19 ? reserved 20?31 tlcl transmit late collision packet counter. increments for each frame transmitted which experienced a late collision during a transmission attempt. 0 19 20 31 r0000000000000000 0 0 0 0 txcl w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4708; tsec2:0x2_5708 figure 14-83. transmit excessive collision packet counter register definition table 14-81. txcl field descriptions bits name description 0?19 ? reserved 20?31 txcl transmit excessive collision packet counter. increments for each frame that experienced 16 collisions during transmission and was aborted. 0 19 20 31 r0000000000000000 0 0 0 0 tncl w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_470c; tsec2:0x2_570c figure 14-84. transmit total collision counter register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-79 table 14-82 describes the fields of the tncl register. 14.5.3.7.37transmit drop frame counter register (tdrp) figure 14-85 shows the tdrp register. table 14-83 describes the fields of the tdrp register. 14.5.3.7.38transmit jabber frame counter register (tjbr) figure 14-86 shows the tjbr register. table 14-82. tncl field descriptions bits name description 0?19 ? reserved 20?31 tncl transmit total collision counter. increments by the number of collisions experienced during the transmission of a frame as defined as the simultaneous presence of signals on the do and rd circuits (that is, transmitting and receiving at the same time). note: this count does not include collisions that result in an excessive collision condition. 01516 31 r0 0000000000 0 0 0 0 0 tdrp w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4714; tsec2:0x2_5714 figure 14-85. transmit drop frame counter register definition table 14-83. tdrp field descriptions bits name description 0?15 ? reserved 16?31 tdrp transmit drop frame counter. increments each time a memory error or an underrun has occurred. 0 19 20 31 r0 0000000000 0 0 0 0 0 0 0 0 0 tjbr w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4718; tsec2:0x2_5718 figure 14-86. transmit jabber frame counter register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-80 freescale semiconductor three-speed ethernet controllers table 14-84 describes the fields of the tjbr register. 14.5.3.7.39transmit fcs error counter register (tfcs) figure 14-87 shows the tfcs register. table 14-85 describes the fields of the tfcs register. 14.5.3.7.40transmit control frame counter register (txcf) figure 14-88 shows the txcf register. table 14-84. tjbr field descriptions bits name description 0?19 ? reserved 20?31 tjbr transmit jabber frame counter. increments for each oversized transmitted frame with an incorrect fcs value. 0 19 20 31 r0 000000000 000000 0 0 0 0 tfcs w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_471c; tsec2:0x2_571c figure 14-87. transmit fcs error counter register definition table 14-85. tfcs field descriptions bits name description 0?19 ? reserved 20?31 tfcs transmit fcs error counter. increments for every valid sized packet with an incorrect fcs value. 0 19 20 31 r00000000000 0 0 0 0 0 0 0 0 0 txcf w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4720; tsec2:0x2_5720 figure 14-88. transmit control frame counter register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-81 table 14-86 describes the fields of the txcf register. 14.5.3.7.41transmit oversize frame counter register (tovr) figure 14-89 shows the tovr register. table 14-87 describes the fields of the tovr register. 14.5.3.7.42transmit undersize frame counter register (tund) figure 14-90 shows the tund register. table 14-86. txcf field descriptions bits name description 0?19 ? reserved 20?31 txcf transmit control frame counter. increments for every valid size frame with a type field signifying a control frame. 0 19 20 31 r0 0000000000 0 0 0 000000 tovr w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4724; tsec2:0x2_5724 figure 14-89. transmit oversized frame counter register definition table 14-87. tovr field descriptions bits name description 0?19 ? reserved 20?31 tovr transmit oversize frame counter. increments for each oversized transmitted frame with a correct fcs value. 0 19 20 31 r00000000000 0 0000 0 0 0 0 tdfr w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4728; tsec2:0x2_5728 figure 14-90. transmit undersize frame counter register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-82 freescale semiconductor three-speed ethernet controllers table 14-88 describes the fields of the tund register. 14.5.3.7.43transmit fragment counter register (tfrg) figure 14-91 shows the tfrg register. table 14-89 describes the fields of the tfrg register. 14.5.3.7.44carry register 1 (car1) carry register bits are cleared when written with a one. figure 14-92 shows the car1 register. table 14-88. tund field descriptions bits name description 0?19 ? reserved 20?31 tdfr transmit undersize frame counter. increments for every frame less then 64 bytes, with a correct fcs value. 0 19 20 31 r00000000000 0 0 0 0 0 0 0 0 0 tfrg w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_472c; tsec2:0x2_572c figure 14-91. transmit fragment counter register definition table 14-89. tfrg field descriptions bits name description 0?19 ? reserved 20?31 tfrg transmit fragment counter. increments for every frame less then 64 bytes, with an incorrect fcs value. 01234 5 67 1415 r c1 64 c1 127 c1 255 c1 511 c1 1k c1 max c1 mgv 00 0 00000 c1 rby w reset 0000_0000_0000_0000 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 r c1 rpk c1 rfc c1 rmc c1 rbc c1 rxc c1 rxp c1 rxu c1 ral c1 rfl c1 rcd c1 rcs c1 run c1 rov c1 rfr c1 rjb c1 rdr w reset 0000_0000_0000_0000 offset tsec1:0x2_4730; tsec2:0x2_5730 figure 14-92. carry register 1 (car1) register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-83 table 14-90 describes the fields of the car1 register. table 14-90. car1 field descriptions bits name description 0 c164 carry register 1 tr64 counter carry bit 1 c1127 carry register 1 tr127 counter carry bit 2 c1255 carry register 1 tr255 counter carry bit 3 c1511 carry register 1 tr511 counter carry bit 4 c11k carry register 1 tr1k counter carry bit 5 c1max carry register 1 trmax counter carry bit 6 c1mgv carry register 1 trmgv counter carry bit 7?14 ? reserved 15 c1rby carry register 1 rbyt counter carry bit 16 c1rpk carry register 1 rpkt counter carry bit 17 c1rfc carry register 1 rfcs counter carry bit 18 c1rmc carry register 1 rmca counter carry bit 19 c1rbc carry register 1 rbca counter carry bit 20 c1rxc carry register 1 rxcf counter carry bit 21 c1rxp carry register 1 rxpf counter carry bit 22 c1rxu carry register 1 rxuo counter carry bit 23 c1ral carry register 1 raln counter carry bit 24 c1rfl carry register 1 rflr counter carry bit 25 c1rcd carry register 1 rcde counter carry bit 26 c1rcs carry register 1 rcse counter carry bit 27 c1run carry register 1 rund counter carry bit 28 c1rov carry register 1 rovr counter carry bit 29 c1rfr carry register 1 rfrg counter carry bit 30 c1rjb carry register 1 rjbr counter carry bit 31 c1rdr carry register 1 rdrp counter carry bit
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-84 freescale semiconductor three-speed ethernet controllers 14.5.3.7.45carry register 2 (car2) carry register bits are cleared when written with a one. figure 14-93 shows the car2 register. table 14-91 describes the fields of the car2 register. 0 11 12 13 14 15 r000000000000 c2 tjb c2 tfc c2 tcf c2 tov w reset 0000_0000_0000_0000 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 r c2 tun c2 tfg c2 tby c2 tpk c2 tmc c2 tbc c2 tpf c2 tdf c2 ted c2 tsc c2 tma c2 tlc c2 txc c2 tnc 0 c2 tdp w reset 0000_0000_0000_0000 offset tsec1:0x2_4734; tsec2:0x2_5734 figure 14-93. carry register 2 (car2) register definition table 14-91. car2 field descriptions bits name description 0?11 ? reserved 12 c2tjb carry register 2 tjbr counter carry bit 13 c2tfc carry register 2 tfcs counter carry bit 14 c2tcf carry register 2 txcf counter carry bit 15 c2tov carry register 2 tovr counter carry bit 16 c2tun carry register 2 tund counter carry bit 17 c2tfg carry register 2 tfrg counter carry bit 18 c2tby carry register 2 tbyt counter carry bit 19 c2tpk carry register 2 tpkt counter carry bit 20 c2tmc carry register 2 tmca counter carry bit 21 c2tbc carry register 2 tbca counter carry bit 22 c2tpf carry register 2 txpf counter carry bit 23 c2tdf carry register 2 tdfr counter carry bit 24 c2ted carry register 2 tedf counter carry bit 25 c2tsc carry register 2 tscl counter carry bit 26 c2tma carry register 2 tmcl counter carry bit 27 c2tlc carry register 2 tlcl counter carry bit 28 c2txc carry register 2 txcl counter carry bit
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-85 14.5.3.7.46carry mask register 1 (cam1) as long as one of the below mask bits is cleared, the corresponding interrupt bit is allowed to cause interrupt indications on output carry. these bits all default to a set state. figure 14-94 shows the cam1 register. table 14-92 describes the fields of the cam1 register. 29 c2tnc carry register 2 tncl counter carry bit 30 ? reserved 31 c2tdp carry register 2 tdrp counter carry bit 012 3 4 5 67 1415 r m1 64 m1 127 m1 255 m1 511 m1 1k m1 max m1 mgv 00 0 00000 m1 rby w reset 1111_1110_0000_0001 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 r m1 rpk m1 rfc m1 rmc m1 rbc m1 rxc m1 rxp m1 rxu m1 ral m1 rfl m1 rcd m1 rcs m1 run m1 rov m1 rfr m1 rjb m1 rdr w reset 1111_1111_1111_1111 offset tsec1:0x2_4738; tsec2:0x2_5738 figure 14-94. carry mask register 1 (cam1) register definition table 14-92. cam1 field descriptions bits name description 0 m164 mask register 1 tr64 counter carry bit mask 1 m1127 mask register 1 tr127 counter carry bit mask 2 m1255 mask register 1 tr255 counter carry bit mask 3 m1511 mask register 1 tr511 counter carry bit mask 4 m11k mask register 1 tr1k counter carry bit mask 5 m1max mask register 1 trmax counter carry bit mask 6 m1mgv mask register 1 trmgv counter carry bit mask 7?14 ? reserved 15 m1rby mask register 1 rbyt counter carry bit mask 16 m1rpk mask register 1 rpkt counter carry bit mask table 14-91. car2 field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-86 freescale semiconductor three-speed ethernet controllers 14.5.3.7.47carry mask register 2 (cam2) as long as one of the below mask bits is cleared, the corresponding interrupt bit is allowed to cause interrupt indications on output carry. these bits default to a set state. figure 14-95 shows the cam2 register. 17 m1rfc mask register 1 rfcs counter carry bit mask 18 m1rmc mask register 1 rmca counter carry bit mask 19 m1rbc mask register 1 rbca counter carry bit mask 20 m1rxc mask register 1 rxcf counter carry bit mask 21 m1rxp mask register 1 rxpf counter carry bit mask 22 m1rxu mask register 1 rxuo counter carry bit mask 23 m1ral mask register 1 raln counter carry bit mask 24 m1rfl mask register 1 rflr counter carry bit mask 25 m1rcd mask register 1 rcde counter carry bit mask 26 m1rcs mask register 1 rcse counter carry bit mask 27 m1run mask register 1 rund counter carry bit mask 28 m1rov mask register 1 rovr counter carry bit mask 29 m1rfr mask register 1 rfrg counter carry bit mask 30 m1rjb mask register 1 rjbr counter carry bit mask 31 m1rdr mask register 1 rdrp counter carry bit mask 0 11 12 13 14 15 r0 0 0 0 0 0 0 0 0 0 0 0 m2 tjb m2 tfc m2 tcf m2 tov w reset 0000_0000_0000_ 1111 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 r m2 tun m2 tfg m2 tby m2 tpk m2 tmc m2 tbc m2 tpf m2 tdf m2 ted m2 tsc m2 tma m2 tlc m2 txc m2 tnc 0 m2 tdp w reset 1111_1111_1111_1111 offset tsec1:0x2_473c; tsec2:0x2_573c figure 14-95. carry mask register 2 (cam2) register definition table 14-92. cam1 field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-87 table 14-93 describes the fields of the cam2 register. 14.5.3.8 hash function registers this section provides detailed descriptions of the registers used for hash functions. all of the registers are 32 bits wide. if the da field of a receive frame is processed through a 32-bit crc generator, the 8 bits of the crc remainder is mapped to a hash table entry. the user can enable a hash entry by setting the appropriate bit. a hash entry usually represents a set of addresses. a hash table hit occurs if the da crc result points to an enabled hash entry. the user must further filter the address. see section 14.6.2.6.2, ?hash table algorithm,? for more information on the hash algorithm. table 14-93. cam2 field descriptions bits name description 0?11 ? reserved 12 m2tjb mask register 2 tjbr counter carry bit mask 13 m2tfc mask register 2 tfcs counter carry bit mask 14 m2tcf mask register 2 txcf counter carry bit mask 15 m2tov mask register 2 tovr counter carry bit mask 16 m2tun mask register 2 tund counter carry bit mask 17 m2tfg mask register 2 tfrg counter carry bit mask 18 m2tby mask register 2 tbyt counter carry bit mask 19 m2tpk mask register 2 tpkt counter carry bit mask 20 m2tmc mask register 2 tmca counter carry bit mask 21 m2tbc mask register 2 tbca counter carry bit mask 22 m2tpf mask register 2 txpf counter carry bit mask 23 m2tdf mask register 2 tdfr counter carry bit mask 24 m2ted mask register 2 tedf counter carry bit mask 25 m2tsc mask register 2 tscl counter carry bit mask 26 m2tma mask register 2 tmcl counter carry bit mask 27 m2tlc mask register 2 tlcl counter carry bit mask 28 m2txc mask register 2 txcl counter carry bit mask 29 m2tnc mask register 2 tncl counter carry bit mask 30 ? reserved 31 m2tdp mask register 2 tdrp counter carry bit mask
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-88 freescale semiconductor three-speed ethernet controllers 14.5.3.8.1 individual address registers 0?7 (iaddr n ) the iaddr n registers, shown in figure 14-96 , are written by the user. these registers represent 256 entries of the individual (unicast) address hash table used in the address recognition process. when the da field of a receive frame is processed through a 32-bit crc generator, the 8 high-order bits (0?7) of the crc remainder are mapped to one of the 256 entries. the user can enable a hash entry by setting the appropriate bit. a hash table hit occurs if the da crc result points to an enabled hash entry. table 14-94 describes the field of the iaddr n registers. 14.5.3.8.2 group address registers 0?7 (gaddr n ) the gaddr n registers are written by the user. together these registers represent 256 entries of the group (multicast) address hash table used in the address recognition process. while the da field of a receive frame is processed through a 32-bit crc generator, the 8 bits of the crc remainder is mapped to one of the 256 entries. the user can enable a hash entry by setting the appropriate bit. a hash table hit occurs if the da crc result points to an enabled hash entry. figure 14-97 shows the gaddr n registers. 0 31 r iaddr n w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4800, 0x2_4804, 0x2_4808, 0x2_480c, 0x2_4810, 0x2_4814, 0x2_4818, 0x2_481c tsec2:0x2_5800, 0x2_5804, 0x2_5808, 0x2_580c, 0x2_5810, 0x2_5814, 0x2_5818, 0x2_581c figure 14-96. iaddr n register definition table 14-94. iaddr n field description bits name description 0?31 iaddr n represents the 32-bit value associated with the corresponding register. iaddr0 contains the high-order 32 bits of the 256-entry hash table and iaddr7 represents the low-order 32 bits. for instance, the msb of iaddr0 correlates to entry 0 and the lsb of iaddr7 correlates to entry 255. 0 31 r gaddr n w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4880, 0x2_4884, 0x2_4888, 0x2_488c, 0x2_4890, 0x2_4894, 0x2_4898, 0x2_489c tsec2:0x2_5880, 0x2_5884, 0x2_5888, 0x2_588c, 0x2_5890, 0x2_5894, 0x2_5898, 0x2_589c figure 14-97. gaddr n register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-89 table 14-95 describes gaddr n . 14.5.3.9 attribute registers this section describes the two tsec frame attribute registers. 14.5.3.9.1 attribute register (attr) the attribute register, shown in figure 14-98 , defines attributes and transaction types used to access buffer descriptors, to write receive data, and to read transmit data. snoop enable attributes may be set for reading buffer descriptors and for reading transmit data. buffer descriptors may be written with attributes that cause allocation into the l2 cache with or without line locking. similarly, sections of a receive frame header may have attributes attached that cause allocation and locking in the l2 cache. this process of specifying a region of each frame to stash into the l2 cache is referred to as extraction, which is specified in conjunction with attreli. attr[elcwt] only has meaning if attreli[el] is non-zero. table 14-96 describes the fields of the attr register. table 14-95. gaddr n field description bits name description 0?31 gaddr n represents the 32-bit value associated with the corresponding register. gaddr0 contains the high-order 32 bits of the 256-entry group hash table and gaddr7 represents the low-order 32 bits. for instance, the msb of gaddr0 correlates to entry 0 and the lsb of gaddr7 correlates to entry 255. 0 1617 181920 212223 24 25 26 31 r000000000000000 0 0 elcwt 0 bdlwt 00 rdsen rbdsen 000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4bf8; tsec2:0x2_5bf8 figure 14-98. attr register definition table 14-96. attr field descriptions bits name description 0?16 ? reserved 17?18 elcwt extracted l2 cache write type. specifies the write transaction type to perform for the extracted data. this occurs only if attreli[el] is non-zero. for maximum performance, it is recommended that if elcwt is set to allocate, bdlwt must also be set to allocate. writes to cache are always performed with snoop. this setting overrides the rdsen bit setting. 00 no allocation performed 01 reserved, no extraction occurs 10 allocate l2 cache line 11 allocate and lock l2 cache line
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-90 freescale semiconductor three-speed ethernet controllers 14.5.3.9.2 attribute extract length and extract index register (attreli) the attreli registers are written by the user to specify the extract index and extract length. figure 14-99 shows the attreli register. table 14-97 describes the fields of the attreli register. 19 ? reserved 20?21 bdlwt buffer descriptor l2 cache write type. specifies the write transaction type to perform for the buffer descriptor for a receive frame. writes to cache are always performed with snoop. 00 no allocation performed. this setting overrides the rbdsen bit setting. 01 reserved 10 allocate l2 cache line 11 allocate and lock l2 cache line 22?23 ? reserved 24 rdsen rx data snoop enable. this bit is superseded by the elcwt settings. 0 disables snooping of all receive frames data to memory unless elcwt specifies l2 allocation 1 enables snooping of all receive frames data to memory 25 rbdsen rxbd snoop enable. this bit is superseded by the bdlwt settings. 0 disables snooping of all receive bd memory accesses unless bdlwt specifies l2 allocation 1 enables snooping of all receive bd memory accesses 26?31 ? reserved 0 1 2 15 16 17 18 31 r00 el 00 ei w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4bfc; tsec2:0x2_5bfc figure 14-99. attreli register definition table 14-97. attreli field descriptions bits name description 0?1 ? reserved 2?15 el extracted length. specifies the number of bytes to extract from the receive frame. the dma controller uses this field to perform extraction. if set to zero, no extraction is performed. 16?17 ? reserved 18?31 ei extracted index. points to the first byte within the receive frame from which to begin extracting data. table 14-96. attr field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-91 14.5.4 ten-bit interface (tbi) this section describes the ten-bit interface (tbi) and the tbi mii set of registers. 14.5.4.1 tbi mii set register descriptions this section describes the tbi mii registers. all tbi registers are 16 bits wide and are accessed at the offset of the tbi physical address. the tbi physical address of the tsec is stored in tbipa. writing to the tbi registers is similar to writing to an external phy, by using the mii management interface. by using tbipa in place of the phy address, in the miimadd[phy address] field, and setting miimadd[register address] to the address offset that corresponds to the desired register (see table 14-98 ), the user can read (set miimcom[read cycle]) or write (writing to miimcon[phy control]) to the tbi block. refer to the tbi physical address register in section 14.5.3.1, ?tsec general control and status registers,? and the tbi mii register set in table 14-98 . note that jitter diagnostics and tbi control are not ieee 802.3 required registers and are only used for test and control of the tsec tbi block. the tbi?s tbi control register (tbi) is for configuring the tsec ten-bit interface block. however, because this tbi block has an mii management interface (just like any other phy), it has an ieee 802.3 register called the control register (cr). table 14-98. tbi mii register set offset name access size section/page ten-bit interface (tbi) registers 14.5.4/14-91 0x00 control (cr) r/w 1 1 r = means read only, wo = write only, r/w = read and write, lh = latches high, ll = latches low, sc = self-clearing. 16 bits 14.5.4.2/14-92 0x01 status (sr) r, lh, ll 16 bits 14.5.4.3/14-93 0x02?0x03 reserved r 2 bytes ? 0x04 an advertisement (ana) rw, r 16 bits 14.5.4.3/14-93 0x05 an link partner base page ability (anlpbpa) r 16 bits 14.5.4.5/14-96 0x06 an expansion (anex) r, lh 16 bits 14.5.4.6/14-98 0x07 an next page transmit (annpt) r/w, r 16 bits 14.5.4.7/14-98 0x08 an link partner ability next page (anlpanp) r 16 bits 14.5.4.8/14-99 0x0f extended status (exst) r 16 bits 14.5.4.9/14-100 0x10 jitter diagnostics (jd) r/w 16 bits 14.5.4.10/14-101 0x11 tbi control (tbicon) r/w 16 bits 14.5.4.11/14-102
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-92 freescale semiconductor three-speed ethernet controllers 14.5.4.2 control register (cr) figure 14-100 shows the cr register. table 14-99 describes the fields of the cr register. 0 1 2 3 4 5 6 7 8 9 10 15 r phy reset 0 speed_0 an enable 00 reset an full duplex 0 speed_1 0 0000 0 w reset 0001_0001_0100_0000 offset tbipa offset + 0x00 figure 14-100. control register definition table 14-99. cr field descriptions bits name description 0 phy reset phy reset. this bit is cleared by default. this bit is self-clearing. 0 normal operation. 1 the control and status registers are returned to their default value. this in turn may change the internal state of the tbi and its link partner. 1?reserved 2 speed_0 speed selection. this bit defaults to a cleared state and must always be cleared, which corresponds to 1-gbps speed. 3 an enable auto-negotiation enable. this bit is set by default. 0 the values programmed in bits 2, 7 and 9 determine the operating condition of the link. 1 auto-negotiation process enabled 4?5 ? reserved 6 reset an reset auto-negotiation. this bit is cleared by default and is self-clearing. 0 normal operation 1 the auto-negotiation process restarts. this action is only available if auto-negotiation is enabled. 7 full duplex duplex mode. this bit is set by default. 0 half-duplex operation 1 full-duplex operation 8 ? reserved, must be cleared.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-93 14.5.4.3 status register (sr) figure 14-101 shows the sr register. table 14-100 describes the fields of the sr register. 9 speed_1 speed selection. defaults to a set state and must always be set, which corresponds to 1 gbps 10?15 ? reserved 06789101112131415 r 00 0000 0 extend status 0 no pre an done remote fault an ability link status 0 extend ability w reset 0000_0001_0100_1001 offset tbipa offset + 0x01 figure 14-101. status register definition table 14-100. sr descriptions bits name description 0?6 ? reserved, must be cleared. 7extend status indicates that phy status information is also contained in the extended status register. returns 1 on read. this bit is read-only. 8 ? reserved, must be cleared. 9no pre mf preamble suppression enable. this bit indicates whether or not the phy is capable of handling mii management frames without the 32-bit preamble field. returns 1, indicating support for suppressed preamble mii management frames. this bit is read-only. 10 an done auto-negotiation complete. this bit is read-only and is cleared by default. 0 either the auto-negotiation process is underway or the auto-negotiation function is disabled. 1 the auto-negotiation process has completed. 11 r em ote fault remote fault. this bit is read-only and is cleared by default. each read of sr clears this bit. 0 normal operation 1 a remote fault condition was detected. latches high for software to detect the condition. table 14-99. cr field descriptions (continued) bits name description maximum operating speed bit 2 bit 9 reserved 0 0 reserved 1 0 1 gbps 0 1 reserved 1 1
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-94 freescale semiconductor three-speed ethernet controllers 14.5.4.4 an advertisement register (ana) figure 14-102 shows the ana register. table 14-101 describes the fields of the ana register. 12 an ability auto-negotiation ability. while read as set, this bit indicates that the phy has the ability to perform auto-negotiation. while read as cleared, this bit indicates the phy lacks the ability to perform auto-negotiation. returns 1 on read. this bit is read-only. 13 link status link status. this bit is read-only and is cleared by default. 0 a valid link is not established. latches low allowing for software polling to detect a failure condition. 1 a valid link is established. 14 ? reserved, must be cleared. 15 extend ability extended capability. this bit indicates that the phy contains the extended set of registers (those beyond control and status). returns 1 on read. this bit is read-only. 01234 6 7 8 9 1011 15 r next page ack remote fault 00 0 pause half duplex full duplex 00 0 0 0 w reset 0000_0000_0000_0000 offset tbipa offset + 0x04 figure 14-102. an advertisement register definition table 14-101. ana field descriptions bits name description 0next page next page configuration. the local device sets this bit to either request next page transmission or advertise next page exchange capability. 0 the local device wishes not to engage in next page exchange. 1 the local device has no next pages but wishes to allow reception of next pages. if the local device has no next pages and the link partner wishes to send next pages, the local device shall send null message codes and have the message page set to 0b000_0000_0001, as defined in annex 28c of the ieee 802.3 specification . 1 ack acknowledge. write 0, ignore on read.this bit is read-only. (reserved) table 14-100. sr descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-95 2?3 remote fault the local device?s remote fault condition is encoded in bits 2 and 3 of the base page. values are shown in the following table. the default value is 00. indicate a fault by setting a non-zero remote fault encoding and re-negotiating. 4?6 ? reserved, must be cleared. 7?8 pause the local device?s pause capability is encoded in bits 7 and 8, and the decodes are shown in the following table. for priority resolution information consult table 14-102 . 9half duplex half-duplex capability 0 designates local device as not capable of half-duplex operation. 1 designates local device as capable of half-duplex operation. 10 full duplex full-duplex capability 0 designates the local device as not capable of full-duplex operation. 1 designates the local device as capable of full-duplex operation. 11?15 ? reserved, must be cleared. table 14-101. ana field descriptions (continued) bits name description rf1 bit[3] rf2 bit[2] description 0 0 no error, link ok 0 1 offline 1 0 link_failure 1 1 auto-negotiation_error pause bit[8] asm_dir bit[7] capability 0 0 no pause 0 1 asymmetric pause toward link partner 10symmetric pause 1 1 both symmetric pause and asymmetric pause toward local device
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-96 freescale semiconductor three-speed ethernet controllers table 14-102 describes the resolution of pause priority. 14.5.4.5 an link partner base page ability register (anlpbpa) figure 14-103 shows the anlpbpa register. table 14-102. pause priority resolution local device link partner local resolution link partner resolution pause asm_dir pause asm_dir 0 0 x x disable pause transmit disable pause receive disable pause transmit disable pause receive 0 1 0 x disable pause transmit disable pause receive disable pause transmit disable pause receive 0 1 1 0 disable pause transmit disable pause receive disable pause transmit disable pause receive 0 1 1 1 enable pause transmit disable pause receive disable pause transmit enable pause receive 1 0 0 x disable pause transmit disable pause receive disable pause transmit disable pause receive 1 0 1 x enable pause transmit enable pause receive enable pause transmit enable pause receive 1 1 0 0 disable pause transmit disable pause receive disable pause transmit disable pause receive 1 1 0 1 disable pause transmit enable pause receive enable pause transmit disable pause receive 1 1 1 x enable pause transmit enable pause receive enable pause transmit enable pause receive 012 34 67 8 9 10 11 15 rnext page ack remote fault 000 pause half duplex full duplex 000 0 0 w reset 0000_0000_0000_0000 offset tbipa offset + 0x05 figure 14-103. an link partner base page ability register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-97 table 14-103 describes the fields of the anlpbpa register. table 14-103. anlpbpa field descriptions bits name description 0next page next page. this bit is read-only. the link partner sets or clears this bit. 0 link partner has no subsequent next pages or is not capable of receiving next pages 1 link partner either requesting next page transmission or indicating the capability to receive next pages 1 ack acknowledge. ignore on read. this bit is read-only 2?3 remote fault the link partner?s remote fault condition is encoded in bits 2 and 3 of the base page. values are shown in the remote fault encoding field table below. this bit is read-only. 4?6 ? reserved, must be cleared. 7?8 pause encoding of the link partner?s pause capability is shown in the pause encoding table below. for priority resolution information consult the ieee 802.3 specification. this bit is read-only 9half duplex half-duplex capability. this bit is read-only. 0 link partner is not capable of half-duplex mode 1 link partner is capable of half-duplex mode 10 full duplex full-duplex capability. this bit is read-only. 0 link partner is not capable of full-duplex mode 1 link partner is capable of full-duplex mode 11?15 ? reserved, must be cleared. rf1 bit[3] rf2 bit[2] description 0 0 no error, link ok 0 1 offline 1 0 link_failure 1 1 auto-negotiation_error pause bit[8] asm_dir bit[7] capability 0 0 no pause 0 1 asymmetric pause toward link partner 10symmetric pause 1 1 both symmetric pause and asymmetric pause toward local device
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-98 freescale semiconductor three-speed ethernet controllers 14.5.4.6 an expansion register (anex) figure 14-104 shows the anex register. table 14-104 describes the fields of the anex register. 14.5.4.7 an next page transmit register (annpt) figure 14-105 shows the annpt register. 0 12 13 14 15 r 0000000000000 np able page rx?d 0 w reset 0000_0000_0000_0110 offset tbipa offset + 0x06 figure 14-104. an expansion register definition table 14-104. anex field descriptions bits name description 0?12 ? reserved, must be cleared. 13 np able next page able. this bit is read-only and returns 1 on read. while read as set, indicates local device supports next page function 14 page rx?d page received. this bit is read-only. the bit clears on a read to the register. 0 normal operation 1 a new page was received and stored in the applicable an link partner ability or an next page register. this bit latches high in order for software to detect while polling. 15 ? reserved, must be cleared. 012 345 15 r next page ack msg page ack2 toggle message/unformatted code field w reset 0000_0000_0000_0000 offset tbipa offset + 0x07 figure 14-105. an next page transmit register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-99 table 14-105 describes the fields of the annpt register. 14.5.4.8 an link partner ability next page register (anlpanp) figure 14-106 shows the anlpanp register. table 14-106 describes the anlpanp fields. table 14-105. annpt field descriptions bits name description 0 next page next page indication. [reference mii bit 7.15 in ieee 802.3, 2000 edition clause 28.2.4] 0 last page 1 additional next pages to follow 1 ack acknowledge. write 0, ignore on read. [reference mii bit 7.14] this bit is read-only. 2 msg page message page. [reference mii bit 7.13] 0 unformatted page 1 message page 3 ack2 acknowledge 2. used by the next page function to indicate that the device has the ability to comply with the message. [reference mii bit 7.12] 0 the local device cannot comply with message. 1 the local device complies with message. 4 toggle toggle. used to ensure synchronization with the link partner during next page exchange. this bit always takes the opposite value of the toggle bit of the previously-exchanged link code word. the initial value in the first next page transmitted is the inverse of bit 11 in the base link code word. [reference mii bit 7.11] this bit is read-only. 0 toggle bit of the previously-exchanged link code word was set 1 toggle bit of the previously-exchanged link code word was clear 5?15 message/ unformatted code field message pages are formatted pages that carry a pre-defined message code, which is enumerated in ieee 802.3u/annex 28c. unformatted code fields take on an arbitrary value. [reference mii field 7.10:0] 012 345 15 r next page ack msg page ack2 toggle message/unformatted code field w reset 0000_0000_0000_0000 offset tbipa offset + 0x08 figure 14-106. an link partner ability next page register definition table 14-106. anlpanp field descriptions bits name description 0 next page next page. the link partner sets and clears this bit. 0 last page from link partner 1 additional next pages to follow 1 ack acknowledge. ignore on read. [reference mii bit 8.14] this bit is read-only.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-100 freescale semiconductor three-speed ethernet controllers 14.5.4.9 extended status register (exst) figure 14-107 shows the exst register. table 14-107 describes the fields of the exst register. 2 msg page message page 0 unformatted page 1 message page 3 ack2 acknowledge 2. indicates the link partner?s ability to comply with the message 0 link partner cannot comply with message 1 link partner complies with message 4 toggle toggle. used to ensure synchronization with the link partner during next page exchange. this bit always takes the opposite value of the toggle bit of the previously-exchanged link code word. the initial value in the first next page transmitted is the inverse of bit 11 in the base link code word. this bit is read-only. 0 toggle bit of the previously-exchanged link code word was set 1 toggle bit of the previously-exchanged link code word was clear 5?15 message/ unformatted code field message pages are formatted pages that carry a pre-defined message code, which is enumerated in ieee 802.3u/annex 28c. unformatted code fields take on an arbitrary value. 01234 15 r 1000x full 1000x half 1000t full 1000t half 000000000000 w reset 1010_0000_0000_0000 offset tbipa offset + 0x0f figure 14-107. extended status register definition table 14-107. exst field descriptions bits name description 0 1000x full 1000x full-duplex capability. returns 1 on read. this bit is read-only. 0 phy cannot operate in 1000base-x full-duplex mode 1 phy can operate in 1000base-x full-duplex mode 1 1000x half 1000x half-duplex capability. returns 0 on read. this bit is read-only. 0 phy cannot operate in 1000base-x half-duplex mode 1 phy can operate in 1000base-x half-duplex mode 2 1000t full 1000t full-duplex capability. returns 1 on read. this bit is read-only. 0 phy cannot operate in 1000base-t full-duplex mode 1 phy can operate in 1000base-t full-duplex mode table 14-106. anlpanp field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-101 14.5.4.10 jitter diagnostics register (jd) annex 36a in ieee 802.3z describes several jitter test patterns. these can be configured to be sent by writing the jitter diagnostics register. see the register description for more information. it may be wise to auto-negotiate and advertise a remote fault, signaling offline, prior to beginning the test patterns. figure 14-108 shows the jd register. 3 1000t half 1000t half-duplex capability. returns 0 on read. this bit is read-only. 0 phy cannot operate in 1000base-t half-duplex mode 1 phy can operate in 1000base-t half-duplex mode 4?15 ? reserve 0 1 3456 15 r jitter enable jitter select 00 custom jitter pattern w reset 0000_0000_0000_0000 offset tbipa offset + 0x10 figure 14-108. jitter diagnostics register definition table 14-107. exst field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-102 freescale semiconductor three-speed ethernet controllers table 14-108 describes the fields of the jd register. 14.5.4.11 tbi control register (tbicon) figure 14-109 shows the tbicon register. table 14-108. jd field description bits name description 0 jitter enable jitter enable. this bit is cleared by default. 0 normal transmit operation 1 enable the tbi to transmit the jitter test patterns defined in annex 36a of the ieee 802.3 specification . 1?3 jitter select selects the jitter pattern to be transmitted in diagnostics mode. encoding of this field is shown in the following table. default is 0 4?5 ? reserved 6?15 custom jitter pattern used in conjunction with jitter (pattern) select and jitter (diagnostic) enable; set this field to the desired custom pattern which is continuously transmitted. its default is 0. 0 1 2 3 4 6 789101112131415 r soft_reset 0 disable rx dis disable tx dis 000 an sense 00 clock select mii mode 00 00 w reset 0000_0000_0000_0000 offset tbipa offset + 0x11 figure 14-109. tbi control register definition jitter pattern select bit[1] bit[2] bit[3] user defined uses custom jitter pattern, bits 6?15 0 0 0 high frequency (d21.5) 1010101010101010101010101010101010101010? 001 mixed frequency (k28.5) 111110101 1000001010011111010110000010100? 010 low frequency 1111100 0001111 100000 1111 100000 1111 100000? 011 complex pattern (10?h17c,10?h0c9,10?h0e5,10?h2a3, 10?h17c,...) 1 0 0 square wave (-k28.7) 001111100000 111110 0000 1111100 0001111 1000? 101 reserved 1 1 0
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-103 table 14-109 describes the fields of the tbicon register. 14.6 functional description this section describes many of the functions of the tsec controller. 14.6.1 connecting to physical interfaces this section describes how to connect the tsec to various interfaces: mii, gmii, rgmii, rtbi and tbi. to avoid confusion, all of the buses follow the bus conventions used in the ieee 802.3 specification, because each phy follows the same convention. (for instance, in the bus tsec n _txd[7:0], bit 7 is the msb and bit 0 is the lsb). table 14-109. tbicon field descriptions bits name description 0 soft_reset soft reset. this bit is cleared by default. 0 normal operation 1 resets the functional modules in thetbi 1 ? reserved. (ignore on read) 2 disable rx dis disable receive disparity. this bit is cleared by default. 0 normal operation 1 disables the running disparity calculation and checking in the receive direction 3 disable tx dis disable transmit disparity. this bit is cleared by default. 0 normal operation 1 disables the running disparity calculation and checking in the transmit direction 4?6 ? reserved 7an sense auto-negotiation sense enable. this bit is cleared by default. 0 ieee 802.3z clause 37 behavior is desired, which results in the link not completing. 1 allow the auto-negotiation function to sense either a gigabit mac in auto-negotiation bypass mode or an older gigabit mac without auto-negotiation capability. if sensed, auto-negotiation complete becomes true; however, the page received is low, indicating no page was exchanged. management can then act accordingly. 8?9 ? reserved 10 clock select clock select. this bit is cleared by default. 0 allow the tbi to accept dual split-phase 62.5-mhz receive clocks. 1 configure the tbi to accept a 125-mhz receive clock from the serdes/phy. the 125-mhz clock must be physically connected to ?pma receive clock 0?. 11 mii mode this bit describes the configuration mode of the tbi. the user reads a 1 while the tbi is configured in gmii/mii mode (connected to a gmii/mii phy) and a 0 while configured in tbi mode (connected to a 1000base-x serdes). its value is the inverse of ecntrl[tbim]. 0tbi mode 1 gmii mode 12?15 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-104 freescale semiconductor three-speed ethernet controllers 14.6.1.1 media-independent interface (mii) this section describes the media-independent interface (mii) intended to be used between the phys and the tsec. figure 14-110 shows the basic components of the mii including the signals required to establish tsec module connection with a phy. figure 14-110. tsec-mii connection an mii interface has 18 signals (including the ec_mdc and ec_mdio signals), as defined by the ieee 802.3u standard, for connecting to an ethernet phy. 14.6.1.2 gigabit media-independent interface (gmii) this section describes the gigabit media-independent interface (gmii) intended to be used between the phys and the tsec. figure 14-111 shows the basic components of the gmii including the signals required to establish the tsec module connection with a phy. transmit error (tsec n _tx_er) transmit data (tsec n _txd[3:0]) transmit enable (tsec n _tx_en) transmit clock (tsec n _tx_clk) collision detect (tsec n _col) receive data (tsec n _rxd[3:0]) receive error (tsec n _rx_er) receive clock (tsec n _rx_clk) receive data valid (tsec n _rx_dv) carrier sense output (tsec n _crs) management data i/o1 (ec_mdio) management data clock1 (ec_mdc) tsec 10/100 phy medium 1 the management signals (ec_mdc and ec_mdio) are common to all of the ethernet controllers? connections in the system, assuming that each phy has a different management address. ethernet
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-105 figure 14-111. tsec-gmii connection a gmii interface has 28 signals (tsec n _gtx_clk + ec_gtx_clk125 included), as defined by the ieee 802.3u standard, for connecting to an ethernet phy. 14.6.1.3 reduced gigabit media-independent interface (rgmii) this section describes the reduced gigabit media-independent interface (rgmii) intended to be used between the phys and the gmii mac. the rgmii is an alternative to the ieee802.3u mii, the ieee802.3z gmii, and the tbi. the rgmii reduces the number of signals required to interconnect the mac and the phy from a maximum of 28 signals (gmii) to 15 signals (ec_gtx_clk125 included) in a cost-effective and technology-independent manner. to accomplish this objective, the data paths and all associated control signals are multiplexed using both edges of the clock. for gigabit operation, the clocks operate at 125 mhz, and for 10/100 operation, the clocks operate at 2.5 mhz or 25 mhz, respectively. figure 14-112 shows the basic components of the gigabit reduced media-independent interface and the signals required to establish the gigabit ethernet controllers? module connection with a phy. the rgmii is implemented as defined by the rgmii specification version 1.2a 9/22/00. transmit error (tsec n _tx_er) transmit nibble data (tsec n _txd[7:0]) transmit enable (tsec n _tx_en) transmit clock (tsec n _tx_clk) collision detect (tsec n _col) receive nibble data (tsec n _rxd[7:0]) receive error (tsec n _rx_er) receive clock (tsec n _rx_clk) receive data valid (tsec n _rx_dv) carrier sense output (tsec n _crs) management data i/o1 (ec_mdio) management data clock1 (ec_mdc) tsec gigabit phy medium 1 the management signals (ec_mdc and ec_mdio) are common to all of the ethernet controllers? connections in the system, assuming that each phy has a different management address. gigabit reference clock (ec_gtx_clk125) gigabit transmit clock (tsec n _gtx_clk) ethernet
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-106 freescale semiconductor three-speed ethernet controllers figure 14-112. tsec-rgmii connection 14.6.1.4 ten-bit interface (tbi) this section describes the ten-bit interface (tbi) intended to be used between the phys and the tsec to implement a standard serdes interface for optical-fiber devices in 1000base-sx/lx applications. figure 14-113 shows the basic components of the tbi including the signals required to establish tsec module connection with a phy. rbc0 and rbc1 are differential 62.5-mhz receive clocks. transmit data (tsec n _txd[3:0]/tsec n _txd[7:4]) transmit control (tx_en/f(tx_en,tx_er)) gigabit transmit clock (tsec n _gtx_clk) receive data (tsec n _rxd[3:0]/tsec n _rxd[7:4]) receive control (rx_dv/f(rx_dv,rx_er)) receive clock (tsec n _rx_clk) management data i/o1 (ec_mdio) management data clock1 (ec_mdc) tsec medium 1 the management signals (ec_mdc and ec_mdio) are common to all of the gigabit ethernet controlle rs module connections in the system, assuming that each phy has a different management address . gigabit reference clock (ec_gtx_clk125) gigabit phy ethernet
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-107 figure 14-113. tsec-tbi connection a tbi interface has 27 signals (ec_gtx_clk125 included) for connecting to an ethernet phy, as defined by ieee 802.3z gmii and tbi standards. 14.6.1.5 reduced ten-bit interface (rtbi) this section describes the reduced ten-bit interface (rtbi) intended to be used between the phys and the tsec to implement a reduced signal count version of a serdes interface for optical-fiber devices in 1000base-sx/lx applications. figure 14-114 shows the basic components of the rtbi including the signals required to establish tsec module connection with a phy. transmit data (tsec n _txd[9:0]) gigabit transmit clock (tsec n _gtx_clk) receive data (tsec n _rxd[9:0]) tbi receive clock 0 (tsec n _rx_clk0) tbi receive clock 1 (tsec n _rx_clk1) management data i/o1 (ec_mdio) management data clock1 (ec_mdc) tsec gigabit phy medium 1 the management signals (ec_mdc and ec_mdio) are common to all of the ethernet controllers? connections in the system, assuming that each phy has a different management address. gigabit reference clock (ec_gtx_clk125) signal detect (sdet) ethernet
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-108 freescale semiconductor three-speed ethernet controllers figure 14-114. tsec-rtbi connection a rtbi interface has 15 signals (ec_gtx_clk125 included), as defined by the rgmii specification version 1.2a 9/22/00, and is intended to be an alternative to the ieee 802.3u mii, the ieee 802.3z gmii and the tbi standard for connecting to an ethernet phy. table 14-110 describes the signal multiplexing for gmii, mii and tbi interfaces. table 14-110. gmii, mii, and tbi signal multiplexing tsec signals frequency [mhz] 125 voltage[v] 3.3/2.5 gmii interface frequency [mhz] 125 voltage[v] 3.3 mii interface frequency [mhz] 25 voltage[v] 3.3 tbi interface frequency [mhz] 62.5 voltage[v] 3.3 signals (tsec n _) i/o no. of signals signals (tsec n _) i/o no. of signal s signals (tsec n _) i/o no. of signal s signals (tsec n _) i/o no. of signal s gtx_clk o 1 gtx_clk o 1 gtx_clk o 1 tx_clk i 1 tx_clk i 1 tx_clk i 1 rx_clk1 i 1 txd[0] o 1 txd[0] o 1 txd[0] o 1 tcg[0] o 1 txd[1] o 1 txd[1] o 1 txd[1] o 1 tcg[1] o 1 txd[2] o 1 txd[2] o 1 txd[2] o 1 tcg[2] o 1 txd[3] o 1 txd[3] o 1 txd[3] o 1 tcg[3] o 1 txd[4] o 1 txd[4] o 1 tcg[4] o 1 txd[5] o 1 txd[5] o 1 tcg[5] o 1 txd[6] o 1 txd[6] o 1 tcg[6] o 1 txd[7] o 1 txd[7] o 1 tcg[7] o 1 transmit data (tsec n _txd[4:0]/tsec n _txd[9:5]) gigabit transmit clock (tsec n _gtx_clk) receive data (tsec n _rxd[4:0]/tsec n _rxd[9:5]) receive clock (tsec n _rx_clk) management data i/o1 (ec_mdio) management data clock1 (ec_mdc) tsec gigabit phy medium 1 the management signals (ec_mdc and ec_mdio) are common to all of the ethernet controllers? connections in the system, assuming that each phy has a different management address. gigabit reference clock (ec_gtx_clk125) ethernet
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-109 table 14-111 describes the signal multiplexing for rgmii and rtbi interfaces. tx_en o 1 tx_en o 1 tx_en o 1 tcg[8] o 1 tx_er o 1 tx_er o 1 tx_er o 1 tcg[9] o 1 rx_clk i 1 rx_clk i 1 rx_clk i 1 rx_clk0 i 1 rxd[0] i 1 rxd[0] i 1 rxd[0] i 1 rcg[0] i 1 rxd[1] i 1 rxd[1] i 1 rxd[1] i 1 rcg[1] i 1 rxd[2] i 1 rxd[2] i 1 rxd[2] i 1 rcg[2] i 1 rxd[3] i 1 rxd[3] i 1 rxd[3] i 1 rcg[3] i 1 rxd[4] i 1 rxd[4] i 1 rcg[4] i 1 rxd[5] i 1 rxd[5] i 1 rcg[5] i 1 rxd[6] i 1 rxd[6] i 1 rcg[6] i 1 rxd[7] i 1 rxd[7] i 1 rcg[7] i 1 rx_dv i 1 rx_dv i 1 rx_dv i 1 rcg[8] i 1 rx_er i 1 rx_er i 1 rx_er i 1 rcg[9] i 1 col i 1 col i 1 crs i 1 crs i 1 sdet i 1 sum 25 sum 23 sum 16 sum 24 table 14-111. rgmii and rtbi signal multiplexing tsec signals frequency [mhz] 125 voltage[v] 3.3/2.5 rgmii interface frequency [mhz] 125 voltage[v] 2.5 rtbi interface frequency [mhz] 62.5 voltage[v] 2.5 signals (tsec n _) i/o no. of signal s signals (tsec n _) i/o no. of signal s signals (tsec n _) i/o no. of signals gtx_clk o 1 gtx_clk o 1 gtx_clk o 1 tx_clk i 1 txd[0] o 1 txd[0]/txd[4] o 1 tcg[0]/tcg[5] o 1 txd[1] o 1 txd[1]/txd[5] o 1 tcg[1]/tcg[6] o 1 txd[2] o 1 txd[2]/txd[6] o 1 tcg[2]/tcg[7] o 1 txd[3] o 1 txd[3]/txd[7] o 1 tcg[3]/tcg[8] o 1 table 14-110. gmii, mii, and tbi signal multiplexing (continued) tsec signals frequency [mhz] 125 voltage[v] 3.3/2.5 gmii interface frequency [mhz] 125 voltage[v] 3.3 mii interface frequency [mhz] 25 voltage[v] 3.3 tbi interface frequency [mhz] 62.5 voltage[v] 3.3
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-110 freescale semiconductor three-speed ethernet controllers txd[4] o 1 txd[5] o 1 txd[6] o 1 txd[7] o 1 tx_en o 1 tx_ctl (tx_en/tx_err) o1tcg[4]/tcg[9]o1 tx_er o 1 rx_clk i 1 rx_clk i 1 rx_clk i 1 rxd[0] i 1 rxd[0]/rxd[4] i 1 rcg[0]/rcg[5] i 1 rxd[1] i 1 rxd[1]/rxd[5] i 1 rcg[1]/rcg[6] i 1 rxd[2] i 1 rxd[2]/rxd[6] i 1 rcg[2]/rcg[7] i 1 rxd[3] i 1 rxd[3]/rxd[7] i 1 rcg[3]/rcg[8] i 1 rxd[4] i 1 rxd[5] i 1 rxd[6] i 1 rxd[7] i 1 rx_dv i 1 rx_ctl (rx_dv/rx_err) i 1 rcg[4]/rcg[9] i 1 rx_er i 1 col i 1 crs i 1 sum 25 sum 12 sum 12 table 14-111. rgmii and rtbi signal multiplexing (continued) tsec signals frequency [mhz] 125 voltage[v] 3.3/2.5 rgmii interface frequency [mhz] 125 voltage[v] 2.5 rtbi interface frequency [mhz] 62.5 voltage[v] 2.5 signals (tsec n _) i/o no. of signal s signals (tsec n _) i/o no. of signal s signals (tsec n _) i/o no. of signals
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-111 table 14-112 describes the signals shared by all interfaces. 14.6.2 gigabit ethernet channel operation this section describes the operation of the tsec. first, the software initialization sequence is described. next, the software (ethernet driver) interface for transmitting and receiving frames is reviewed. address recognition and hash table algorithm features are also discussed. the section concludes with interrupt handling, inter-packet gap time, and loop back descriptions. 14.6.2.1 initialization sequence this section describes which registers are reset due to a hard or software reset and what registers the user must initialize prior to enabling the tsec. 14.6.2.1.1 hardware-controlled initialization a hard reset occurs when the system powers up. all tsec registers and control logic are reset to their default states after a hard reset has occurred. 14.6.2.1.2 user initialization after the system has undergone a hard reset, software must initialize certain basic tsec registers. other registers can also be initialized during this time, but they are optional and must be determined based on the requirements of the system. the module memory map in table 14-3 lists all the tsec registers. table 14-113 describes the minimum steps for register initialization. table 14-112. shared signals signals i/o # of signals function ec_mdio i/o 1 management interface i/o ec_mdc o 1 management interface clock ec_gtx_clk125 i 1 reference clock sum 3 table 14-113. steps of minimum register initialization description 1. set, then clear maccfg1 [soft_reset] 2. initialize maccfg2 3. initialize mac station address
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-112 freescale semiconductor three-speed ethernet controllers after the registers are initialized, the user must execute the following steps in the order described below to bring the tsec into a functional state (out of reset): 1. for the transmission of ethernet frames, txbds must first be built in memory, linked together as a ring, and pointed to by the tbase register. a minimum of two buffer descriptors per ring is required. setting the ring to a size of one causes the same frame to be transmitted twice. 2. likewise, for the reception of ethernet frames, the receive queue must be ready, with its rxbd pointed to by the rbase register. both transmit and receive can be gracefully stopped after transmission and reception begins. 3. write to maccfg1 and set the appropriate bits. these need to include rx_en and tx_en. to enable flow control, rx_flow and tx_flow must also be set. 4. clearing dmactrl[gts] triggers the transmission of frame data if the transmitter had been previously stopped. dmactrl[grs] must be cleared if the receiver had been previously stopped. see section 14.5.3.1.7, ?dma control register (dmactrl),? and section 14.6.3.1, ?transmit data buffer descriptor (txbd),? for more information. 14.6.2.2 soft reset and reconfiguring procedure before issuing a soft reset to and/or reconfiguring the mac with new parameters, user must properly shutdown the dma and make sure it is in an idle state for the entire duration. user must gracefully stop the dma by setting both grs and gts bits in the dmactrl register, then wait for both grsc and gtsc bits to be set in the ievent register before resetting the mac or changing parameters. both grs and gts bits must be cleared before re-enabling the mac to resume the dma. during the mac configuration, if a new set of tx buffer descriptors are used, the user must load the pointers into the tbase register. likewise if a new set of rx buffer descriptors are used, the rbase register must be written with the new pointer. 4. set up the phy using the mii mgmt interface 5. configure the tbi control to tbi or gmii 6. clear ievent 7. initialize imask 8. initialize iaddr n 9. initialize gaddr n 10. initialize rctrl 11. initialize dmactrl table 14-113. steps of minimum register initialization (continued) description
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-113 following is a procedure to gracefully reset and reconfigure the mac: 1. set gts bit in dmactrl register. 2. poll gtsc bit in ievent register until detected as set. 3. clear both rx_en and tx_en bits in maccfg1. 4. wait for a period of 9.6 kbytes worth of data on the interface (~8ms worst case). 5. set grs bit in dmactrl register. 6. poll grsc bit in ievent register until detected as set. 7. set soft_reset bit in maccfg1 register. 8. clear soft_reset bit in maccfg1 register. 9. load tbase with new txbd pointer. 10. load rbase with new rxbd pointer. 11. set up other mac registers (maccfg2, maxfrm, and so on). 12. set wwr and wop bits in dmactrl register. 13. clear thlt bit in tstat register and qhlt bit in rstat register by writing 1 to these bits. 14. clear grs/gts bits in dmactrl. (do not change other bits.) 15. enable tx_en/rx_en in maccfg1 register. 14.6.2.3 gigabit ethernet frame transmission the ethernet transmitter requires little core intervention. after the software driver initializes the system, the tsec begins to poll the first transmit buffer descriptor (txbd) in the txbd ring every 512 transmit clocks. if txbd[r] is set, tsec begins moving transmit buffer from memory to its tx fifo. the transmitter takes data from the tx fifo and transmits data to the mac. the mac transmits the data through the gmii interface to the physical media. the transmitter, once initialized, runs until the end-of-frame (eof) condition is detected unless a collision within the collision window occurs (half-duplex mode) or an abort condition is encountered. if the user has a frame ready to transmit, a transmit-on-demand function may be emulated while in polling mode by using the graceful-transmit-stop feature. first, clear the imask[gtscen] bit to mask the graceful-transmit-stop complete interrupt. next set, then immediately clear the dmactrl[gts] bit. clear the resulting ievent[gtsc] bit. finally, the imask[gtscen] bit may be set once again. there is one internal buffer for out-of-sequence flow control frames. while the tsec is between frames, this buffer is polled. the buffer must contain the whole frame. once the tsec is in paused mode, the out-of-sequence buffer descriptor cannot be used to send another flow control frame because the mac regards it as a regular txbd.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-114 freescale semiconductor three-speed ethernet controllers in half-duplex mode (maccfg2[full duplex] is cleared) the mac defers transmission if the line is busy (crs asserted). before transmitting, the mac waits for carrier sense to become inactive, at which point it then determines if crs remains negated for 60 clocks. if so, transmission begins after an additional 36 bit times (96 bit times after crs originally became negated). if crs continues to be asserted, the mac follows a specified back-off procedure and tries to retransmit the frame until the retry limit is reached. data stored in the tx fifo is re-transmitted in case of a collision. this improves bus usage and latency. the transmitter also monitors for an abort condition and terminates the current frame if an abort condition is encountered. in full-duplex mode the protocol is independent of network activity, and only the transmit inter-frame gap must be enforced. the transmit block also implements full-duplex flow control. if a flow control frame is received, the mac does not service the transmitter?s request to send data until the pause duration is over. if the mac is currently sending data when a pause frame is received, the mac finishes sending the current frame, then suspends subsequent frames (except a pause frame) until the pause duration is over. the pause duration is defined by the received pause control frame and begins when the frame was first received. in addition, the transmitter supports transmission of flow control frames via tctrl[tfc_pause]. the transmit pause frame is generated internally based on the pause register that defines the pause value to be sent. note that it is possible to send a pause frame while the pause timer has not expired. the mac automatically appends fcs (32-bit crc) bytes to the frame if any of the following values are set:  txbd[pad/crc] is set in first txbd  txbd[tc] is set in first txbd  maccfg2[pad/crc] is set  maccfg2[crc en] is set following the transmission of the fcs, the ethernet controller writes the frame status bits into the bd and clears txbd[r]. if the end of the current buffer is reached and txbd[l] is cleared (a frame is comprised of multiple buffer descriptors), only txbd[r] is cleared. for both half- and full-duplex modes, an interrupt can be issued depending on txbd[i]. the ethernet controller then proceeds to the next txbd in the table. in this way, the core can be interrupted after each frame, after each buffer, or after a specific buffer is sent. if txbd[pad/crc] is set, the ethernet controller pads any frame shorter than 64 bytes. to pause transmission or rearrange the transmit queue, set dmactrl[gts]. this can help in transmitting expedited data ahead of previously linked buffers or for error situations. if gts is set, the tsec transmitter performs a graceful transmit stop. the ethernet controller stops immediately if no transmission is in progress or continues transmission until the current frame either finishes
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-115 or terminates with an error. the ievent[gtsc] interrupt occurs once the graceful transmit stop operation is completed. after gts is cleared, the tsec resumes transmission with the next frame. while the tsec is in 10/100 mbps mode it sends bytes least-significant nibble first and each nibble is sent lsb first. while it is in 1-gbps mode it sends bytes lsb first. 14.6.2.4 gigabit ethernet frame reception the tsec ethernet receiver is designed to work with little core intervention and can perform address recognition, crc checking, short frame checking, and maximum frame-length checking. the receiver can also force frame headers and buffer descriptors to be allocated into the l2 cache. see section 14.6.4, ?data extraction to the l2 cache,? for additional information. after a hardware reset, the software driver clears the rstat register and sets maccfg1[rx_en]. the ethernet receiver is enabled and immediately starts processing receive frames. if tsec n _rx_dv is asserted and tsec n _col remains negated, the mac strips a valid preamble/sfd (start of frame delimiter) header and begins processing the frame. if a valid header is not found, the frame is ignored. if the receiver detects the first bytes of a frame, the tsec controller begins to perform the frame recognition function through destination address (da) recognition (see section 14.6.2.6, ?frame recognition,? for additional information.). based on this match the frame can be accepted or rejected. once accepted, the tsec processes the frame based on user-defined attributes. the receiver can also filter frames based on physical (individual), group (multicast), and broadcast addresses. because ethernet receive frame data is not written to memory until the internal frame recognition algorithm is complete, system bus usage is not wasted on frames unwanted by this station. if a frame is accepted, the ethernet controller fetches the receive buffer descriptor (rxbd) from the queue. if rxbd is not being used by software (rxbd[e] is set), the tsec starts transferring the incoming frame. rxbd[f] is set for the first rxbd used for any particular receive frame. if the buffer is filled, the tsec controller clears rxbd[e] and, if rxbd[i] is set, generates an interrupt. if the incoming frame is larger than the buffer, the ethernet controller fetches the next rxbd in the table. if it is empty, the controller continues receiving the rest of the frame. in half-duplex mode, if a collision is detected during the frame, no rxbds are used; thus, no collision frames are presented to the user except late collisions, which indicate lan problems. the rxbd length is determined by the mrbl field in the maximum receive buffer length register (mrbl). the smallest valid value is 64 bytes. during reception, the ethernet controller checks for frames that are too short or too long. after the frame ends (crs is negated), the receive crc field is checked and written to the data buffer. the data length written to the last rxbd in the ethernet frame is the length of the entire frame, which enables the software to recognize a frame-too-long condition.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-116 freescale semiconductor three-speed ethernet controllers receive frames are not truncated if they exceed maximum frame bytes in the mac?s maximum frame register if maccfg2[huge frame] is set, yet the babbling receiver error interrupt occurs (ievent[babr] is set) and rxbd[lg] is set. after the receive frame is complete, the ethernet controller sets rxbd[l], updates the frame status bits in the rxbd, and clears rxbd[e]. if rxbd[i] is set, the ethernet controller next generates an interrupt (that can be masked) indicating that a frame was received and is in memory. the ethernet controller then waits for a new frame. to interrupt reception or rearrange the receive queue, dmactrl[grs] must be set. if this bit is set, the tsec receiver performs a graceful receive stop. the ethernet controller stops immediately if no frames are being received or continues receiving until the current frame either finishes or an error condition occurs. the ievent[grsc] interrupt event is signalled after the graceful receive stop operation is completed. while in this mode the user can then clear ievent[grsc] and can write to registers that are accessible to both the user and the tsec hardware without fear of conflict. after dmactrl[grs] is cleared, the tsec scans the input data stream for the start of a new frame (preamble sequence and start of frame delimiter), it resumes receiving, and the first valid frame received is placed in the next available rxbd. 14.6.2.5 rmon support tsec automatically gathers network statistics required for rmon without needing to receive all addresses. the rmon mib group 1, rmon mib group 2, rmon mib group 3, rmon mib group 9, rmon mib 2, and the 802.3 ethernet mib are supported. for rmon statistics and their corresponding counters see the memory map. 14.6.2.6 frame recognition the ethernet controller performs frame recognition using destination address (da) recognition. a frame can be rejected or accepted based on the outcome. 14.6.2.6.1 destination address recognition the ethernet controller can also perform the frame filtering using the traditional destination address (da) recognition methods. figure 14-115 is a flowchart for address recognition on received frames that is used to explain the concept. in the actual implementation most of the decision points shown in the figure actually occur simultaneously.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-117 figure 14-115. ethernet address recognition flowchart the ethernet controller compares the destination address field of the received frame with the physical address the user programs in the station address registers (macstnaddr1 and macstnaddr2). if the da does not match the station address, then the controller performs address recognition on multiple individual addresses using the iaddr n hash table. the user must i/g address station address match? i g broadcast address broadcast reject t f hash search (use group table) t hash match? t promiscuous? t f f f f t receive frame incoming frame hash search (use individual ta bl e ) discard frame
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-118 freescale semiconductor three-speed ethernet controllers write zeros to the hash in order to avoid a hash match, and ones to station address in order to avoid individual address match, or the user can turn on promiscuous mode. (see section 14.5.3.4.1, ?receive control register (rctrl).? ) in the group type of address recognition, the ethernet controller determines whether the group address is a broadcast address. if it is a broadcast, and broadcast addresses are enabled, the frame is accepted. if the group address is not a broadcast address, the user can perform address recognition on multiple group addresses using the gaddr n hash table. in promiscuous mode, the ethernet controller receives all of the incoming frames regardless of their address. 14.6.2.6.2 hash table algorithm the hash table process used in the individual and group hash filtering operates as follows. the ethernet controller maps any 48-bit destination address into one of 256 bins, represented by the 256 bits in gaddr0?7 or iaddr0?7. the eight high-order bits of a cyclic redundancy check (crc) checksum are used to index into the hash table. the high-order three bits of this 8-bit field are used to select one of the eight registers in either the individual or group hash table. the low-order five bits select a bit within the 32-bit register. a value of 0 in the high-order three bits selects iaddr0/gaddr0. the same process is used if the ethernet controller receives a frame. if the crc checksum selects a bit that is set in the group/individual hash table, the frame is accepted. if 32 group addresses are stored in the hash table and random group addresses are received, the hash table prevents roughly 224/256 (87.5%) of the group address frames from reaching memory. software must further filter those that reach memory to determine if they contain the correct addresses. better performance is achieved by using the group and individual hash tables in combination. for instance, if 32 group and 32 physical addresses are stored in their respective hash tables, because 87.5% of all group addresses and 87.5% of all individual address are rejected, then 87.5% of all frames are prevented from reaching memory. the effectiveness of the hash table declines as the number of addresses increases. for instance, as the number of addresses stored in the 256-bin hash table increases, the vast majority of the hash table bits are set, preventing only a small fraction of frames from reaching memory. 14.6.2.6.3 crc computation examples there are many algorithms for calculating the crc value of a number. refer to the rfc 3309 standard, which can be found at http://www.faqs.org/rfcs/rfc3309.html, to compute the crc value for the purposes of tsec. the rfc 3309 algorithm uses the following polynomial to calculate the crc value: x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x1+x0 or 0x04c11db7. given a destination mac address of da=01000ccccccc, the algorithm results in a crc remainder value of 0xa29f4bbc.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-119 bit-reversing the low-order byte of the crc value (0xbc) yields br_crc = 0x3d = 0b00 111101 the high-order 3-bits of the new br_crc value are used to select which 32-bit register (of the 8) to use. this example maps the da to register 1. high-order 3 bits of br_crc: ho_crc = 0b001 = 1 the low-order 5 bits are used to select which bit to set in the given register (with a value of 0 setting 0x8000_0000 and 31 setting 0x0000_0001). therefore, the example da maps to bit 29 of register 1. low-order 5 bits of br_crc: lo_crc = 0b11101 = 29 therefore, gaddr1 is ored with the value 0x0000_0004. additional calculated examples follow: example 1:  destination mac address: da = 01005e000128  crc remainder value: crc = 0x821d6cd3  bit-reversed least-significant byte of crc value: br_crc = 0xcb = 0b11001011  high-order 3 bits of br_crc: ho_crc = 0b110 = 6  low-order 5 bits of br_crc: lo_crc = 0b01011 = 11  gaddr6 = 0x0010_0000 example 2:  destination mac address: da = 0004f0604f10  crc remainder value: crc = 0x1f5a66b5  bit-reversed least-significant byte of crc value: br_crc = 0xad = 0b10101101  high-order 3 bits of br_crc: ho_crc = 0b101 = 5  low-order 5 bits of br_crc: lo_crc = 0b01101 = 13  gaddr5 = 0x0004_0000 14.6.2.7 flow control because collisions cannot occur in full-duplex mode, gigabit ethernet can operate at the maximum rate. if the rate becomes too fast for a station?s receiver, the station?s transmitter can send flow-control frames to reduce the rate. flow-control instructions are transferred by special frames of minimum frame size. the length/type fields of these frames have a special value. table 14-114 lists the flow-control frame structure.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-120 freescale semiconductor three-speed ethernet controllers if flow-control mode is enabled (maccfg1[rx_flow] is set) and the receiver identifies a pause-flow control frame, transmission stops for the time specified in the control frame. during this pause, only a control frame can be sent (tctrl[tfc_pause] is set). normal transmission resumes after the pause timer stops counting. if another pause-control frame is received during the pause, the period changes to the new value received. 14.6.2.8 interrupt handling the following describes what usually occurs within a tsec interrupt handler:  if an interrupt occurs, read ievent to determine interrupt sources. ievent bits to be handled in this interrupt handler are normally cleared at this time.  process the txbds to reuse them if the ievent[txb or txf] were set. if the transmit speed is fast or the interrupt delay is long, more than one transmit buffer may have been sent by the tsec; thus, it is important to check more than just one txbd during the interrupt handler. one common practice is to process all txbds in the interrupt handler until one is found with r set. see table 14-115 .  obtain data from the rxbd if ievent[rxc,rxb or rxf] is set. if the receive speed is fast or the interrupt delay is long, the tsec may have received more than one rxbd; thus, it is important to check more than just one rxbd during interrupt handling. typically, all rxbds in the interrupt handler are processed until one is found with e set. because the tsec pre-fetches bds, the bd table must be big enough so that there is always another empty bd to pre-fetch. see table 14-116 . table 14-114. flow control frame structure size [octets] description value comment 7 preamble 1 sfd start frame delimiter 6 destination address 01-80c2-00-00-01 multicast address reserved for use in mac frames 6 source address 2 length/type 88-08 control frame type 2 mac opcode 00-01 pause command 2 mac parameter pause time as defined by the ptv[pt] field. the pause period is measured in pause_quanta, a speed-independent constant of 512 bit-times (unlike slot time). the most-significant octet is sent first. 2 extended mac parameter extended pause control parameter as defined by the ptv[pte] field. the most-significant octet is sent first. 40 reserved ? 4 fcs frame check sequence (crc)
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-121  clear any set halt bits in tstat and rstat registers, or dmactrl[gts] and dmactrl[grs].  continue normal execution. 14.6.2.8.1 interrupt coalescing interrupt coalescing offers the user the ability to contour the behavior of the tsec with regard to frame interrupts. separate but identical mechanisms exist for handling both transmitted frames and received frames. while interrupt coalescing is enabled a transmit or receive frame interrupt (resulting from the interrupt bit (i) of the buffer descriptor in question and appropriately-enabled by the imask register) is raised either when a counter threshold-defined number of frames is received/transmitted or the timer threshold-defined period of time has lapsed, whichever occurs first. table 14-115. non-error transmit interrupts interrupt description action taken by tsec gtsc graceful transmit stop complete: transmitter is put into a pause state after completion of the frame currently being transmitted. none txc transmit control: instead of the next transmit frame, a control frame was sent. none txb transmit buffer: a transmit buffer descriptor, that is not the last one in the frame, was updated. programmable ?write with response? txbd to memory before setting ievent[txb]. txf transmit frame: a frame was transmitted and the last transmit buffer descriptor (txbd) of that frame was updated. programmable ?write with response? to memory on the last txbd before setting ievent[txf]. table 14-116. non-error receive interrupts interrupt description action taken by tsec grsc graceful receive stop complete: receiver is put into a pause state after completion of the frame currently being received. none rxc receive control: a control frame was received. as soon as the transmitter finishes sending the current frame, a pause operation is performed lasting for the duration specified in the received pause control frame and beginning when the frame was first received. none rxb receive buffer: a receive buffer descriptor, that is not the last one of the frame, was updated. programmable ?write with response? rxbd to memory before setting ievent[rxb]. rxf receive frame: a frame was received and the last receive buffer descriptor (rxbd) of that frame was updated. programmable ?write with response? to memory on the last rxbd before setting ievent[rxf].
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-122 freescale semiconductor three-speed ethernet controllers 14.6.2.8.2 interrupt coalescing by frame count threshold to avoid interrupt bandwidth congestion due to frequent, consecutive interrupts, the user may enable and configure interrupt coalescing to deliberately group frame interrupts, reducing the total number of interrupts raised. the number of frames received or transmitted prior to an interrupt being raised is determined by the frame threshold field (icfct) in the appropriate interrupt coalescing configuration register (rxic or txic). the frame threshold field may be assigned a value between 1 and 255. a value of 0 results in boundedly undefined behavior. note that a value of 1 functionally defeats the advantages of interrupt coalescing since the frame threshold is reached with each frame received or transmitted. once the number of frames transmitted or received reaches the threshold limit, an interrupt is raised (if the interrupt bit of the frame buffer descriptor(s) is set and if appropriately-enabled in the imask register), the threshold counter is reset, and then continues counting frames while the interrupt is active. the threshold counter is also reset if an interrupt is raised subject to the corresponding threshold timer. 14.6.2.8.3 interrupt coalescing by timer threshold to avoid stale frame interrupts, the user may also assign a timer threshold, beyond which any frame interrupts not yet raised are forced (if the interrupt bit of the frame buffer descriptor(s) is set and if enabled in the imask register). the timer threshold fields of the receive and transmit interrupt coalescing configuration registers (rxic[ictt] and txic[ictt]) are defined in units equivalent to 64 tsec interface clocks. that is, one timer threshold unit is 26.5 s, 2.56 s, or 512 ns, corresponding to interface modes 10 mbps, 100 mbps, or 1 gbps, respectively. after transmitting a frame (with txbd[i] set, causing ievent[txf] to be set), the transmit interrupt coalescing threshold timer begins counting. when the timer threshold has been reached an interrupt is raised if the interrupt bit of the buffer descriptor is set and imask[txfen] is set. after receiving a frame (with rxbd[i] set, causing ievent[rxf] to be set), the receive interrupt coalescing threshold timer begins counting. when the timer threshold has been reached an interrupt is raised if the interrupt bit of the buffer descriptor is set and imask[rxfen] is set. the interrupt coalescing timer thresholds (transmit and receive, operating independently) may be values ranging from 1 to 65535. a value of 0 results in boundedly undefined behavior. table 14-117 specifies the range of possible timing thresholds subject to the interface frequency and the value of rxic[ictt] or txic[ictt].
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-123 the transmit or receive timer threshold counter is reset when a corresponding interrupt is raised and begins counting again upon deassertion of that interrupt and once ievent[txf or rxf] is set. 14.6.2.9 inter-packet gap time if a station must transmit, it waits until the lan becomes silent for a specified period (inter-packet gap). after a station begins sending, it continually checks for collisions on the lan. if a collision is detected, the station forces a jam signal (all ones) on its frame and stops transmitting. collisions usually occur close to the beginning of a packet. the station then waits a random time period (back-off) before attempting to send again. after the back-off completes, the station waits for silence on the lan and then begins retransmission on the lan. this process is called a retry. if the packet is not successfully sent within a specified number of retries, an error is indicated. the minimum inter-packet gap time for back-to-back transmission is 96 serial clocks. the receiver receives back-to-back packets with this minimum spacing. in addition, after waiting a required number of clocks (based on the back-off algorithm), the transmitter waits for carrier sense to be negated before retransmitting the packet. retransmission begins 36 serial clocks after carrier sense is negated for at least 60 serial clocks. 14.6.2.10 internal and external loop back setting maccfg1[loop back] causes the mac transmit outputs to be looped back to the mac receive inputs. clearing this bit results in normal operation. this bit is cleared by default. 14.6.2.11 error-handling procedure the ethernet controller reports frame reception and transmission error conditions using the channel bds, the error counters, and the ievent register. programming note: when the tsec encounters a halt condition (tstat[thlt] is set), it stops processing the frame at the current txbd. the tsec relies on the user to manage the buffer descriptor pointer, tbptr, or the buffer descriptor queue before resuming transmissions. once the tsec resumes, it fetches the txbd pointed to by tbptr. table 14-117. interrupt coalescing timing threshold ranges tsec interface format and frequency interrupt coalescing threshold time minimum (ictt=1) maximum (ictt=65535) 10base-t at 2.5 mhz 25.6 s 1.678 s 100base-t at 25 mhz 2.56 s 167.8 ms 1000base-t at 125 mhz 512 ns 33.55 ms
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-124 freescale semiconductor three-speed ethernet controllers transmission errors are described in table 14-118 . reception errors are described in table 14-119 . table 14-118. transmission errors error response transmitter underrun the controller sends 32 bits that ensure a crc error, terminates buffer transmission, sets txbd[un], closes the buffer, sets ievent[xfun] and ievent[txe]. the controller resumes transmission after tstat[thlt] is cleared (and dmactrl[gts] is cleared). retransmission attempts limit expired the controller terminates buffer transmission, sets txbd[rl], closes the buffer, sets ievent[crl/xda] and ievent[txe]. transmission resumes after tstat[thlt] is cleared (and dmactrl[gts] is cleared). excessive defer abort the controller terminates buffer transmission, sets txbd[def], closes the buffer, sets ievent[crc/xda], and ievent[txe]. transmission resumes after tstat[thlt] is cleared. late collision the controller terminates buffer transmission, sets txbd[lc], closes the buffer, sets ievent[lc] and ievent[txe]. the controller resumes transmission after tstat[thlt] is cleared (and dmactrl[gts] is cleared). memory read error a system bus error occurred during a dma transaction. the controller sets ievent[eberr], dma stops sending data to the fifo which causes an underrun error but ievent[xfun] is not set. the tstat[thlt] is set. transmits are continued once tstat[thlt] is cleared. babbling transmit error a frame is transmitted which exceeds the mac?s maximum frame length and maccfg2[huge frame] is a 0. the controller sets ievent[babt] and continues without interruption. txbd[txtrunc] is set in the last txbd (txbd[l] is set) of the frame. table 14-119. reception errors error description overrun error the ethernet controller maintains an internal fifo buffer for receiving data. if a receiver fifo buffer overrun occurs, the controller sets rxbd[ov], sets rxbd[l], closes the buffer, and sets ievent[rxf], the receiver then enters hunt mode (seeking start of a new frame). busy error a frame is received and discarded due to a lack of buffers. the controller sets ievent[bsy]. in addition, the rstat[qhlt] bit is set. the halted queue resumes reception once the user clears the rstat[qhlt] bit. non-octet error (dribbling bits) the ethernet controller handles a nibble of dribbling bits if the receive frame terminates as non-octet aligned and it checks the crc of the frame on the last octet boundary. if there is a crc error, the frame non-octet aligned (rxbd[no]) error is reported, ievent[rxf] is set, and the alignment error counter increments. the tsec relies on the statistics collector block to increment the receive alignment error counter (raln). if there is no crc error, no error is reported. crc error if a crc error occurs, the controller sets rxbd[cr], closes the buffer, and sets ievent[rxf]. this tsec relies on the statistics collector block to record the event. after receiving a frame with a crc error, the receiver then enters hunt mode. memory read error a system bus error occurred during a dma transaction. the controller sets ievent[eberr] and discards the frame . in addition the rstat[qhlt] bit is set. the halted queue resumes reception once the rstat[qhlt] bit is cleared. babbling receive error a frame is received that exceeds the mac?s maximum frame length. the controller sets ievent[babr] and continues
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-125 14.6.3 buffer descriptors the tsec buffer descriptor (bd) is modeled after the mpc8260 fast ethernet controller bd for ease of reuse. drawing from the mpc8260 fec bd programming model, the tsec descriptor base registers point to the beginning of bd rings. the 8-byte data bd format is similar to the mpc8260 bd model. data buffers are used in the transmission and reception of ethernet frames (see figure 14-116 ). data bds encapsulate all information necessary for the tsec to transmit or receive an ethernet frame. within each data bd there is a status field, a data length field, and a data pointer. the bd completely describes an ethernet packet by centralizing status information for the data packet in the status field of the bd and by containing a data bd pointer to the location of the data buffer. software is responsible for setting up the bds in memory. because of pre-fetching, a minimum of two buffer descriptors per ring are required. this applies to both the transmit and the receive descriptor rings. software also must have the data pointer pointing to memory. within the status field, there exists an ownership bit which defines the current state of the buffer (pointed to by the data pointer). other bits in the status field in the buffer descriptor are used to communicate status/control information between the tsec and the software driver. the status field of the bd is 16-bit field, as is the length field. the data buffer pointer is a 32-bit field. therefore, the bds should be accessed with the following c structure: typedef unsigned short uint_16; /* choose 16-bit native type */ typedef unsigned int uint_32; /* choose 32-bit native type */ typedef struct bd_struct { uint_16 flags; uint_16 length; uint_32 bufptr; }; because there is no next bd pointer in the transmit/receive bd (see figure 14-117 ), all bds must reside sequentially in memory. the tsec increments the current bd location appropriately to the next bd location to be processed. there is a wrap bit in the last bd that informs the tsec to loop back to the beginning of the bd chain. software must initialize tbase and rbase that point to the beginning transmit and receive bds for the tsec.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-126 freescale semiconductor three-speed ethernet controllers figure 14-116. example of tsec memory structure for bd figure 14-117. buffer descriptor ring 14.6.3.1 transmit data buffer descriptor (txbd) data is presented to the tsec for transmission by arranging it in memory buffers referenced by the txbds. in the txbd the user initializes the r, pad/crc, w, l, and tc bits and the length (in bytes) in the first word, and the buffer pointer in the second word. status & control data length buffer pointer status & control data length buffer pointer rx buffer descriptors tx buffer descriptors rxbd ta bl e txbd ta bl e txbd table pointer rxbd table pointer (tbase) (rbase) memory map system memory tx buffer rx buffer beginning bd pointer 1 3 0 2 4 w = 1
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-127 the tsec clears the r bit in the first word of the bd after it finishes using the data buffer. the transfer status bits are then updated. additional transmit frame status can be found in statistic counters in the mib block. figure 14-118 shows the txbd. the txbd fields are detailed in table 14-120 . 0 1 2 3 4 5 6 7 8 9 10 13 14 15 offset + 0 r pad/crc w i l tc def to1 hfe/lc rl rc un txtrunc offset + 2 data length offset + 4 tx data buffer pointer offset + 6 figure 14-118. transmit buffer descriptor table 14-120. transmit data buffer descriptor (txbd) field descriptions offset bits name description offset + 0 0 r ready. written by tsec and user 0 the data buffer associated with this bd is not ready for transmission. the user is free to manipulate this bd or its associated data buffer. the tsec clears this bit after the buffer is transmitted or after an error condition is encountered. 1 the data buffer, which is prepared for transmission by the user, was not transmitted or is currently being transmitted. no fields of this bd may be written by the user once this bit is set. offset + 0 1 pad/ crc pad/crc. padding and crc attachment for frames. (valid only while it is set in the first bd and maccfg2[pad/crc] is cleared.) if maccfg2[pad/crc] is set, this bit is ignored. 0 do not add padding to short frames. no crc is appended unless txbd[tc] is set. 1 add pad/crcs to frames. pad bytes are inserted until the length of the transmitted frame equals 64 bytes. unlike the mpc8260 which pads up to minflr value, tsec pads always up to the ieee minimum frame length of 64 bytes. crc is always appended to frames. offset + 0 2 w wrap. written by user 0 the next buffer descriptor is found in the consecutive location. 1 the next buffer descriptor is found at the location defined in tbase. offset + 0 3 i interrupt. written by user 0 no interrupt is generated after this buffer is serviced. 1 ievent[txb] or ievent[txf] are set after this buffer is serviced. these bits can cause an interrupt if they are enabled (that is, ievent[txben] or ievent[txfen] are set). offset + 0 4 l last in frame. written by user 0 the buffer is not the last in the transmit frame. 1 the buffer is the last in the transmit frame. offset + 0 5 tc tx crc. written by user. (valid only while it is set in first bd and txbd[pad/crc] is cleared and maccfg2[pad/crc] is cleared and maccfg2[crc en] is cleared.) if maccfg2[pad/crc] is set or maccfg2[crc en] is set, this bit is ignored. 0 end transmission immediately after the last data byte with no hardware generated crc appended, unless txbd[pad/crc] is set. 1 transmit the crc sequence after the last data byte.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-128 freescale semiconductor three-speed ethernet controllers 14.6.3.2 receive buffer descriptor (rxbd) in the rxbd the user initializes the e, i, and w bits in the first word and the pointer in second word. if the data buffer is used, the tsec modifies the e, l, f, m, bc, mc, lg, no, sh, cr, ov, and tr bits and writes the length of the used portion of the buffer in the first word. the m, bc, offset + 0 6 def defer indication. hardware updates this bit if an excessive defer condition occurs. 0 this frame was not deferred. 1 if hafdup[excess_defer]=1, this frame did not have a collision before it was sent but it was sent late because of deferring. if hafdup[excess_defer]=0, this frame was aborted and not sent. offset + 0 7 to1 transmit software ownership. this read/write bit may be utilized by software, as necessary. its state does not affect the hardware nor is it affected by the hardware. offset + 0 8 hfe/lc huge frame enable (written by user)/late collision (written by tsec) valid only while it is set in first bd and the maccfg2[huge frame] is cleared. if maccfg2[huge frame] is set, this bit is ignored. 0 truncate transmit frame if its length is greater than the mac?s maximum frame length register. 1 do not truncate the transmit frame. late collision. written by tsec 0 no late collision 1 a collision occurred after 64 bytes are sent. the tsec terminates the transmission and updates lc. offset + 0 9 rl retransmission limit. written by tsec 0 transmission before maximum retry limit is hit 1 the transmitter failed (max. retry limit + 1) attempts to successfully send a message due to repeated collisions. the tsec terminates the transmission and updates rl. offset + 0 10?13 rc retry count. written by tsec 0000 the frame is sent correctly the first time or if rl is set then the retry limit has been reached nnnn one or more attempts were needed to send the transmit frame. if this field is 15, then 15 or more retries were needed. the ethernet controller updates rc after sending the buffer. offset + 0 14 un underrun. written by tsec 0 no underrun encountered (data was retrieved from external memory in time to send a complete frame) 1 the ethernet controller encountered a transmitter underrun condition while sending the associated buffer. the tsec terminates the transmission and updates un. offset + 0 15 txtrunc tx truncation. set in the last txbd (txbd[l] is set) when ievent[babt] occurs for the frame offset + 2 0?15 data length data length is the number of octets the tsec transmits from this bd?s data buffer. it is never modified by the tsec. this field must be greater than zero. offset + 4 0?31 tx data buffer pointer the transmit buffer pointer contains the address of the associated data buffer. there are no alignment requirements for this address. table 14-120. transmit data buffer descriptor (txbd) field descriptions offset bits name description
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-129 mc, lg, no, sh, cr, ov, and tr bits in the first word of the buffer descriptor are only modified by the tsec if the l bit is set. the first word of the rxbd contains control and status bits. its format is detailed in figure 14-119 below. table 14-121 describes the fields of the rxbd. 0123456789101112131415 offset + 0 e ro1w i l f 0 m bcmclgnoshcrov tr offset + 2 data length offset + 4 rx data buffer pointer offset + 6 figure 14-119. receive buffer descriptor table 14-121. receive buffer descriptor field descriptions offset bits name description offset + 0 0 e empty. written by tsec (when cleared) and by user (when set). 0 the data buffer associated with this bd is filled with received data, or data reception is aborted due to an error condition. the status and length fields have been updated as required. 1 the data buffer associated with this bd is empty, or reception is currently in progress. offset + 0 1 ro1 receive software ownership bit. reserved for use by software. this read/write bit is not modified by hardware, nor does its value affect hardware. offset + 0 2 w wrap. written by user 0 the next buffer descriptor is found in the consecutive location. 1 the next buffer descriptor is found at the location defined in rbase. offset + 0 3 i interrupt. written by user 0 no interrupt is generated after this buffer is serviced. 1 ievent[rxb] or ievent[rxf] are set after this buffer is serviced. this bit can cause an interrupt if enabled (imask[rxben] is set or imask[rxfen] is set). if the user wants to be interrupted only if rxf occurs, then the user must disable rxb (imask[rxben] is cleared) and enable rxf (imask[rxfen] is set). offset + 0 4 l last in frame. written by tsec 0 the buffer is not the last in a frame. 1 the buffer is the last in a frame. offset + 0 5 f first in frame. written by tsec 0 the buffer is not the first in a frame. 1 the buffer is the first in a frame. offset + 0 6 ? reserved offset + 0 7 m miss. written by tsec. (this bit is valid only if the l-bit is set and tsec is in promiscuous mode.) this bit is set by the tsec for frames that were accepted in promiscuous mode, but were flagged as a ?miss? by the internal address recognition; thus, while in promiscuous mode, the user can use the m-bit to quickly determine whether the frame was destined to this station. 0 the frame was received because of an address recognition hit. 1 the frame was received because of promiscuous mode.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-130 freescale semiconductor three-speed ethernet controllers 14.6.4 data extraction to the l2 cache some applications require the ability to identify selected portions of data within a frame?s data payload. this process is called extraction; although, the data is not truly removed. rather than literarily extracting a section of the data and copying it into a new memory location, the data is placed in the l2 cache. this allows the processor to quickly access critical frame information as soon as the processor is ready without having to first fetch the data from main memory. this reduction in latency can result in a substantial improvement in packet processing throughput. extraction functionality is controlled and configured with attr and attreli. see section 14.5.3.9.1, ?attribute register (attr),? and section 14.5.3.9.2, ?attribute extract length and extract index register (attreli),? for specific register information. offset + 0 8 bc broadcast. written by tsec. (only valid if l is set.) is set if the da is broadcast (ff-ff-ff-ff-ff-ff) offset + 0 9 mc multicast. written by tsec. (only valid if l is set.) is set if the da is multicast and not bc offset + 0 10 lg rx frame length violation. written by tsec. (only valid if l is set.) a frame length greater than maximum frame length was recognized while maccfg2[huge frame] was set. note, if maccfg2[huge frame] is cleared, the frame is truncated to the value programmed in the maximum frame length register. offset + 0 11 no rx non-octet aligned frame. written by tsec. (only valid if l is set.) a frame that contained a number of bits not divisible by eight was received. offset + 0 12 sh short frame. written by tsec. (only valid if l is set.) a frame length that was less than the minimum length defined for this channel (minflr) was recognized, provided rctrl[rsf] is set. offset + 0 13 cr rx crc error. written by tsec. (only valid if l is set.) this frame contains a crc error and is an integral number of octets in length.this bit is also set if a receive code group error is detected. offset + 0 14 ov overrun. written by tsec. (only valid if l is set.) a receive fifo overrun occurred during frame reception. if this bit is set, the other status bits, m, lg, no, sh, cr, and cl lose their normal meaning and are zero. offset + 0 15 tr truncation. written by tsec. (only valid if l is set.) is set if the receive frame is truncated. this can happen if a frame length greater than maximum frame length was received and the maccfg2[huge frame] is cleared. if this bit is set, the frame must be discarded and the other error bits must be ignored as they may be incorrect. offset + 2 0?15 data length data length. written by tsec. data length is the number of octets written by the tsec into this bd?s data buffer if l is cleared (the value is equal to mrbl), or the length of the frame including crc, if l is set. offset + 4 0?31 rx data buffer pointer receive buffer pointer. written by user. the receive buffer pointer, which always points to the first location of the associated data buffer, must be 64-byte aligned. the buffer must reside in memory external to the tsec. table 14-121. receive buffer descriptor field descriptions (continued) offset bits name description
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-131 14.7 initialization/application information 14.7.1 interface mode configuration this section describes how to configure the tsec in different supported interface modes. these include mii, gmii, tbi, rgmii, rtbi. the pinout, the data registers that must be initialized, as well as speed selection options are described. the ecntrl[tbim] and ecntrl[rpm] bits are written, assuming the part was not pin-configured at initialization to the correct mode. 14.7.1.1 mii interface mode table 14-122 describes the signal configurations required for mii interface mode. table 14-122. mii interface mode signal configuration tsec signals frequency [mhz] 125 voltage[v] 3.3/2.5 mii interface frequency [mhz] 25 voltage[v] 3.3 signals i/o no. of signals signals i/o no. of signals gtx_clk o 1 leave unconnected o tx_clk i 1 tx_clk i 1 txd[0] o 1 txd[0] o 1 txd[1] o 1 txd[1] o 1 txd[2] o 1 txd[2] o 1 txd[3] o 1 txd[3] o 1 txd[4] o 1 leave unconnected o txd[5] o 1 leave unconnected o txd[6] o 1 leave unconnected o txd[7] o 1 leave unconnected o tx_en o 1 tx_en o 1 tx_er o 1 tx_er o 1 rx_clk i 1 rx_clk i 1 rxd[0] i 1 rxd[0] i 1 rxd[1] i 1 rxd[1] i 1 rxd[2] i 1 rxd[2] i 1 rxd[3] i 1 rxd[3] i 1 rxd[4] i 1 not used i rxd[5] i 1 not used i
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-132 freescale semiconductor three-speed ethernet controllers table 14-123 describes the shared signals of the mii interface. table 14-124 describes the register initializations required to reconfigure the phy to mii mode following initial auto-negotiation. rxd[6] i 1 not used i rxd[7] i 1 not used i rx_dv i 1 rx_dv i 1 rx_er i 1 rx_er i 1 col i 1 col i 1 crs i 1 crs i 1 sum 25 sum 16 table 14-123. shared mii signals tsec signals i/o no. of signals mii signals i/o no. of signals function ec_mdio i/o 1 ec_mdio i/o 1 management interface i/o ec_mdc o 1 ec_mdc o 1 management interface clock ec_gtx_clk125 i 1 not used i 0 reference clock sum 3 sum 2 table 14-124. mii mode register initialization steps have the tsec n _gtx_clk configuration signal pulled low for g/mii mode. set soft_reset, maccfg1[1000_0000_0000_0000_0000_0000_0000_0000] clear soft_reset, maccfg1[0000_0000_0000_0000_0000_0000_0000_0000] initialize maccfg2, for mii, half duplex operation. set i/f mode bit, maccfg2[0000_0000_0000_0000_0111_0001_0000_0100] (this example has full duplex = 0, preamble count = 7, pad/crc append = 1) table 14-122. mii interface mode signal configuration (continued) tsec signals frequency [mhz] 125 voltage[v] 3.3/2.5 mii interface frequency [mhz] 25 voltage[v] 3.3 signals i/o no. of signals signals i/o no. of signals
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-133 initialize ecntrl, ecntrl[0000_0000_0000_0000_0001_0000_0000_0000] (this example has statistics enable = 1) initialize mac station address, macstnaddr2[0110_0000_0000_0010_0000_0000_0000_0000] set station address to 02_60_8c_87_65_43, for example. (note that phy configuration register addresses are not necessarily consistent in all phys.) initialize mac station address, macstnaddr1[0100_0011_0110_0101_1000_0111_1000_1100] set station address to 02_60_8c_87_65_43, for example. (note that phy configuration register addresses are not necessarily consistent in all phys.) assign a physical address to the tbi so as to not conflict with the external phy physical address, tbipa[0000_0000_0000_0000_0000_0000_0000_0101] set to 05, for example. (note that phy configuration register addresses are not necessarily consistent in all phys.) reset the management interface. miimcfg[1000_0000_0000_0000_0000_0000_0000_0000] setup the mii mgmt clock speed, miimcfg[0000_0000_0000_0000_000_0000_0000_0101] set source clock divide by 14, for example, to insure that ec_mdc clock speed is approximately 2.5 mhz. read mii mgmt indicator register and check for busy = 0, miimind ---> [0000_0000_0000_0000_0000_0000_0000_0000] this indicates that the tsec mii mgmt bus is idle. set up the mii mgmt for a write cycle to the external phy auxiliary control and status register to configure the phy through the management interface (overrides configuration signals of the phy). miimadd[0000_0000_0000_0000_0000_0000_0001_1100] perform an mii mgmt write cycle to the external phy writing to mii mgmt control with 16-bit data intended for the external phy register, miimcon[0000_0000_0000_0000_0000_0000_0000_0100] check to see if mii mgmt write is complete read mii mgmt indicator register and check for busy = 0, miimind ---> [0000_0000_0000_0000_0000_0000_0000_0000] this indicates that the write cycle was completed. set up the mii mgmt for a write cycle to the external phy extended phy control register 1 to set up the interface mode selection. miimadd[0000_0000_0000_0000_0000_0000_0001_0111] perform an mii mgmt write cycle to the external phy. write to mii mgmt control with 16-bit data intended for the external phy register, miimcon[0000_0000_0000_0000_0000_0000_0000_0000] check to see if mii mgmt write is complete. read mii mgmt indicator register and check for busy = 0, miimind ---> [0000_0000_0000_0000_0000_0000_0000_0000] this indicates that the write cycle was completed. set up the mii mgmt for a write cycle to the external phy mode control register to set up the interface mode selection. miimadd[0000_0000_0000_0000_0000_0000_0000_0000] table 14-124. mii mode register initialization steps (continued)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-134 freescale semiconductor three-speed ethernet controllers perform an mii mgmt write cycle to the external phy. write to mii mgmt control with 16-bit data intended for the external phy register, miimcon[0000_0000_0000_0000_00uu_00uu_0u00_0000] where u is user defined based on desired configuration. check to see if mii mgmt write is complete read mii mgmt indicator register and check for busy = 0, miimind ---> [0000_0000_0000_0000_0000_0000_0000_0000] this indicates that the write cycle was completed. if auto-negotiation was enabled in the phy, check to see if phy has completed auto-negotiation. set up the mii mgmt for a read cycle to phy mii mgmt register (write the phy address and register address), miimadd[0000_0000_0000_0000_0000_0000_0000_0001] the phy status register is at address 0x1 and in this case the phy address is 0x00. perform an mii mgmt read cycle of status register. clear miimcom[read cycle]. set miimcom[read cycle]. (uses the phy address (0) and register address (1) placed in miimadd register), when miimind[busy]=0, read the miimstat register and check bit 10 (an done and link is up) miimstat ---> [0000_0000_0000_0000_0000_000_0010_0100] other information about the link is also returned.(extend status, no pre, remote fault, an ab ility, link status, extend ability) check auto-negotiation attributes in the phy as necessary. clear ievent register, ievent[0000_0000_0000_0000_0000_0000_0000_0000] initialize imask, (optional) imask[0000_0000_0000_0000_0000_0000_0000_0000] initialize iaddr n, (optional) iaddr n [0000_0000_0000_0000_0000_0000_0000_0000] initialize gaddr n, (optional) gaddr n [0000_0000_0000_0000_0000_0000_0000_0000] initialize rctrl, (optional) rctrl[0000_0000_0000_0000_0000_0000_0000_0000] initialize dmactrl, (optional) dmactrl[0000_0000_0000_0000_0000_0000_0000_0000] initialize fifo_pause_ctrl, fifo_pause_ctrl[0000_0000_0000_0000_0000_0000_0000_0010] initialize (empty) transmit descriptor ring and fill buffers with data. initialize tbase, tbase[llll_llll_llll_llll_llll_llll_llll_l000] initialize (empty) receive descriptor ring and fill with empty buffers. initialize rbase, rbase[llll_llll_llll_llll_llll_llll_llll_l000] enable rx and tx, maccfg1[0000_0000_0000_0000_0000_0000_0000_0101] table 14-124. mii mode register initialization steps (continued)
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-135 14.7.1.2 gmii interface mode table 14-125 describes the signal configurations required for gmii interface mode. table 14-125. gmii interface mode signal configuration tsec signals frequency [mhz] 125 voltage[v] 3.3/2.5 gmii interface frequency [mhz] 125 voltage[v] 3.3 signals i/o no. of signals signals i/o no. of signals gtx_clk o 1 gtx_clk o 1 tx_clk i 1 txd[0] o 1 txd[0] o 1 txd[1] o 1 txd[1] o 1 txd[2] o 1 txd[2] o 1 txd[3] o 1 txd[3] o 1 txd[4] o 1 txd[4] o 1 txd[5] o 1 txd[5] o 1 txd[6] o 1 txd[6] o 1 txd[7] o 1 txd[7] o 1 tx_en o 1 tx_en o 1 tx_er o 1 tx_er o 1 rx_clk i 1 rx_clk i 1 rxd[0] i 1 rxd[0] i 1 rxd[1] i 1 rxd[1] i 1 rxd[2] i 1 rxd[2] i 1 rxd[3] i 1 rxd[3] i 1 rxd[4] i 1 rxd[4] i 1 rxd[5] i 1 rxd[5] i 1 rxd[6] i 1 rxd[6] i 1 rxd[7] i 1 rxd[7] i 1 rx_dv i 1 rx_dv i 1 rx_er i 1 rx_er i 1 col i 1 crs i 1 sum 25 sum 22
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-136 freescale semiconductor three-speed ethernet controllers table 14-126 describes the shared signals of the gmii interface. table 14-127 describes the register initializations required to reconfigure the phy to gmii mode following initial auto-negotiation. table 14-126. shared gmii signals tsec signals i/o no. of signals gmii signals i/o no. of signals function ec_mdio i/o 1 ec_mdio i/o 1 management interface i/o ec_mdc o 1 ec_mdc o 1 management interface clock ec_gtx_clk125 i 1 ec_gtx_clk125 i 1 reference clock sum3sum3 table 14-127. gmii mode register initialization steps have the tsec n _gtx_clk configuration signal pulled low for g/mii mode. set soft_reset, maccfg1[1000_0000_0000_0000_0000_0000_0000_0000] clear soft_reset, maccfg1[0000_0000_0000_0000_0000_0000_0000_0000] initialize maccfg2, for gmii, full duplex operation. set i/f mode bit. maccfg2[0000_0000_0000_0000_0111_0010_0000_0101] (this example has full duplex = 1, preamble count = 7, pad/crc append = 1) initialize ecntrl, ecntrl[0000_0000_0000_0000_0001_0000_0000_0000] (this example has statistics enable = 1) initialize mac station address, macstnaddr2[0110_0000_0000_0010_0000_0000_0000_0000] set station address to 02_60_8c_87_65_43, for example. (note that phy configuration register addresses are not necessarily consistent in all phys.) initialize mac station address, macstnaddr1[0100_0011_0110_0101_1000_0111_1000_1100] set station address to 02_60_8c_87_65_43, for example. (note that phy configuration register addresses are not necessarily consistent in all phys.) assign a physical address to the tbi so as to not conflict with the external phy physical address, tbipa[0000_0000_0000_0000_0000_0000_0000_0101] set to 05, for example. (note that phy configuration register addresses are not necessarily consistent in all phys.) reset the management interface, miimcfg[1000_0000_0000_0000_0000_0000_0000_0000] setup the mii mgmt clock speed, miimcfg[0000_0000_0000_0000_0000_0000_0000_0101] set source clock divide by 14, for example, to insure that ec_mdc clock speed is approximately 2.5 mhz.
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-137 read mii mgmt indicator register and check for busy = 0, miimind ---> [0000_0000_0000_0000_0000_0000_0000_0000] this indicates that the tsec mii mgmt bus is idle. set up the mii mgmt for a write cycle to the external phy auxiliary control and status register to configure the phy through the management interface (overrides configuration signals of the phy), miimadd[0000_0000_0000_0000_0000_0000_0001_1100] perform an mii mgmt write cycle to the external phy. write to mii mgmt control with 16-bit data intended for the external phy register, miimcon[0000_0000_0000_0000_0000_0000_0000_0100] check to see if mii mgmt write is complete. read mii mgmt indicator register and check for busy = 0, miimind ---> [0000_0000_0000_0000_0000_0000_0000_0000] this indicates that the write cycle was completed set up the mii mgmt for a write cycle to the external phy extended phy control register 1 to set up the interface mode selection miimadd[0000_0000_0000_0000_0000_0000_0001_0111] perform an mii mgmt write cycle to the external phy. write to mii mgmt control with 16-bit data intended for the external phy register, miimcon[0000_0000_0000_0000_0000_0000_0000_0000] check to see if mii mgmt write is complete. read mii mgmt indicator register and check for busy = 0, miimind ---> [0000_0000_0000_0000_0000_0000_0000_0000] this indicates that the write cycle was completed. set up the mii mgmt for a write cycle to the external phy mode control register to set up the interface mode selection, miimadd[0000_0000_0000_0000_0000_0000_0000_0000] perform an mii mgmt write cycle to the external phy. write to mii mgmt control with 16-bit data intended for the external phy register, miimcon[0000_0000_0000_0000_000u_00u1_0100_0000] where u is user defined based on desired configuration. check to see if mii mgmt write is complete. read mii mgmt indicator register and check for busy = 0, miimind ---> [0000_0000_0000_0000_0000_0000_0000_0000] this indicates that the write cycle was completed. if auto-negotiation was enabled in the phy, check to see if phy has completed auto-negotiation. set up the mii mgmt for a read cycle to phy mii mgmt register (write the phy address and register address), miimadd[0000_0000_0000_0000_0000_0000_0000_0001] the phy status register is at address 0x1 and in this case the phy address is 0x00 perform an mii mgmt read cycle of status register. clear miimcom[read cycle]. set miimcom[read cycle]. (uses the phy address (0) and register address (1) placed in miimadd register), when miimind[busy]=0, read the miimstat register and check bit 10 (an done and link is up), miimstat ---> [0000_0000_0000_0000_0000_000_0010_0100] other information about the link is also returned.(extend status, no pre, remote fault, an ab ility, link status, extend ability) check auto-negotiation attributes in the phy as necessary. table 14-127. gmii mode register initialization steps (continued)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-138 freescale semiconductor three-speed ethernet controllers 14.7.1.3 tbi interface mode table 14-128 describes the signal configurations required for tbi interface mode. clear ievent register, ievent[0000_0000_0000_0000_0000_0000_0000_0000] initialize imask, (optional) imask[0000_0000_0000_0000_0000_0000_0000_0000] initialize iaddr n, (optional) iaddr n [0000_0000_0000_0000_0000_0000_0000_0000] initialize gaddr n, (optional) gaddr n [0000_0000_0000_0000_0000_0000_0000_0000] initialize rctrl, (optional) rctrl[0000_0000_0000_0000_0000_0000_0000_0000] initialize dmactrl, (optional) dmactrl[0000_0000_0000_0000_0000_0000_0000_0000] initialize fifo_pause_ctrl, fifo_pause_ctrl[0000_0000_0000_0000_0000_0000_0000_0010] initialize (empty) transmit descriptor ring and fill buffers with data. initialize tbase, tbase[llll_llll_llll_llll_llll_llll_llll_l000] initialize (empty) receive descriptor ring and fill with empty buffers. initialize rbase, rbase[llll_llll_llll_llll_llll_llll_llll_l000] enable rx and tx, maccfg1[0000_0000_0000_0000_0000_0000_0000_0101] table 14-128. tbi interface mode signal configuration tsec signals frequency [mhz] 125 voltage[v] 3.3/2.5 tbi interface frequency [mhz] 62.5 voltage[v] 3.3 signals i/o no. of signals signals i/o no. of signals gtx_clk o 1 gtx_clk o 1 tx_clk i 1 rx_clk1 i 1 txd[0] o 1 tcg[0] o 1 txd[1] o 1 tcg[1] o 1 txd[2] o 1 tcg[2] o 1 txd[3] o 1 tcg[3] o 1 txd[4] o 1 tcg[4] o 1 table 14-127. gmii mode register initialization steps (continued)
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-139 table 14-129 describes the shared signals for the tbi interface. txd[5] o 1 tcg[5] o 1 txd[6] o 1 tcg[6] o 1 txd[7] o 1 tcg[7] o 1 tx_en o 1 tcg[8] o 1 tx_er o 1 tcg[9] o 1 rx_clk i 1 rx_clk0 i 1 rxd[0] i 1 rcg[0] i 1 rxd[1] i 1 rcg[1] i 1 rxd[2] i 1 rcg[2] i 1 rxd[3] i 1 rcg[3] i 1 rxd[4] i 1 rcg[4] i 1 rxd[5] i 1 rcg[5] i 1 rxd[6] i 1 rcg[6] i 1 rxd[7] i 1 rcg[7] i 1 rx_dv i 1 rcg[8] i 1 rx_er i 1 rcg[9] i 1 col i 1 i crs i 1 sdet i 1 sum 25 sum 24 table 14-129. shared tbi signals tsec signals i/o no. of signals tbi signals i/o no. of signals function ec_mdio i/o 1 ec_mdio i/o 1 management interface i/o ec_mdc o 1 ec_mdc o 1 management interface clock ec_gtx_clk125 i 1 ec_gtx_clk12 5 i 1 reference clock sum 3 sum 3 table 14-128. tbi interface mode signal configuration (continued) tsec signals frequency [mhz] 125 voltage[v] 3.3/2.5 tbi interface frequency [mhz] 62.5 voltage[v] 3.3 signals i/o no. of signals signals i/o no. of signals
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-140 freescale semiconductor three-speed ethernet controllers table 14-130 describes the register initializations required to reconfigure the phy to tbi mode following initial auto-negotiation. table 14-130. tbi mode register initialization steps have the tsec n _gtx_clk configuration signal pulled high and ec_mdc signal pulled high for tbi mode. (tsec attempts to auto-negotiate after system reset.) set soft_reset, maccfg1[1000_0000_0000_0000_0000_0000_0000_0000] clear soft_reset, maccfg1[0000_0000_0000_0000_0000_0000_0000_0101] initialize maccfg2, maccfg2[0000_0000_0000_0000_0111_0010_0000_0101] (i/f mode = 2, full duplex = 1) initialize ecntrl, ecntrl[0000_0000_0000_0000_0001_0000_0000_0000] (this example has statistics enable = 1) initialize mac station address macstnaddr2[0110_0000_0000_0010_0000_0000_0000_0000] to 02608c:876543, for example. (note that phy configuration register addresses are not necessarily consistent in all phys.) initialize mac station address macstnaddr1[0100_0011_0110_0101_1000_0111_1000_1100] to 02608c:876543, for example. (note that phy configuration register addresses are not necessarily consistent in all phys.) assign a physical address to the tbi, tbipa[0000_0000_0000_0000_0000_0000_0001_0000] set to 16, for example. (note that phy configuration register addresses are not necessarily consistent in all phys.) setup the mii mgmt clock speed, miimcfg[0000_0000_0000_0000_0000_0000_0000_0111] set source clock divide by 28, for example, to insure that ec_mdc clock speed is not greater than 2.5 mhz. read mii mgmt indicator register and check for busy = 0, miimind ---> [0000_0000_0000_0000_0000_0000_0000_0000] this indicates that the tsec mii mgmt bus is idle. set up the mii mgmt for a read cycle to tbi control register (write the tbi address and register address), miimadd[0000_0000_0000_0000_0001_0000_0000_0000] the tbi control register is at offset address 0x0 from tbipa. perform an mii mgmt read cycle to verify state of tbi control register (optional) clear miimcom[read cycle] set miimcom[read cycle] (uses the tbi address and register address placed in miimadd register), when miimind[busy]=0, read the miimstat and look for an enable and other bit information. set up the mii mgmt for a write cycle to tbi?s an advertisement register (write the phy address and register address), miimadd[0000_0000_0000_0000_0001_0000_0000_0100] the an advertisement register is at offset address 0x04 from the tbi?s address. (in this case 0x10)
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-141 perform an mii mgmt write cycle to tbi. writing to mii mgmt control with 16-bit data intended for tbi?s an advertisement register, miimcon[0000_0000_0000_0000_0000_0001_1010_0000] this advertises to the link partner that the tbi supports pause and full duplex mode and does not support half duplex mode. check to see if mii mgmt write is complete. read mii mgmt indicator register and check for busy = 0, miimind ---> [0000_0000_0000_0000_0000_0000_0000_0000] this indicates that the write cycle was completed. set up the mii mgmt for a write cycle to tbi?s control register (write the phy address and register address), miimadd[0000_0000_0000_0000_0001_0000_0000_0000] the control register is at offset address 0x00 from the tbi?s address. (in this case 0x10) perform an mii mgmt write cycle to tbi. writing to mii mgmt control with 16-bit data intended for tbi?s control register, miimcon[0000_0000_0000_0000_0001_0010_0000_0000] this enables the tbi to restart auto-negotiations using the configuration set in the an advertisement register. check to see if mii mgmt write is complete. read mii mgmt indicator register and check for busy = 0, miimind ---> [0000_0000_0000_0000_0000_0000_0000_0000] this indicates that the write cycle was completed. check to see if phy has completed auto-negotiation. set up the mii mgmt for a read cycle to phy mii mgmt register (write the phy address and register address), miimadd[0000_0000_0000_0000_0001_0000_0000_0001] the phy status control register is at address 0x1 and in this case the phy address is 0x10. perform an mii mgmt read cycle of status register. clear miimcom[read cycle] set miimcom[read cycle] (uses the phy address (2) and register address (2) placed in miimadd register), when miimind[busy]=0, read the miimstat register and check bit 10 (an done) miimstat ---> [0000_0000_0000_0000_0000_0000_0010_0000] other information about the link is also returned. (extend status, no pre, remote fault, an ability, link status, extend ability) perform an mii mgmt read cycle of an expansion register. setup miimadd[0000_0000_0000_0000_0001_0000_0000_0110] clear miimcom[read cycle] set miimcom[read cycle] (uses the phy address (0x10) and register address (6) placed in miimadd register), when miimind[busy]=0, read the mii mgmt an expansion register and check bits 13 and 14 (np able and page rx?d) mii mgmt an expansion ---> [0000_0000_0000_0000_0000_0000_0000_0110] table 14-130. tbi mode register initialization steps (continued)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-142 freescale semiconductor three-speed ethernet controllers perform an mii mgmt read cycle of an link partner base page ability register. (optional) setup miimadd[0000_0000_0000_0000_0001_0000_0000_0101] clear miimcom[read cycle] set miimcom[read cycle] (uses the phy address (0x10) and register address (5) placed in miimadd register), when miimind[busy]=0, read the mii mgmt an link partner base page ability register and check bits 2 and 3 (remote fault) and bits 9 and 10. (half and full duplex) mii mgmt an link partner base page ability ---> [0000_0000_0000_0000_0000_000x_x110_0000] clear ievent register, ievent[0000_0000_0000_0000_0000_0000_0000_0000] initialize imask (optional) imask[0000_0000_0000_0000_0000_0000_0000_0000] initialize iaddr n (optional) iaddr n [0000_0000_0000_0000_0000_0000_0000_0000] initialize gaddr n (optional) gaddr n [0000_0000_0000_0000_0000_0000_0000_0000] initialize rctrl (optional) rctrl[0000_0000_0000_0000_0000_0000_0000_0000] initialize dmactrl (optional) dmactrl[0000_0000_0000_0000_0000_0000_0000_0000] initialize fifo_pause_ctrl, fifo_pause_ctrl[0000_0000_0000_0000_0000_0000_0000_0010] initialize (empty) transmit descriptor ring and fill buffers with data initialize tbase, tbase[llll_llll_llll_llll_llll_llll_llll_l000] initialize (empty) receive descriptor ring and f ill with empty buffers initialize rbase, rbase[llll_llll_llll_llll_llll_llll_llll_l000] enable rx and tx, maccfg1[0000_0000_0000_0000_0000_0000_0000_0101] table 14-130. tbi mode register initialization steps (continued)
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-143 14.7.1.4 rgmii interface mode table 14-131 shows the signals configurations required for rgmii interface mode. table 14-131. rgmii interface mode signal configuration tsec signals frequency [mhz] 125 voltage[v] 3.3/2.5 rgmii inrterface frequency [mhz] 125 voltage[v] 2.5 signals i/o no. of signals signals i/o no. of signals gtx_clk o 1 gtx_clk o 1 tx_clk i 1 txd[0] o 1 txd[0]/txd[4] o 1 txd[1] o 1 txd[1]/txd[5] o 1 txd[2] o 1 txd[2]/txd[6] o 1 txd[3] o 1 txd[3]/txd[7] o 1 txd[4] o 1 txd[5] o 1 txd[6] o 1 txd[7] o 1 tx_en o 1 tx_ctl (tx_en/tx_err) o 1 tx_er o 1 rx_clk i 1 rx_clk i 1 rxd[0] i 1 rxd[0]/rxd[4] i 1 rxd[1] i 1 rxd[1]/rxd[5] i 1 rxd[2] i 1 rxd[2]/rxd[6] i 1 rxd[3] i 1 rxd[3]/rxd[7] i 1 rxd[4] i 1 rxd[5] i 1 rxd[6] i 1 rxd[7] i 1 rx_dv i 1 rx_ctl (rx_dv/rx_err) i1
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-144 freescale semiconductor three-speed ethernet controllers table 14-132 describes the shared signals for the rgmii interface. table 14-133 describes the register initializations required to reconfigure the phy to rgmii mode following initial auto-negotiation. rx_er i 1 col i 1 crs i 1 sum 25 sum 12 table 14-132. shared rgmii signals tsec signals i/o no. of signals rgmii signals i/o no. of signals function ec_mdio i/o 1 ec_mdio i/o 1 management interface i/o ec_mdc o 1 ec_mdc o 1 management interface clock ec_gtx_clk12 5 i1 ec_gtx_clk12 5 i 1 reference clock sum 3 sum 3 table 14-133. rgmii mode register initialization steps have the tsec n _gtx_clk configuration signal pulled low and ec_mdc signal pulled low for rgmii mode. tbi control register?s auto-negotiation enable and reset bits are ignored. set soft_reset, maccfg1[1000_0000_0000_0000_0000_0000_0000_0000] clear soft_reset, maccfg1[0000_0000_0000_0000_0000_0000_0000_0101] initialize maccfg2, maccfg2[0000_0000_0000_0000_0111_0010_0000_0101] (i/f mode = 2, full duplex = 1) initialize ecntrl, ecntrl[0000_0000_0000_0000_0001_0000_0000_0000] (this example has rgmii 10-mbps mode, statistics enable = 1) table 14-131. rgmii interface mode signal configuration (continued) tsec signals frequency [mhz] 125 voltage[v] 3.3/2.5 rgmii inrterface frequency [mhz] 125 voltage[v] 2.5 signals i/o no. of signals signals i/o no. of signals
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-145 initialize mac station address, macstnaddr2[0110_0000_0000_0010_0000_0000_0000_0000] to 02608c:876543, for example. (note that phy configuration register addresses are not necessarily consistent in all phys.) initialize mac station address, macstnaddr1[0100_0011_0110_0101_1000_0111_1000_1100] to 02608c:876543, for example. (note that phy configuration register addresses are not necessarily consistent in all phys.) assign a physical address to the tbi, tbipa[0000_0000_0000_0000_0000_0000_0001_0000] set to 16, for example. (note that phy configuration register addresses are not necessarily consistent in all phys.) setup the mii mgmt clock speed, miimcfg[0000_0000_0000_0000_000_0000_0000_0111] set source clock divide by 28, for example, to insure that ec_mdc clock speed is not greater than 2.5 mhz. read mii mgmt indicator register and check for busy = 0, miimind ---> [0000_0000_0000_0000_0000_0000_0000_0000] this indicates that the tsec mii mgmt bus is idle. set up the mii mgmt for a write cycle to external the phy an advertisement register (write the phy address and register address), miimadd[0000_0000_0000_0000_0001_0001_0000_0100] the an advertisement register is at offset address 0x04 from the external phy address. (in this case 0x11) perform an mii mgmt write cycle to the external phy. write to mii mgmt control with 16-bit data intended for the external phy an advertisement register, miimcon[0000_0000_0000_0000_u0uu_uuuu_uuuu_uuuu] where u must be selected by the user for proper system configuration. check to see if mii mgmt write is complete. read mii mgmt indicator register and check for busy = 0, miimind ---> [0000_0000_0000_0000_0000_0000_0000_0000] this indicates that the write cycle was completed. set up the mii mgmt for a write cycle to the external phy control register (write the phy address and register address), miimadd[0000_0000_0000_0000_0001_0001_0000_0000] the control register is at offset address 0x00 from the external phy address. (in this case 0x11) perform an mii mgmt write cycle to the external phy. write to mii mgmt control with 16-bit data intended for the external phy control register, miimcon[0000_0000_0000_0000_0001_0010_0000_0000] this enables the external phy to restart auto-negotiations using the configuration set in the an advertisement register. check to see if mii mgmt write is complete. read mii mgmt indicator register and check for busy = 0, miimind ---> [0000_0000_0000_0000_0000_0000_0000_0000] this indicates that the write cycle was completed. check to see if phy has completed auto-negotiation. set up the mii mgmt for a read cycle to the phy mii mgmt register (write the phy address and register address), miimadd[0000_0000_0000_0000_0000_0010_0000_0001] the phy status register is at address 0x1 and in this case the phy address is 0x2. table 14-133. rgmii mode register initialization steps (continued)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-146 freescale semiconductor three-speed ethernet controllers perform an mii mgmt read cycle of status register. clear miimcom[read cycle] set miimcom[read cycle] (uses the phy address (2) and register address (2) placed in miimadd register) when miimind[busy]=0, read the miimstat register and check bit 10. (an done) miimstat ---> [0000_0000_0000_0000_0000_0000_0010_0000] other information about the link is also returned. (extend status, no pre, remote fault, an ability, link status, extend ability) perform an mii mgmt read cycle of an expansion register. setup miimadd[0000_0000_0000_0000_0001_0001_0000_0110] clear miimcom[read cycle] set miimcom[read cycle] (uses the phy address (0x11) and register address (6) placed in miimadd register) when miimind[busy]=0, read the mii mgmt an expansion register and check bits 13 and 14. (np able and page rx?d) mii mgmt an expansion ---> [0000_0000_0000_0000_0000_0000_0000_0110] perform an mii mgmt read cycle of an link partner base page ability register. (optional) setup miimadd[0000_0000_0000_0000_0001_0001_0000_0101] clear miimcom[read cycle] set miimcom[read cycle] (uses the phy address (0x11) and register address (5) placed in miimadd register) when miimind[busy]=0, read the mii mgmt an link partner base page ability register and check bits 9 and 10. (half and full duplex) mii mgmt an link partner base page ability ---> [0000_0000_0000_0000_0000_000x_x110_0000] clear ievent register, ievent[0000_0000_0000_0000_0000_0000_0000_0000] initialize imask (optional) imask[0000_0000_0000_0000_0000_0000_0000_0000] initialize iaddr n (optional) iaddr n [0000_0000_0000_0000_0000_0000_0000_0000] initialize gaddr n (optional) gaddr n [0000_0000_0000_0000_0000_0000_0000_0000] initialize rctrl (optional) rctrl[0000_0000_0000_0000_0000_0000_0000_0000] initialize dmactrl (optional) dmactrl[0000_0000_0000_0000_0000_0000_0000_0000] initialize fifo_pause_ctrl, fifo_pause_ctrl[0000_0000_0000_0000_0000_0000_0000_0010] initialize (empty) transmit descriptor ring and fill buffers with data initialize tbase, tbase[llll_llll_llll_llll_llll_llll_llll_l000] initialize (empty) receive descriptor ring and f ill with empty buffers initialize rbase, rbase[llll_llll_llll_llll_llll_llll_llll_l000] enable rx and tx, maccfg1[0000_0000_0000_0000_0000_0000_0000_0101] table 14-133. rgmii mode register initialization steps (continued)
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-147 14.7.1.5 rtbi interface mode table 14-134 describes the signal configurations required for rtbi interface mode. table 14-134. rtbi interlace mode signal configuration tsec signals frequency [mhz] 125 voltage[v] 3.3/2.5 rtbi interface frequency [mhz] 62.5 voltage[v] 2.5 signals i/o no. of signals signals i/o no. of signals gtx_clk o 1 gtx_clk o 1 tx_clk i 1 txd[0] o 1 tcg[0]/tcg[5] o 1 txd[1] o 1 tcg[1]/tcg[6] o 1 txd[2] o 1 tcg[2]/tcg[7] o 1 txd[3] o 1 tcg[3]/tcg[8] o 1 txd[4] o 1 txd[5] o 1 txd[6] o 1 txd[7] o 1 tx_en o 1 tcg[4]/tcg[9] o 1 tx_er o 1 rx_clk i 1 rx_clk i 1 rxd[0] i 1 rcg[0]/rcg[5] i 1 rxd[1] i 1 rcg[1]/rcg[6] i 1 rxd[2] i 1 rcg[2]/rcg[7] i 1 rxd[3] i 1 rcg[3]/rcg[8] i 1 rxd[4] i 1 rxd[5] i 1 rxd[6] i 1 rxd[7] i 1 rx_dv i 1 rcg[4]/rcg[9] i 1
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-148 freescale semiconductor three-speed ethernet controllers table 14-135 describes the shared signals for the rtbi interface. table 14-136 describes the register initializations required to reconfigure the phy to rtbi mode following initial auto-negotiation. rx_er i 1 col i 1 crs i 1 i sum 25 sum 12 table 14-135. shared rtbi signals tsec signals i/o no. of signals rtbi signals i/o no. of signals function ec_mdio i/o 1 ec_mdio i/o 1 management interface i/o ec_mdc o 1 ec_mdc o 1 management interface clock ec_gtx_clk12 5 i1 ec_gtx_clk12 5 i 1 reference clock sum 3 sum 3 table 14-136. rtbi mode register initialization steps have the tsec n _gtx_clk configuration signal pulled high and the ec_mdc signal pulled low for rtbi mode. (tsec attempts to auto-negotiate after system reset.) set soft_reset, maccfg1[1000_0000_0000_0000_0000_0000_0000_0000] clear soft_reset, maccfg1[0000_0000_0000_0000_0000_0000_0000_0101] initialize maccfg2, maccfg2[0000_0000_0000_0000_0111_0010_0000_0101] (i/f mode = 2, full duplex = 1) initialize ecntrl, ecntrl[0000_0000_0000_0000_0001_0000_0000_0000] (this example has statistics enable = 1) table 14-134. rtbi interlace mode signal configuration (continued) tsec signals frequency [mhz] 125 voltage[v] 3.3/2.5 rtbi interface frequency [mhz] 62.5 voltage[v] 2.5 signals i/o no. of signals signals i/o no. of signals
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-149 initialize mac station address, macstnaddr2[0110_0000_0000_0010_0000_0000_0000_0000] to 02608c:876543, for example. (note that phy configuration register addresses are not necessarily consistent in all phys.) initialize mac station address, macstnaddr1[0100_0011_0110_0101_1000_0111_1000_1100] to 02608c:876543, for example. (note that phy configuration register addresses are not necessarily consistent in all phys.) assign a physical address to the tbi, tbipa[0000_0000_0000_0000_0000_0000_0001_0000] set to 16, for example. (note that phy configuration register addresses are not necessarily consistent in all phys.) setup the mii mgmt clock speed, miimcfg[0000_0000_0000_0000_0000_0000_0000_0111] set source clock divide by 28, for example, to insure that ec_mdc clock speed is not greater than 2.5 mhz. read mii mgmt indicator register and check for busy = 0, miimind ---> [0000_0000_0000_0000_0000_0000_0000_0000] this indicates that the tsec mii mgmt bus is idle. set up the mii mgmt for a read cycle to tbi control register (write the tbi?s address and register address), miimadd[0000_0000_0000_0000_0001_0000_0000_0000] the tbi control register is at offset address 0x0 from tbipa. perform an mii mgmt read cycle to verify state of tbi control register(0ptional) clear miimcom[read cycle] set miimcom[read cycle] (uses the tbi address and register address placed in miimadd register), when miimind[busy]=0, read the miimstat and look for an enable and other bit information. set up the mii mgmt for a write cycle to tbi?s an advertisement register (write the phy address and register address), miimadd[0000_0000_0000_0000_0001_0000_0000_0100] the an advertisement register is at offset address 0x04 from the tbi?s address. (in this case 0x10) perform an mii mgmt write cycle to tbi. write to mii mgmt control with 16-bit data intended for tbi?s an advertisement register, miimcon[0000_0000_0000_0000_0000_0001_1010_0000] this advertises to the link partner that the tbi supports pause and full duplex mode and does not support half duplex mode. check to see if mii mgmt write is complete. read mii mgmt indicator register and check for busy = 0, miimind ---> [0000_0000_0000_0000_0000_0000_0000_0000] this indicates that the write cycle was completed. set up the mii mgmt for a write cycle to tbi?s control register (write the phy address and register address), miimadd[0000_0000_0000_0000_0001_0000_0000_0000] the control register is at offset address 0x00 from the tbi?s address. (in this case 0x10) perform an mii mgmt write cycle to tbi. writing to mii mgmt control with 16-bit data intended for tbi?s control register, miimcon[0000_0000_0000_0000_0001_0010_0000_0000] this enables the tbi to restart auto-negotiations using the configuration set in the an advertisement register. table 14-136. rtbi mode register initialization steps (continued)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-150 freescale semiconductor three-speed ethernet controllers check to see if mii mgmt write is complete. read mii mgmt indicator register and check for busy = 0, miimind ---> [0000_0000_0000_0000_0000_0000_0000_0000] this indicates that the write cycle was completed. check to see if phy has completed auto-negotiation. set up the mii mgmt for a read cycle to the phy mii mgmt register (write the phy address and register address), miimadd[0000_0000_0000_0000_0001_0000_0000_0001] the phy status control register is at address 0x1 and in this case the phy address is 0x10. perform an mii mgmt read cycle of status register. clear miimcom[read cycle] set miimcom[read cycle] (uses the phy address (2) and register address (2) placed in miimadd register), when miimind[busy]=0, read the miimstat register and check bit 10 (an done) miimstat ---> [0000_0000_0000_0000_0000_0000_0010_0000] other information about the link is also returned. (extend status, no pre, remote fault, an ability, link status, extend ability) perform an mii mgmt read cycle of an expansion register. setup miimadd[0000_0000_0000_0000_0001_0000_0000_0110] clear miimcom[read cycle] set miimcom[read cycle] (uses the phy address (0x10) and register address (6) placed in miimadd register), when miimind[busy]=0, read the mii mgmt an expansion register and check bits 13 and 14. (np able and page rx?d) mii mgmt an expansion ---> [0000_0000_0000_0000_0000_0000_0000_0110] perform an mii mgmt read cycle of an link partner base page ability register. (optional) setup miimadd[0000_0000_0000_0000_0001_0000_0000_0101] clear miimcom[read cycle] set miimcom[read cycle] (uses the phy address (0x10) and register address (5) placed in miimadd register), when miimind[busy]=0, read the mii mgmt an link partner base page ability register and check bits 9 and 10. (half and full duplex) mii mgmt an link partner base page ability ---> [0000_0000_0000_0000_0000_000x_x110_0000] clear ievent register, ievent[0000_0000_0000_0000_0000_0000_0000_0000] initialize imask (optional) imask[0000_0000_0000_0000_0000_0000_0000_0000] initialize iaddr n (optional) iaddr n [0000_0000_0000_0000_0000_0000_0000_0000] initialize gaddr n (optional) gaddr n [0000_0000_0000_0000_0000_0000_0000_0000] initialize rctrl (optional) rctrl[0000_0000_0000_0000_0000_0000_0000_0000] initialize dmactrl (optional) dmactrl[0000_0000_0000_0000_0000_0000_0000_0000] initialize fifo_pause_ctrl, fifo_pause_ctrl[0000_0000_0000_0000_0000_0000_0000_0010] table 14-136. rtbi mode register initialization steps (continued)
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 14-151 initialize (empty) transmit descriptor ring and fill buffers with data initialize tbase, tbase[llll_llll_llll_llll_llll_llll_llll_l000] initialize (empty) receive descriptor ring and f ill with empty buffers initialize rbase, rbase[llll_llll_llll_llll_llll_llll_llll_l000] enable rx and tx, maccfg1[0000_0000_0000_0000_0000_0000_0000_0101] table 14-136. rtbi mode register initialization steps (continued)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 14-152 freescale semiconductor three-speed ethernet controllers
introduction MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-1 chapter 15 dma controller this chapter describes the dma controller of this device. 15.1 introduction the dma controller transfers blocks of data between the rapidio controller, pci, the local bus controller (lbc) interface, and the local address space, independent of the e500 core or external hosts. 15.1.1 block diagram figure 15-1 shows the block diagram of the dma controller. figure 15-1. dma block diagram 15.1.2 overview the dma controller has four high-speed dma channels. both the e500 core and external devices can initiate dma transfers. all channels are capable of complex data movement and advanced chn 0 chn 1 chn 2 chn 3 arbitration and bandwidth control source controls destination controls address address address controls te nu r e data controls te nu r e address interface data interface dma controller
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-2 freescale semiconductor dma controller transaction chaining. figure 15-1 is a high-level block diagram of the dma controller. operations such as descriptor fetches and block transfers are initiated by each channel. a channel is selected by the arbitration logic and information is passed to the source and destination control blocks for processing. the source and destination blocks generate read and write requests to the address tenure engine, which manages the dma master port address interface. after a transaction is accepted by the master port, control is transferred to the data tenure engine that manages the read and write data transfers. a channel remains active in the shared resources for the duration of the data transfer unless the allotted bandwidth per channel is reached. 15.1.3 features the dma controller offers the following features:  four high-speed/high-bandwidth channels accessible by local and remote masters  basic dma operation modes (direct, simple chaining)  extended dma operation modes (advanced chaining and stride capability)  cascading descriptor chains  misaligned transfers  programmable bandwidth control between channels  up to 256 bytes for dma sub-block transfers to maximize performance over the rapidio interface  three priority levels supported for source and destination transactions  interrupt on error and completed segment, list, or link  externally-controlled transfer using dma_dreq , dma_dack , and dma_ddone 15.1.4 modes of operation the MPC8540 has two modes of operation: basic and extended. basic mode is the dma legacy mode. it does not support advanced features. extended mode supports advanced features like striding and flexible descriptor structures. these two basic modes allow users to initiate and end dma transfers in various ways. table 15-1 summarizes the relationship between the modes and the following features:  direct mode. no descriptors are involved. software must initialize the required fields as described in table 15-2 before starting a transfer.  chaining mode. software must initialize descriptors in memory and the required fields as described in table 15-2 before starting a transfer.  single-write start mode. the dma process can be started by using a single-write command to either the descriptor address register in one of the chaining modes or the source/destination address registers in one of the direct modes.
introduction MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-3  external control capability: this allows an external agent to start, pause, and check the status of a dma transfer which has already been initialized.  channel continue capability: the channel continue capability allows software the flexibility of having the dma controller start with descriptors that have already been programmed while software continues to build more descriptors in memory.  channel abort capability: the software can abort a previously initiated transfer by setting the bit mr n [ca]. the dma controller terminates all outstanding transfers initiated by the channel without generating any errors before entering an idle state. table 15-2 describes bit settings required for each dma mode of operation table 15-1. relationship of modes and features mode mode with one additional feature mode with two additional features b (basic) bd (basic direct) bds (bd single-write start) bde (bd external control) bc (basic chaining) bce (bc external control) bcs (bc single-write start) ext (extended) extd (extended direct) extds (extd single-write start) extde (extd external control) extc (extended chaining) extce (extc external control) extcs (extc single-write start) table 15-2. dma mode field descriptions modes with features mr n [xfe] mr n [ctm] mr n [srw] mr n [em] mr n [cdsm/swsm] mr n [ems_en] basic direct modes basic direct 0 1 0 0 0 0 basic direct external control 0 1 0 0 0 1 basic direct single-write start 0 1 1 0 1 or 0 0 basic chaining modes basic chaining 0 0 reserved 0 0 0 basic chaining external control 0 0 reserved 0 0 1 basic chaining single-write start 0 0 reserved 0 1 0 extended direct modes extended direct 1 1 0 0 0 0 extended direct external control 1 1 0 0 0 1 extended direct single-write start 11 10 1 or 0 0
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-4 freescale semiconductor dma controller refer to section 15.4, ?functional description,? for details on these modes. figure 15-2 shows the general dma operational flow chart. figure 15-2. dma operational flow chart extended chaining modes extended chaining 1 0 reserved 0 0 0 extended chaining external control 10reserved0 0 1 extended chaining single-write start 1 0 reserved 0 1 0 table 15-2. dma mode field descriptions (continued) modes with features mr n [xfe] mr n [ctm] mr n [srw] mr n [em] mr n [cdsm/swsm] mr n [ems_en] software sets 1st link process link last link? is n y n chain or extended done - dma halts y is last list? n y advance list advance mode? in link
external signal descriptions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-5 15.2 external signal descriptions this section describes the dma signals. 15.2.1 signal overview figure 15-3 summarizes the dma controller signals. figure 15-3. dma signal summary note that the three dma signals for dma channel 3 are multiplexed with the irq9?11 signals on the MPC8540 device. these functions are mutually exclusive and the active function is specified in the pmuxcr register of the global utilities block as described in section 18.4.1.10, ?alternate function signal multiplex control register (pmuxcr).? dma_ddone0 dma external control interface dma dma_dreq0 dma_dack0 1 1 1 dma_ddone1 dma_dreq1 dma_dack1 1 1 1 dma_ddone2 dma_dreq2 dma_dack2 1 1 1 dma_ddone3 dma_dreq3 dma_dack3 1 1 1 unit
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-6 freescale semiconductor dma controller 15.2.2 detailed signal descriptions table 15-3 describes the dma signals. 15.3 memory map/register definition this section provides a detailed description of all accessible dma memory and registers. the descriptions include individual bit level descriptions and reset states of each register. table 15-3. dma signals?detailed signal descriptions signal i/o description dma_dreq n dma request i dma request. the dma request signal indicates the start of a dma transfer or a restart from a paused request. the falling edge of dma_dreq n causes mr n [cs] to be set, thereby activating the corresponding dma channel. state meaning asserted?assertion of dma_dreq n while dma_dack n is negated causes a new transfer to start or resumes a paused transfer if the emp_en bit is set. assertion while dma_dack n is asserted results in an illegal condition negated?negation while dma_dack n is asserted has no effect. negation before the assertion of dma_dack n results in an illegal condition timing assertion?can be asserted asynchronously negation? must remain asserted at least until the assertion of the corresponding dma_dack n dma_dack n o dma acknowledge. indicates that a dma transfer is currently in progress state meaning asserted?indicates that a dma transfer is currently in progress. asserted after the assertion of dma_dreq to indicate the start of a transfer negated?negated after finishing a complete transfer or after entering a paused state if mr n [emp_en] is set timing assertion?asynchronous assertion; asserted for more than three system clocks negation?asynchronous negation; negated for more than three system clocks dma_ddone n o dma done. indicates that a dma transfer is complete. state meaning asserted?indicates transfer completion. srn[cb] is clear. note, however, that write data may still be queued at the target interface or in the process of transfer on an external interface. negated?indicates that the current transfer is in process timing assertion?always asserts asynchronously after the negation of the final dma_dack n to indicate completion of a transfer. for a paused transfer, dma_ddone n is asserted asynchronously after the negation of the final dma_dack n . negation?negated asynchronously after the assertion of dma_dreq n for the next transfer
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-7 15.3.1 module memory map figure 15-4 shows the address map of dma register space. figure 15-4. dma register space (memory-mapped) table 15-4 lists the dma registers. table 15-4. dma register summary offset register access reset section/page general registers 0x2_1100 mr0?dma mode register 0 r/w 0x0000_0000 15.3.2.1/15-10 0x2_1104 sr0?dma status register 0 special 0x0000_0000 15.3.2.2/15-13 0x2_1108 reserved ? ? ? 0x2_110c clndar0?dma current link descriptor address register 0 r/w 0x0000_0000 15.3.2.3/15-14 0x2_1110 satr0?dma source attributes register 0 r/w 0x0000_0000 15.3.2.4/15-16 0x2_1114 sar0?dma source address register 0 r/w 0x0000_0000 15.3.2.5/15-18 0x2_1118 datr0?dma destination attributes register 0 r/w 0x0000_0000 15.3.2.6/15-19 0x2_111c dar0?dma destination address register 0 r/w 0x0000_0000 15.3.2.7/15-21 0x2_1120 bcr0?dma byte count register 0 r/w 0x0000_0000 15.3.2.8/15-23 0x2_1124 reserved ? ? ? 0x2_1128 nlndar0?dma next link descriptor address register 0 r/w 0x0000_0000 15.3.2.9/15-23 0x2_112c ? 0x2_1130 reserved ? ? ? general dma registers 0x2_1000 0x2_1300 0x2_1fff reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-8 freescale semiconductor dma controller 0x2_1134 clsdar0?dma current list alternate base descriptor address register 0 r/w 0x0000_0000 15.3.2.10/15-24 0x2_1138 reserved ? ? ? 0x2_113c nlsdar0?dma next list descriptor address register 0 r/w 0x0000_0000 15.3.2.11/15-25 0x2_1140 ssr0?dma source stride register 0 r/w 0x0000_0000 15.3.2.12/15-25 0x2_1144 dsr0?dma destination stride register 0 r/w 0x0000_0000 15.3.2.13/15-26 0x2_1148 ? 0x2_117c reserved ? ? ? 0x2_1180 mr1?dma mode register 1 r/w 0x0000_0000 15.3.2.1/15-10 0x2_1184 sr1?dma status register 1 special 0x0000_0000 15.3.2.2/15-13 0x2_1188 reserved ? ? ? 0x2_118c clndar1?dma current link descriptor address register 1 r/w 0x0000_0000 15.3.2.3/15-14 0x2_1190 satr1?dma source attributes register 1 r/w 0x0000_0000 15.3.2.4/15-16 0x2_1194 sar1?dma source address register 1 r/w 0x0000_0000 15.3.2.5/15-18 0x2_1198 datr1?dma destination attributes register 1 r/w 0x0000_0000 15.3.2.6/15-19 0x2_119c dar1?dma destination address register 1 r/w 0x0000_0000 15.3.2.7/15-21 0x2_11a0 bcr1?dma byte count register 1 r/w 0x0000_0000 15.3.2.8/15-23 0x2_11a4 reserved ? ? ? 0x2_11a8 nlndar1?dma next link descriptor address register 1 r/w 0x0000_0000 15.3.2.9/15-23 0x2_11ac ? 0x2_11b0 reserved ? ? ? 0x2_11b4 clsdar1?dma current list alternate base descriptor address register 1 r/w 0x0000_0000 15.3.2.10/15-24 0x2_11b8 reserved ? ? ? 0x2_11bc nlsdar1?dma next list descriptor address register 1 r/w 0x0000_0000 15.3.2.11/15-25 0x2_11c0 ssr1?dma source stride register 1 r/w 0x0000_0000 15.3.2.12/15-25 0x2_11c4 dsr1?dma destination stride register 1 r/w 0x0000_0000 15.3.2.13/15-26 0x2_11c8 ? 0x2_11fc reserved ? ? ? 0x2_1200 mr2?dma mode register 2 r/w 0x0000_0000 15.3.2.1/15-10 0x2_1204 sr2?dma status register 2 special 0x0000_0000 15.3.2.2/15-13 0x2_1208 reserved ? ? ? 0x2_120c clndar2?dma current link descriptor address register 2 r/w 0x0000_0000 15.3.2.3/15-14 0x2_1210 satr2?dma source attributes register 2 r/w 0x0000_0000 15.3.2.4/15-16 0x2_1214 sar2?dma source address register 2 r/w 0x0000_0000 15.3.2.5/15-18 table 15-4. dma register summary (continued) offset register access reset section/page
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-9 0x2_1218 datr2?dma destination attributes register 2 r/w 0x0000_0000 15.3.2.6/15-19 0x2_121c dar2?dma destination address register 2 r/w 0x0000_0000 15.3.2.7/15-21 0x2_1220 bcr2?dma byte count register 2 r/w 0x0000_0000 15.3.2.8/15-23 0x2_1224 reserved ? ? ? 0x2_1228 nlndar2?dma next link descriptor address register 2 r/w 0x0000_0000 15.3.2.9/15-23 0x2_122c ? 0x2_1230 reserved ? ? ? 0x2_1234 clsdar2?dma current list alternate base descriptor address register 2 r/w 0x0000_0000 15.3.2.10/15-24 0x2_1238 reserved ? ? ? 0x2_123c nlsdar2?dma next list descriptor address register 2 r/w 0x0000_0000 15.3.2.11/15-25 0x2_1240 ssr2?dma source stride register 2 r/w 0x0000_0000 15.3.2.12/15-25 0x2_1244 dsr2?dma destination stride register 2 r/w 0x0000_0000 15.3.2.13/15-26 0x2_1248 ? 0x2_127c reserved ? ? ? 0x2_1280 mr3?dma mode register 3 r/w 0x0000_0000 15.3.2.1/15-10 0x2_1284 sr3?dma status register 3 special 0x0000_0000 15.3.2.2/15-13 0x2_1288 reserved ? ? ? 0x2_128c clndar3?dma current link descriptor address register 3 r/w 0x0000_0000 15.3.2.3/15-14 0x2_1290 satr3?dma source attributes register 3 r/w 0x0000_0000 15.3.2.4/15-16 0x2_1294 sar3?dma source address register 3 r/w 0x0000_0000 15.3.2.5/15-18 0x2_1298 datr3?dma destination attributes register 3 r/w 0x0000_0000 15.3.2.6/15-19 0x2_129c dar3?dma destination address register 3 r/w 0x0000_0000 15.3.2.7/15-21 0x2_12a0 bcr3?dma byte count register 3 r/w 0x0000_0000 15.3.2.8/15-23 0x2_12a4 reserved ? ? ? 0x2_12a8 nlndar3?dma next link descriptor address register 3 r/w 0x0000_0000 15.3.2.9/15-23 0x2_12ac ? 0x2_12b0 reserved ? ? ? 0x2_12b4 clsdar3?dma current list alternate base descriptor address register 3 r/w 0x0000_0000 15.3.2.10/15-24 0x2_12b8 reserved ? ? ? 0x2_12bc nlsdar3?dma next list descriptor address register 3 r/w 0x0000_0000 15.3.2.11/15-25 0x2_12c0 ssr3?dma source stride register 3 r/w 0x0000_0000 15.3.2.12/15-25 0x2_12c4 dsr3?dma destination stride register 3 r/w 0x0000_0000 15.3.2.13/15-26 table 15-4. dma register summary (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-10 freescale semiconductor dma controller 15.3.2 dma register descriptions the following sections describe the dma registers. the majority of these registers are channel-specific and can be identified by one of the four offsets that describe the register. 15.3.2.1 mode registers (mr n ) the mode register allows software to start a dma transfer and to control various dma transfer characteristics. figure 15-5 describes the mr n . figure 15-5. dma mode registers (mr n ) 0x2_12c8 ? 0x2_12fc reserved ? ? ? 0x2_1300 dgsr?dma general status register read 0x0000_0000 15.3.2.14/15-26 0 3 4 7 8 9 10 11 12 13 14 15 r0 0 0 0 bwc 00 emp_en 00 ems_en dahts w reset 0000_0000_0000_0000 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 r sahts dahe sahe 0 srw eosie eolnie eolsie eie xfe cdsm/ swsm ca ctm cc cs w reset 0000_0000_0000_0000 offset 0x2_1100, 0x2_1180, 0x2_1200, 0x2_1280 table 15-4. dma register summary (continued) offset register access reset section/page
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-11 table 15-5 describes the mr n fields. table 15-5. mr n field descriptions bits name description 0?3 ? reserved 4?7 bwc bandwidth/pause control. defined only if multiple channels are executing transfers concurrently or if mr n [emp_en] is set. determines how many bytes a given channel is allowed to transfer before the dma engine switches to the next channel. the dma channel pauses during this switch if mr n [emp_en] is set for this channel. 0000 1 byte 0001 2 bytes 0010 4 bytes 0011 8 bytes 0100 16 bytes 0101 32 bytes 0110 64 bytes 0111 128 bytes 1000 256 bytes 1001 512 bytes 1010 1024 bytes 1011?1110 reserved 1111 disable bandwidth sharing to allow uninterrupted transfers from each channel. 8?9 ? reserved 10 emp_en external master pause enable. valid only if mr n [ems_en] is set. 0 disable the channel from being paused by an external master. 1 enable the channel to be paused by an external master. 11?12 ? reserved 13 ems_en external master start enable. this bit does not apply to single-write start modes (direct or chaining). 0 disable the channel from being started by an external dma start pin. 1 enable the channel to be started by an external dma start pin, which sets mr n [cs]. 14?15 dahts destination address hold transfer size. indicates the transfer size used for each transaction while mr n [dahe] is set. the byte count register must be in multiples of the size and the destination address register must be aligned based on the size. the transfer size assigned to mr n [dahts] must be equal to or smaller than that assigned to mr n [bwc] to avoid undefined behavior. 00 1 byte 01 2 bytes 10 4 bytes 11 8 bytes 16?17 sahts source address hold transfer size. indicates the transfer size used for each transaction while mr n [sahe] is set. the byte count register must be in multiples of the size and the source address register must be aligned based on the size. the transfer size assigned to mr n [sahts] must be equal to or smaller than that assigned to mr n [bwc] to avoid undefined behavior. 00 1 byte 01 2 bytes 10 4 bytes 11 8 bytes 18 dahe destination address hold enable 0 disable destination address hold. 1 enable the dma controller to hold the destination address of a transfer to the size specified by mr n [dahts]. hardware only supports aligned transfers for this feature. 19 sahe source address hold enable 0 disable source address hold. 1 enable the dma controller to hold the source address of a transfer to the size specified by mr n [sahts]. hardware only supports aligned transfers for this feature.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-12 freescale semiconductor dma controller 20 ? reserved 21 srw single register write (direct mode only; reserved for chaining mode.) 0 normal operation. 1 enable a write to the source address register to simultaneously set mr n [cs], starting a dma transfer, when mr n [cdsm/swsm] is also set. setting this bit and clearing cdsm/swsm causes a write to the destination address register to simultaneously set mr n [cs], starting a dma transfer. 22 eosie end-of-segments interrupt enable 0 do not generate an interrupt at the completion of a data transfer. clndar n [eosie] overrides this bit on a link descriptor basis. 1 generate an interrupt at the completion of a data transfer (that is, sr n [eosi] is set). this bit overrides the clndar n [eosie]. 23 eolnie end-of-links interrupt enable 0 do not generate an interrupt at the completion of a list of dma transfers. 1 generate an interrupt at the completion of a list of dma transfers (that is, nlndar n [eolnd] is set). 24 eolsie end-of-lists interrupt enable 0 do not generate an interrupt at the completion of all dma transfers. 1 generate an interrupt at the completion of all dma transfers (that is, nlndar n [eolnd] and nlsdar n [eolsd] are set). 25 eie error interrupt enable 0 do not generate an interrupt if a programming or transfer error is detected. 1 generate an interrupt if a programming or transfer error is detected. 26 xfe extended features enable 0 disable the new chaining features. 1 enable the new chaining features. 27 cdsm/ swsm  in chaining mode: current descriptor start mode/single-write start mode.  in basic mode (mr n [xfe] is cleared), setting this bit causes a write to the current link descriptor address register to simultaneously set mr n [cs], starting a dma transfer.  in extended chaining mode (mr n [xfe] is set), setting this bit causes a write to the current list descriptor address register to simultaneously set mr n [cs], starting a dma transfer.  in direct mode: setting this bit and mr n [srw] causes a write to the source address register to simultaneously set mr n [cs], starting a dma transfer. clearing this bit and setting mr n [srw] causes a write to the destination address register to simultaneously set mr n [cs], starting a dma transfer. this bit must be cleared when mr n [srw] is cleared. 28 ca channel abort 0no effect. 1 cause the current transfer to be aborted and sr n [cb] to be cleared if the channel is busy. the channel remains in the idle state until a new transfer is programmed. 29 ctm channel transfer mode 0 configure the channel in chaining mode. 1 configure the channel into direct mode. this means that software is responsible for placing all the required parameters into necessary registers to start the dma process. table 15-5. mr n field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-13 15.3.2.2 status registers (sr n ) the status registers, shown in figure 15-6 , report various dma conditions during and after a dma transfer. figure 15-6. status registers (sr n ) table 15-6 describes the bits of the sr n . 30 cc channel continue. this bit applies only to chaining mode and is cleared by hardware after the first descriptor read when continuing a transfer. this bit is reserved for external master mode. 0no effect. 1 the dma transfer restarts the transferring process starting at the current descriptor address. 31 cs channel start. this bit is also automatically set by hardware during single-write start mode and external master start enable mode. 0 halt the dma process if channel is busy (sr n [cb] is set). no effect if the channel is not busy. 1 start the dma process if channel is not busy (cb is cleared). if the channel was halted (cs = 0 and cb = 1), the transfer continues from the point at which it was halted. 0 23 24 25 26 27 28 29 30 31 r0 0000000000000000000000 0 te 0ch pe eolni cb eosi eolsi w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_1104, 0x2_1184, 0x2_1204, 0x2_1284 table 15-6. sr n field descriptions bits name description 0?23 ? reserved 24 te transfer error (bit reset, write 1 to clear) 0 no error condition during the dma transfer. 1 error condition during the dma transfer. see section 15.4.3, ?dma errors? for additional information. 25 ? reserved 26 ch channel halted. cleared automatically by hardware if mr n [cs] is set again for resuming a halted transfer. 0 channel is not halted. if software attempts to halt an idle channel (sr n [cb] is cleared), this bit will remain 0. 1 dma transfer was successfully halted by software and it can be resumed. 27 pe programming error (bit reset, write 1 to clear) 0 no programming error detected. 1 a programming error is detected that prevents the dma transfer from occurring. table 15-5. mr n field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-14 freescale semiconductor dma controller 15.3.2.3 current link descriptor address registers (clndar n ) current link descriptor address registers contain the address of the current link descriptor. in basic chaining mode, shown in figure 15-7 , software must initialize this register to point to the first link descriptor in memory. 28 eolni end-of-links interrupt. after transferring the last block of data in the last link descriptor, if mr n [eolsie] is set, then this bit is set and an interrupt is generated. (bit reset, write 1 to clear) 29 cb channel busy 0 dma transfer is finished, an error occurred, or a channel abort occurred. 1 a dma transfer is currently in progress. 30 eosi end-of-segment interrupt. in chaining mode, after finishing a data transfer, if mr n [eosie] is set or if clndar n [eosie] is set, this bit gets set and an interrupt is generated. in direct mode, if mrn[eosie] is set, this bit gets set and an interrupt is generated. (bit reset, write 1 to clear) 31 eolsi end-of-list interrupt. after transferring the last block of data in the last list descriptor, if mr n [eolsie] is set, then this bit is set and an interrupt is generated. (bit reset, write 1 to clear) table 15-6. sr n field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-15 figure 15-7. basic chaining mode flow chart after the current descriptor is processed, the current link descriptor address register is loaded from the next link descriptor address register and nlndar n [eolnd] in the next link descriptor address register is examined. if eolnd is zero, the dma controller reads in the new current link descriptor for processing. if eolnd is set, the last descriptor of the list was just completed. if extended chaining mode is not enabled, all dma transfers are complete and the dma controller halts. if extended chaining mode is enabled, the dma controller examines the state of nlsdar n [eolsd] in the next list descriptor address register. if eolsd is clear, the controller loads the contents of the next list descriptor address register into the current list descriptor address register and reads the new list descriptor from memory. if eolsd is set, all dma transfers are complete and the dma controller halts. software initializes clndar n with 1st link descriptor. 1st link descriptor is processed. current link descriptor next link descriptor. nlndar n [eolnd] set? is n y n extended chaining enabled? is last link descriptor has been processed. done ? dma halts. y is nlsdar n [eolsd] set? n y clsdar n nlsdar n
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-16 freescale semiconductor dma controller figure 15-8 shows clndar n. figure 15-8. current link descriptor address registers (clndar n ) table 15-7 describes the fields of the clndar n . 15.3.2.4 source attributes registers (satr n ) the source attributes registers, shown in figure 15-9 , contain the transaction attributes to be used for the dma operation. stride mode is enabled by setting satr n [ssme]. source read transaction type is specified using the sreadttype field. atmu bypass mode is enabled by setting satr n [sbpatmu]. atmu bypass mode is only applicable for accesses to rapidio. if sbpatmu is set, stransint must be set to rapidio and attributes that would otherwise come from the atmu must be specified in this register. if sbpatmu is not set, attributes are derived from local access windows and outbound atmu registers according to the transaction address. 0 26 27 28 29 30 31 r clnda 0 eosie 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_110c, 0x2_118c, 0x2_120c, 0x2_128c table 15-7. clndar n field descriptions bits name description 0?26 clnda current link descriptor address. contains the current descriptor address of the buffer descriptor in memory. the descriptor must be aligned to a 32-byte boundary. 27 ? reserved 28 eosie end-of-segment interrupt enable 0 do not generate an interrupt upon completion of the current dma transfer for the current link descriptor. 1 generate an interrupt upon completion of the current dma transfer for the current link descriptor. 29?31 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-17 figure 15-9. source attributes registers (satr n ) table 15-8 describes the fields of the satr n . 01 2 345 6 78 1112 15 r0 0 sbpatmu 0 stflowlvl spciorder ssme stransint sreadttype w reset 0000_0000_0000_0000 16 21 22 31 r00 0 000 esad w reset 0000_0000_0000_0000 offset 0x2_1110, 0x2_1190, 0x2_1210, 0x2_1290 table 15-8. satr n field descriptions bits name description 0?1 ? reserved 2 sbpatmu bypass atmu for this dma operation 0 route the operation through the atmu outbound windows. satr n [sreadttype] should specify a local address space transaction type. 1 bypass atmu. never generate an address match. always use the attributes in the source attribute registers. route the transaction to the interface specified in satr n [stransint]. applicable only to rapidio interface. 3?reserved 4?5 stflowlvl rapidio transaction flow level 00 lowest priority transaction flow 01 next highest priority transaction flow 10 highest priority level transaction flow 11 reserved applicable only to rapidio interface, while satr n [sbpatmu] is set. 6 spciorder follow pci transaction ordering rules (elevate write priority one level over reads). applicable only while satr n [sbpatmu] is set. 7 ssme source stride mode enable 0 stride mode disabled. 1 stride mode enabled. ignored in basic mode (mr n [xfe] is cleared). striding on the source address can be accomplished by enabling satr n [ssme] and setting the desired stride size and distance in the ssr n . 8?11 stransint dma source transaction interface 0000?1011 reserved 1100 rapidio interface 1101?1111 reserved applicable only to rapidio interface, while satr n [sbpatmu] is set.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-18 freescale semiconductor dma controller 15.3.2.5 source address registers (sar n ) the source address registers, shown in figure 15-10 , contain the address from which the dma controller reads data. in direct mode, if mr n [cdsm/swsm] and mr n [srw] are set, a write to this register simultaneously sets mr n [cs], starting a dma transfer. software must ensure that this is a valid address. figure 15-10. source address registers (sar n ) table 15-9 describes the field of the sar n . 12?15 sreadttype dma source transaction type. reserved values will result in a programming error being detected and logged in sr[pe].  transaction type to run on rapidio interface in atmu bypass mode 0000?0001 reserved 0010 i/o read home 0011 reserved 0100 nread 0101?0110 reserved 0111 maintenance read 1000? 1111 reserved  transaction type to run on local address space - used even in non-atmu bypass mode 0000?0001 reserved 0011 reserved 0100 read, don?t snoop local processor 0101 read, snoop local processor 0111 read, unlock l2 cache line 1000? 1111 reserved 16?21 ? reserved 22?31 esad extended source address. esad[0?7] represent the target id. esad[8?9] represent the two high-order bits of the local device offset over the rapidio interface. applicable only to rapidio interface, while satr n [sbpatmu] is set. 0 31 r sad w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_1114, 0x2_1194, 0x2_1214, 0x2_1294 table 15-8. satr n field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-19 15.3.2.5.1 source address registers for rapidio maintenance reads (sar n ) if rapidio is the source of a transaction, the sar n registers are redefined as shown below. several options exist for the packet type that can be specified. a maintenance read is one of many possible reads. maintenance packets have an offset instead of an address. figure 15-11 describes the sar n . figure 15-11. source address registers for rapidio maintenance reads (sar n ) table 15-10 describes the fields of the sar n . 15.3.2.6 destination attributes registers (datr n ) the destination attributes registers, shown in figure 15-12 , contain the transaction attributes for the dma operation. stride mode is enabled by setting datr n [dsme]. destination write transaction type is specified using the dwritettype field. atmu bypass mode, which is applicable only for accesses to rapidio, is enabled by setting datr n [dbpatmu]. if dbpatmu is set, dtransint must be set to rapidio and attributes that would otherwise come from the atmu must be specified in this register. if dbpatmu is zero, the target interface is derived from the local access atmu mapping and the transaction is obtained from the value specified in dwritettype using the local address space category. table 15-9. sar n field descriptions bits name description 0?31 sad source address. this register contains the source address of the dma transfer. the contents are updated after every dma write operation unless the final stride of a striding operation is less than the stride size, in which case it remains equal to the address from which the last stride began. 078 29 30 31 r hop_count config_offset 00 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_1114, 0x2_1194, 0x2_1214, 0x2_1294 table 15-10. sar n field descriptions bits name description 0?7 hop_count maintenance packet hop_count as defined by the rapidio interconnect specification 1.2 8?29 config_offset maintenance packet word offset as defined by the rapidio interconnect specification 1.2 30?31 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-20 freescale semiconductor dma controller figure 15-12. destination attributes registers (datr n ) table 15-11 describes the fields of the datr n . 01 2 3 4 5 6 78 1112 15 r0 0 dbpatmu 0 dtflowlvl dpci_order dsme dtransint dwritettype w reset 0000_0000_0000_0000 16 21 22 31 r0 0 0 0 0 0 edad w reset 0000_0000_0000_0000 offset 0x2_1118, 0x2_1198, 0x2_1218, 0x2_1298 table 15-11. datr n field descriptions bits name description 0?1 ? reserved 2 dbpatmu bypass atmu for this dma operation 0 route the operation through the atmu outbound windows. datr n [dwritettype] should specify a local address space transaction type. 1 bypass atmu. never generate an address match. always use the attributes in the destination attribute registers. route the transaction to the interface specified in the datr n [dtransint] field. applicable only to rapidio interface. 3?reserved 4?5 dtflowlvl rapidio transaction flow level 00 lowest priority transaction flow 01 next highest priority transaction flow 10 highest priority transaction flow 11 reserved applicable only to rapidio interface, while datr n [dbpatmu] is set. 6 dpci_order follow pci transaction ordering rules on rapidio (elevate write priority one level over reads). applicable only while datr n [dbpatmu] is set. 7 dsme destination stride mode enable 0 stride mode disabled. 1 stride mode enabled. ignored in basic mode (mr n [xfe] is cleared). striding on the destination address can be accomplished by setting dsme and setting the desired stride size and distance in dsr n . 8?11 dtransint dma destination transaction interface 0000?1011 reserved 1100 rapidio interface 1101?1111 reserved applicable only while datr n [dbpatmu] is set.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-21 15.3.2.7 destination address registers (dar n ) the destination address registers, shown in figure 15-13 , contain the addresses to which the dma controller writes data. in direct mode, if mr n [srw] is set and mr n [cdsm/swsm] is cleared, a write to this register simultaneously sets mr n [cs], starting a dma transfer. software must ensure that this is a valid address. figure 15-13. destination address registers (dar n ) 12?15 dwritettype dma destination transaction type. reserved values will result in a programming error being detected and logged in sr[pe].  transaction type to run on rapidio interface in atmu bypass mode 0000 reserved 0001 flush 0010 reserved 0011 swrite for all but last, nwrite_r for last transaction 0100 nwrite for all but last, nwrite_r for last transaction 0101 nwrite_r 0110 message of size 8, 16, 32, 64, 128 or 256 bytes. (other message sizes produce boundedly undefined behavior.) 0111 maintenance write 1000?1111reserved  transaction type to run on local address space?used even in non-atmu bypass mode 0000?0011reserved 0100 write, don?t snoop local processor 0101 write, snoop local processor 0110 write, allocate l2 cache line 0111 write, allocate and lock l2 cache line 1000?1111 reserved 16?21 ? reserved 22?31 edad extended destination address. applicable only for rapidio interface with datr n [dbpatmu] set. edad[0?7] represents the rapidio target id. edad[8?9] is defined as follows, subject to the transaction type: message: edad[8?9] represents the value for the mbox field in the message packet. other: edad[8?9] represents the two high-order bits of the local device offset. 0 31 r dad w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_111c, 0x2_119c, 0x2_121c, 0x2_129c table 15-11. datr n field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-22 freescale semiconductor dma controller table 15-12 describes the field of the dar n . 15.3.2.7.1 destination address registers for rapidio maintenance writes (dar n ) if rapidio is the destination of a transaction, the dar n registers are redefined as shown below. several options exist for the transaction type that can be specified. there are a number of noncoherent write and flush types for address-based write transactions, and message types for port-based write transactions. maintenance packets have an offset instead of an address. figure 15-14 shows the dar n . figure 15-14. destination address regist ers for rapidio maintenance writes (dar n ) table 15-13 describes the fields of the dar n . table 15-12. dar n field descriptions bits name description 0?31 dad destination address. this register contains the destination address of the dma transfer. the contents are updated after every dma write operation unless the final stride of a striding operation is less than the stride size, in which case it remains equal to the address from which the last stride began. 078 29 30 31 r hop_count config_offset 00 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_111c, 0x2_119c, 0x2_121c, 0x2_129c table 15-13. dar n field descriptions bits name description 0?7 hop_count maintenance packet hop count as defined by the rapidio interconnect specification 1.2 8?29 config_offset maintenance packet word offset as defined by the rapidio interconnect specification 1.2 30?31 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-23 15.3.2.8 byte count registers (bcr n ) the byte count register, shown in figure 15-15 , contains the number of bytes to transfer. figure 15-15. byte count registers (bcr n ) table 15-14 describes the fields of the bcr n . 15.3.2.9 next link descriptor address registers (nlndar n ) the next link descriptor address registers, shown in figure 15-16 , contain the address for the next link descriptor in memory. contents transferred to the current descriptor address registers become effective for the current transfer in basic and extended chaining modes. figure 15-16. next link descriptor address registers (nlndar n ) table 15-15 describes the fields of the nlndar n registers. 056 31 r000000 bc w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_1120, 0x2_11a0, 0x2_1220, 0x2_12a0 table 15-14. bcr n field descriptions bits name description 0?5 ? reserved 6?31 bc byte count. contains the number of bytes to transfer. the value in this register is decremented after each dma read operation. the maximum transfer size is 2 26 ? 1 bytes. 0 26 27 28 29 30 31 r nlnda 0 ndeosie 00 eolnd w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_1128, 0x2_11a8, 0x2_1228, 0x2_12a8 table 15-15. nlndar n field descriptions bits name description 0?26 nlnda next link descriptor address. contains the next link descriptor address in memory. the descriptor must be aligned to a 32-byte boundary. 27 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-24 freescale semiconductor dma controller 15.3.2.10 current list descriptor address registers (clsdar n ) the current list descriptor address registers, shown in figure 15-17 , contain the current address of the list descriptor in memory in extended chaining mode. in extended chaining mode, software must initialize clsdar n to point to the first list descriptor in memory. after finishing the last link descriptor in the current list, the dma controller loads the contents of the next list descriptor address register into the current list descriptor address register. if nlsdar n [eolsd] in the next list descriptor address register is clear, the dma controller reads the new current list descriptor from memory to process that list. if eolsd in the next list descriptor address register is set and the last link in the current list is finished all dma transfers are complete. n figure 15-17. current list descriptor address registers (clsdar n ) table 15-16 describes the fields of the clsdar n . 28 ndeosie next descriptor end-of-segment interrupt enable 0 do not generate an interrupt if the current dma transfer for the current descriptor is finished. 1 generate an interrupt if the current dma transfer for the current descriptor is finished. 29?30 ? reserved 31 eolnd end-of-links descriptor. this bit is ignored in direct mode. 0 this descriptor is not the last link descriptor in memory for this list. 1 this descriptor is the last link descriptor in memory for this list. if this bit is set, the dma controller advances to the next list descriptor in memory if nlsdar n [eolsd] is also set in extended mode. 0 26 27 31 r clsda 00000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_1134, 0x2_11b4, 0x2_1234, 0x2_12b4 table 15-16. clsdar n field descriptions bits name description 0?26 clsda current list descriptor address. contains the current list descriptor address of the buffer descriptor in memory in extended chaining mode. the descriptor must be aligned to a 32-byte boundary. 27?31 ? reserved table 15-15. nlndar n field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-25 15.3.2.11 next list descriptor address registers (nlsdar n ) the next list descriptor address register, shown in figure 15-18 , contains the address for the next list descriptor in memory. if the contents are transferred to the current list descriptor address register they become effective for the current transfer in extended chaining mode. figure 15-18. next list descriptor address registers (nlsdar n ) table 15-17 describes the fields of the nlsdar n . 15.3.2.12 source stride registers (ssr n ) the source stride register, shown in figure 15-19 , contains the stride size and distance. note that the source stride information is loaded when a new list descriptor is read from memory. therefore, the source stride register is applicable for all link descriptors in the new list. changing the source stride information for a link requires that a new list be generated. figure 15-19. source stride registers (ssr n ) 0 26 27 31 r nlsda 0000eolsd w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_113c, 0x2_11bc, 0x2_123c, 0x2_12bc table 15-17. nlsdar n field descriptions bits name description 0?26 nlsda next list descriptor address. contains the next descriptor address of the buffer descriptor in memory. the descriptor must be aligned on a 32-byte boundary. 27?30 ? reserved 31 eolsd end-of-lists descriptor. this bit is ignored in direct mode. 0 this list descriptor is not the last list descriptor in memory. 1 this list descriptor is the last list descriptor in memory. if this bit is set, then the dma controller halts after the last link descriptor transaction is finished. 078 1920 31 r000000 0 0 sss ssd w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_1140, 0x2_11c0, 0x2_1240, 0x2_12c0
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-26 freescale semiconductor dma controller table 15-18 describes the fields of the ssr n . 15.3.2.13 destination stride registers (dsr n ) the destination stride register contains the stride size, and distance. note that the destination stride information is loaded when a new list descriptor is read from memory. therefore, the destination stride register is applicable for all link descriptors in the new list. changing the destination stride information for a link requires that a new list be generated. figure 15-20 describes the dsr n . figure 15-20. destination stride registers (dsr n ) table 15-19 describes the fields of the dsr n . 15.3.2.14 dma general status register (dgsr) the dma general status register combines all of the status bits from each channel into one register, including the enhanced dma channel. this register is read-only. figure 15-21 describes the dgsr. table 15-18. ssr n field descriptions bits name description 0?7 ? reserved 8?19 sss source stride size. number of bytes to transfer before jumping to the next address as specified in the source stride distance field. 20?31 ssd source stride distance. the source stride distance in bytes from start byte to start byte. 078 1920 31 r000000 0 0 dss dsd w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_1144, 0x2_11c4, 0x2_1244, 0x2_12c4 table 15-19. dsr n field descriptions bits name description 0?7 ? reserved 8?19 dss destination stride size. number of bytes to transfer before jumping to the next address as specified in the destination stride distance field. 20?31 dsd destination stride distance. the destination stride distance in bytes from start byte to start byte.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-27 figure 15-21. dma general status register (dgsr) table 15-20 describes the fields of the dgsr. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 r te0 0 ch0 pe0 eolni0 cb0 eosi0 eolsi0 te1 0 ch1 pe1 eolni1 cb1 eosi1 eolsi1 w reset 0000_0000_0000_0000 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 r te2 0 ch2 pe2 eolni2 cb2 eosi2 eolsi2 te3 0 ch3 pe3 eolni3 cb3 eosi3 eolsi3 w reset 0000_0000_0000_0000 offset 0x2_1300 table 15-20. dgsr field descriptions bits name description 0 te0 transfer error, channel 0 0 normal operation 1 an error condition occurred during the dma transfer. 1?reserved 2 ch0 channel halted, channel 0 3 pe0 programming error, channel 0 4 eolni0 end-of-links interrupt, channel 0 5 cb0 channel busy, channel 0 6 eosi0 end-of-segment interrupt, channel 0 7 eolsi0 end-of-lists/direct interrupt, channel 0 8 te1 transfer error, channel 1 0 normal operation 1 an error condition occurred during the dma transfer. 9?reserved 10 ch1 channel halted, channel 1 11 pe1 programming error, channel 1 12 eolni1 end-of-links interrupt, channel 1 13 cb1 channel busy, channel 1 14 eosi1 end-of-segment interrupt, channel 1 15 eolsi1 end-of-lists/direct interrupt, channel 1
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-28 freescale semiconductor dma controller 15.4 functional description this section describes the function of the the dma controller. 15.4.1 dma channel operation all dma channels support two different modes of operation; a basic mode (mr n [xfe] is cleared) and an extended mode (mr n [xfe] is set). in both modes, a channel can be activated by clearing and setting mr n [cs], or via the single-write start mode using mr n [cdsm/swsm] and mr n [srw], or via an external control mode using mr n [ecs_en]. in basic mode, the channel can be programmed in basic direct mode or basic chaining mode. in extended mode, the channel can be programmed in extended direct mode or extended chaining mode. extended mode provides more capabilities, such as extended descriptor chaining, striding capabilities, and a more flexible descriptor structure. 16 te2 transfer error, channel 2 0 normal operation 1 an error condition occurred during the dma transfer. 17 ? reserved 18 ch2 channel halted, channel 2 19 pe2 programming error, channel 2 20 eolni2 end-of-links interrupt, channel 2 21 cb2 channel busy, channel 2 22 eosi2 end-of-segment interrupt, channel 2 23 eolsi2 end-of-lists/direct interrupt, channel 2 24 te3 transfer error, channel 3 0 normal operation 1 an error condition occurred during the dma transfer. 25 ? reserved 26 ch3 channel halted, channel 3 27 pe3 programming error, channel 3 28 eolni3 end-of-links interrupt, channel 3 29 cb3 channel busy, channel 3 30 eosi3 end-of-segment interrupt, channel 3 31 eolsi3 end-of-lists/direct interrupt, channel 3 table 15-20. dgsr field descriptions (continued) bits name description
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-29 the dma controller supports misaligned transfers for both the source and destination addresses. in order to maximize performance, the source and destination engines align the source and destination addresses to a 64-byte boundary. the dma always reads/writes the maximum number of bytes for a given transfer as described by the capability inputs of the dma controller except for globally coherent transactions that use the size of the cache coherence granule as described by the mode select input. using 256 bytes over the rapidio interface reduces packet overhead which translates to increased bandwidth utilization through the interface. the dma controller supports bandwidth control, which prevents a channel from consuming all the data bandwidth in the controller. each channel is allowed to consume the bandwith of the shared resources as specified by the bandwidth control value. after the channel uses its allotted bandwidth, the arbiter grants the next channel access to the shared resources. the arbitration is round robin between the channels. this feature is also used to implement the external control pause feature. if the external control start and pause are enabled in the mr n , the channel enters a paused state after transferring the data described in the bandwidth control. external control can restart the channel from a paused state. the dma controller is designed to support rapidio transaction types, including various priority level support. the dma controller offers additional features from previous generations in which the reads can be mapped to globally coherent (io_read), non-coherent (nread), or maintenance reads. in addition, the writes can be mapped to coherent (flush with data) and non-coherent (nwrite, nwrite_r) writes, messages, and maintenance writes. the dma programming model permits software to program each dma engine independently to interrupt on completed segment, chain, or error. it also provides the capability for software to resume the dma engine from a hardware halted condition by setting the channel continue bit, mr n [cc]. see table 15-21 on page 15-36 for more complete descriptions of the channel states and state transitions. 15.4.1.1 basic dma mode transfer this mode is primarily included for backward compatibility with existing dma controllers which use a simple programming model. this is the default mode out of reset. the different modes of operation under the basic mode are explained in the following sections. 15.4.1.1.1 basic direct mode in basic direct mode, the dma controller does not read descriptors from memory, but instead uses the current parameters programmed in the dma registers to start the dma transfer. software is responsible for initializing sar n , satr n , dar n , datr n , and bcr n registers. the dma transfer is started when mr n [cs] is set. software is expected to program all the appropriate registers before setting mr n [cs] to a 1. the transfer is finished after all the bytes specified in the
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-30 freescale semiconductor dma controller byte count register have been transferred or if an error condition occurs. the sequence of events to start and complete a transfer in basic direct mode is as follows: 1. poll the channel state (see table 15-21 ), to confirm that the specific dma channel is idle. 2. initialize sar n , satr n , dar n , datr n and bcr n . 3. set the mode register channel transfer mode bit, mr n [ctm], to indicate direct mode. other control parameters may also be initialized in the mode register. 4. clear then set the mode register channel start bit, mr n [cs], to start the dma transfer. 5. sr n [cb] is set by the dma controller to indicate the dma transfer is in progress. 6. sr n [cb] is automatically cleared by the dma controller after the transfer is finished, or if the transfer is aborted (mr n [ca] transitions from a 0 to 1), or if a transfer error occurs. 7. end of segment interrupt is generated if mr n [eosie] is set. 15.4.1.1.2 basic direct single-write start mode in basic direct single-write start mode, the dma controller does not read descriptors from memory, but instead uses the current parameters programmed in the dma registers to start the dma transfer. software is responsible for initializing the satr n , datr n , and bcr n registers. setting mr n [srw] configures the dma controller to begin the dma transfer either when sar n is written or when dar n is written, determined by the state of mr n [cdsm/swsm]. writing to sar n initiates the dma transfer if mr n [cdsm/swsm] is set. writing to dar n initiates the dma transfer if mr n [cdsm/swsm] is cleared. the dma controller automatically sets the channel start bit, mr n [cs]. software is expected to program all the appropriate registers before writing the source or destination address registers. the transfer is finished after all the bytes specified in the byte count register have been transferred or if an error condition occurs. the sequence of events to start and complete a transfer in single-write start basic direct mode is as follows: 1. poll the channel state (see table 15-21 ), to confirm that the specific dma channel is idle. 2. initialize the source attributes (satr n ), datr n , and bcr n registers. 3. set the mode register channel transfer mode bit, mr n [ctm], and the single-write start direct mode bit, mr n [srw]. other control parameters may also be initialized in the mode register. set mr n [cdsm/swsm] for transfers started using sar n . clear mr n [cdsm/swsm] for transfers started using the dar n . 4. a write to the source or destination address register starts the dma transfer and automatically sets mr n [cs]. 5. sr n [cb] is set by the dma controller to indicate the dma transfer is in progress. 6. sr n [cb] is automatically cleared by the dma controller after the transfer is finished, or if the transfer is aborted (mr n [ca] transitions from a 0 to 1), or if a transfer error occurs. 7. end of segment interrupt is generated if mr n [eosie] is set.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-31 15.4.1.1.3 basic chaining mode in basic chaining mode, software must first build link descriptor segments in memory. then the current link descriptor address register must be initialized to point to the first descriptor in memory. the dma controller loads descriptors from memory prior to a dma transfer. the dma controller begins the transfer according to the link descriptor information loaded for the segment. after the current segment is finished, the dma controller reads the next link descriptor from memory and begins another dma transfer. the transfer is finished if the current link descriptor is the last one in memory or if an error condition occurs. the sequence of events to start and complete a transfer in chaining mode is as follows: 1. build link descriptor segments in memory. see section 15.4.4, ?dma descriptors ,? for more information on descriptors. 2. poll the channel state (see table 15-21 ), to confirm that the specific dma channel is idle. 3. initialize clndar n to point to the first link descriptor in memory. 4. clear the mode register channel transfer mode bit, mr n [ctm], as well as mr n [xfe], to indicate basic chaining mode. other control parameters may also be initialized in the mode register. 5. clear, then set the mode register channel start bit, mr n [cs], to start the dma transfer. 6. sr n [cb] is set by the dma controller to indicate the dma transfer is in progress. 7. sr n [cb] is automatically cleared by the dma controller after finishing the transfer of the last descriptor segment, or if the transfer is aborted (mr n [ca] transitions from a 0 to 1), or if an error occurs during any of the transfers. 15.4.1.1.4 basic chaining single-write start mode basic chaining single-write start mode allows a chain to be started by writing the current link descriptor address register (clndar n ). setting mr n [cdsm/swsm] in the mode register causes mr n [cs] to be automatically set when the current link descriptor address register is written. the sequence of events to start and complete a chain using single-write start mode is as follows: 1. set the mode register current descriptor start mode bit, mr n [cdsm/swsm], and the extended features enable bit mr n [xfe]. also, clear the channel transfer mode bit, mr n [ctm]. this initialization indicates basic chaining and single-write start mode. also other control parameters may be initialized in the mode register. 2. build link descriptor segments in memory. see section 15.4.4, ?dma descriptors ,? for more information on descriptors. 3. poll the channel state (see table 15-21 ), to confirm that the specific dma channel is idle. 4. initialize clndar n to point to the first descriptor segment in memory. this write automatically causes the dma controller to begin the link descriptor fetch and set mr n [cs].
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-32 freescale semiconductor dma controller 5. sr n [cb] is set by the dma controller to indicate the dma transfer is in progress. 6. sr n [cb] is automatically cleared by the dma controller after finishing the transfer of the last descriptor segment, or if the transfer is aborted (mr n [ca] transitions from a 0 to 1), or if an error occurs during any of the transfers. 15.4.1.2 extended dma mode transfer the extended dma mode also operates in chaining and direct mode. it offers additional capability over the basic mode by supporting striding and a more flexible descriptor structure. this additional functionality also requires a new and more complex programming model. the extended dma mode is activated by setting mr n [xfe]. 15.4.1.2.1 extended direct mode extended direct mode has the same functionality as basic direct mode with the addition of stride capabilities. the bit settings are the same as in direct mode with the exception of the mr n [xfe] being set. striding on the source address can be accomplished by setting satr n [ssme] and setting the desired stride size and distance in ssr n . striding on the destination address can be accomplished by setting datr n [dsme] and setting the desired stride size and distance in dsr n . 15.4.1.2.2 extended direct single-write start mode extended direct single-write start mode has the same functionality as the basic direct single-write start mode with the addition of stride capabilities. the bit settings are also the same with the exception of mr n [xfe] being set. striding on the source address can be accomplished by setting satr n [ssme] and setting the desired stride size and distance in ssr n . striding on the destination address can be accomplished by setting datr n [dsme] and setting the desired stride size and distance in dsr n . 15.4.1.2.3 extended chaining mode in extended chaining mode, the software must first build list and link descriptor segments in memory. then clsdar n must be initialized to point to the first list descriptor in memory. the dma controller loads list descriptors and link descriptors from memory prior to a dma transfer. the dma controller begins the transfer according to the link descriptor information loaded. once the current link descriptor is finished, the dma controller reads the next link descriptor from memory and begins another dma transfer. if the current link descriptor is the last in the list, the dma controller reads the next list descriptor in memory. the transfer is finished if the current link descriptor is the last one in the last list in memory or if an error condition occurs. the sequence of events to start and complete a transfer in extended chaining mode is as follows: 1. build link and list descriptor segments in memory. see section 15.4.4, ?dma descriptors ,? for more information on descriptors.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-33 2. poll the channel state (see table 15-21 ), to confirm that the specific dma channel is idle. 3. initialize clsdar n to point to the first list descriptor in memory. 4. clear the mode register channel transfer mode bit, mr n [ctm], to indicate chaining mode. mr n [xfe] must be set to indicate extended dma mode. other control parameters may also be initialized in the mode register. 5. clear, then set the mode register channel start bit, mr n [cs], to start the dma transfer. 6. sr n [cb] is set by the dma controller to indicate the dma transfer is in progress. 7. sr n [cb] is automatically cleared by the dma controller after finishing the transfer of the last descriptor segment, or if the transfer is aborted (mr n [ca] transitions from a 0 to 1), or if an error occurs during any of the transfers. 15.4.1.2.4 extended chaining single-write start mode in the extended mode, the single-write start feature allows a chain to be started by writing the current list descriptor pointer. setting mr n [cdsm/swsm] causes mr n [cs] to be set automatically when clsdar n is written. the sequence of events to start and complete an extended chain using single-write start mode is as follows: 1. set mr n [cdsm/swsm], mr n [ctm], and mr n [xfe] to indicate extended chaining and single-write start mode. also other control parameters may be initialized in the mode register. 2. build list and link descriptor segments in local memory. 3. poll the channel state (see table 15-21 ), to confirm that the specific dma channel is idle. 4. initialize the current list descriptor address register to point to the first list descriptor segment in memory. this write automatically causes the dma controller to begin the list descriptor fetch and set mr n [cs]. 5. sr n [cb] is set by the dma controller to indicate the dma transfer is in progress. 6. sr n [cb] is automatically cleared by the dma controller after finishing the transfer of the last descriptor segment, or if the transfer is aborted (mr n [ca] transitions from a 0 to 1), or if an error occurs during any of the transfers. 15.4.1.3 external control mode transfer an external control can be used to control all dma channels by setting mr n [ems_en]. the external control can control the dma channel in the following transfer modes:  basic direct  basic chaining  extended direct  extended chaining
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-34 freescale semiconductor dma controller the external control and the dma controller use a well defined protocol to communicate. the external control can start or pause a dma transfer. the dma controller acknowledges a dma transfer in progress and also indicates a transfer completion. the pause feature can be enabled by setting mr n [emp_en]. mr n [bwc] specifies how much data to allow a specific channel to transfer before entering a paused state by clearing mr n [cs]. the channel can be restarted from a paused state by the external master. in chaining modes, the channel does not pause for descriptor fetch transfer. it only pauses during the actual data transfer. the following signals are defined for the external control interface:  dma_dreq , indicates a dma transfer start or restart from a pause request. the falling edge of dma_dreq sets mr n [cs].  dma_dack , indicates a dma transfer currently in progress. sr n [cb] is set.  dma_ddone , indicates that the dma engine has completed the transfer. srn[cb] is clear. note, however, that write data may still be queued at the target interface or in the process of transfer on an external interface. detailed descriptions of the external control interface are in table 15-4 . the timing diagram of the external control interface is shown in figure 15-22 . figure 15-22. external control interface timing 15.4.1.4 channel continue mode for cascading transfer chains the channel continue mode (enabled when mr n [cc] is set) offers software the flexibility of having the dma controller get started on descriptors that have already been programmed while software continues to build more descriptors in memory. software can set the end-of-links descriptor (eolnd) in basic mode, or end-of-lists descriptor (eolsd) in extended mode, to cause the channel to go into a halted state while software continues to build other descriptors in memory. software can then set cc to force hardware to continue where it left off. channel continue is only meaningful for chaining modes, not direct mode. dreq clock dack ddone transfer start transfer in progress transfer done transfer start transfer pause transfer restart emp_en
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-35 if cc is set by software while the channel is busy with a transfer, the dma controller finishes all transfers until it reaches the eolnd in basic mode or eolsd in extended mode. the dma controller then refetches the last link descriptor in basic mode, or the last list descriptor in extended mode and clears the channel continue bit. if eolnd or eolsd is still set for their respective modes, the dma controller remains in the idle state. if eolnd or eolsd is not set, the dma controller continues the transfer by refetching the new descriptor. if cc is set by software while the channel is not busy with a transfer, the dma controller refetches the last link descriptor in basic mode, or the last list descriptor in extended mode and clears the channel continue bit. if eolnd or eolsd is still set for their respective modes, the dma controller remains in the idle state. if the eolnd or eolsd bits are not set, the dma controller continues the transfer by refetching the new descriptor. 15.4.1.4.1 basic mode on a channel continue, the descriptor at the current link descriptor address register (clndar n ) is refetched to get the next link descriptor address field as updated by software. the channel halts if nlndar n [eolnd] is still set. if eolnd is zero, the next link descriptor address is copied into clndar n and the channel continues with another descriptor fetch of the current link descriptor address. as a result, two link descriptor fetches always exist after channel continue before starting the first transfer. 15.4.1.4.2 extended mode on a channel continue, the descriptor at the current list descriptor (clsdar n ) address register is refetched to get the next list descriptor address field as updated by software. the channel halts if nlsdar n [eolsd] is still set. if not, the next list descriptor address is copied into the clsdar n register and the channel continues with another descriptor fetch of the current list descriptor address. as a result, two list descriptor fetches always exist after channel continue before the first link descriptor fetch and the first transfer. 15.4.1.5 channel abort software can abort a previously initiated transfer by setting mr n [ca]. once the dma channel controller detects a zero-to-one transition of mr n [ca], it finishes the current sub-block transfer and halts all further activity. the controller then waits for all previously initiated transfers from the specified channel to drain and clears sr n [cb]. successful completion of a software initiated abort request can be recognized by mr n [ca] being set and sr n [cb] being cleared. obviously, if the controller was already halted because of an error condition (sr n [te] is set), or the channel has completed all transfers, then sr n [cb] being cleared may not signify that the controller entered a halt state due to the abort request.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-36 freescale semiconductor dma controller 15.4.1.6 bandwidth control mr n [bwc] specifies how much data to allow a specific channel to transfer before allowing the next channel to use the shared data transfer hardware. this promotes equitable bandwidth allocation between channels. however, if only one channel is busy, hardware overrides the specified bandwidth control size value. the dma controller allows a channel to transfer up to 1 kbyte at a time when no other channel is active. 15.4.1.7 channel state table 15-21 defines the state of a channel based on the values of the channel start (mr n [cs]), channel busy (sr n [cb]), transfer error (sr n [te]), and channel continue (mr n [cc]) bits. 15.4.1.8 illustration of stride size and stride distance if operating in stride mode, the stride size defines the amount of data to transfer before jumping to the next quantity of data as specified by the stride distance. the stride distance is added to the current base address to point to the next quantity of data to be transferred. figure 15-23 illustrates the stride size and distance parameters. as shown, each time the stride distance is added to the base address, the resulting address becomes the new base address. this sequence repeats until the amount of data transferred equals the transfer size. table 15-21. channel state table mr n [cs] sr n [cb] sr n [te] mr n [cc] channel state 0 0 0 0 idle state. this is the state of the bits out of reset. 0 0 0 1 channel continue unexpected. channel remains idle. 0 0 1 0 error occurred after software halted the channel. 0 0 1 1 channel continue unexpected. channel remains in error halt state. 0 1 0 0 software halted channel. the channel was busy and software cleared mr n [cs]. 0 1 0 1 channel remains in halt state. ? 1 1 ? the channel has encountered an error condition and it is trying to halt. 1 0 0 0 ready to start transfer (byte count > 0), or transfer complete (byte count = 0) 1 0 0 1 continue transfer (only meaningful in chaining mode, not direct mode). in direct mode, the channel continue has no effect. 1 0 1 0 error occurred during transfer. 1 0 1 1 channel remains in error halt state. 1 1 0 0 transfer in progress. 1 1 0 1 continue after reaching the end of list/link, or the first descriptor fetch after channel continue.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-37 figure 15-23. stride size and stride distance 15.4.2 dma transfer interfaces the dma can be used to achieve data transfers across the entire memory map. 15.4.3 dma errors on a transfer error (uncorrectable ecc errors on memory accesses, parity errors on local bus or pci, address mapping errors, for example), the dma halts by setting sr n [te] and generates an interrupt if mr n [eie] is set. on a programming error, the dma sets sr n [pe] and generates an interrupt if mr n [eie] is set. the dma controller detects the following programming errors:  transfer started with a byte count of zero.  stride transfer started with a stride size of zero.  transfer started with a priority of three.  illegal type?defined by satr n [sreadttype] and datr n [dwritettype]. used for the transfer.  invalid interface?defined by satr n [stransint] and datr n [dtransint]. used for the transfer when in atmu bypass mode. 15.4.4 dma descriptors the dma engine recognizes list descriptors and link descriptors. list descriptors connect lists of link descriptors. link descriptors describe the dma activity that is to take place. dma descriptors are built in either local or remote memory and are connected by the next descriptor fields. only link descriptors contain information for the dma controller to transfer data. software must ensure that each descriptor is 32-byte aligned. the last link descriptor in the last list in memory sets the eolnd bit in the next link descriptor; the next list descriptor fields indicating that these are the last descriptors in memory. software initializes the current list descriptor address register to point to the first list descriptor in memory. the dma controller traverses through the descriptor lists until the last link descriptor is met. for each link descriptor in the chain, the dma controller starts a new dma transfer with the control parameters specified by that descriptor. link and list descriptor fetches always snoop the local memory space. stride size stride distance base address new base address new base address
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-38 freescale semiconductor dma controller note software must ensure that each descriptor is aligned on a 32-byte boundary. the last link descriptor in the last list in memory sets nlndar n [eolnd] in the next link descriptor and nlsdar n [eolsd] in the next list descriptor fields indicating that these are the last descriptors in memory. software initializes the current list descriptor address register to point to the first list descriptor in memory. the dma controller traverses through the descriptor lists until the last link descriptor is met as shown in figure 15-24 . for each link descriptor in the chain, the dma controller starts a new dma transfer with the control parameters specified by that descriptor. table 15-22 summarizes the dma list descriptors. table 15-23 summarizes the dma link descriptors. table 15-22. dma list descriptor summary descriptor field description next list descriptor address points to the next list descriptor in memory. after the dma controller reads the descriptor from memory, this field is loaded into the next list descriptor address registers. first link descriptor address points to the first link descriptor in memory for this list. after the dma controller reads the descriptor from memory, this field is loaded into the current link descriptor address registers. source stride contains the stride information used for the data source if striding is enabled for a link in the list. destination stride contains the stride information used for the data destination if striding is enabled for a link in the list. table 15-23. dma list descriptor summary descriptor field description source attributes register contains source transaction attributes. source address contains the source address of the dma transfer. after the dma controller reads the descriptor from memory, this field is loaded into the source address register. destination attributes register contains destination transaction attributes. destination address contains the destination address of the dma transfer. after the dma controller reads the descriptor from memory, this field is loaded into the destination address register. next link descriptor address points to the next link descriptor in memory. after the dma controller reads the link descriptor from memory, this field is loaded into the next link descriptor address registers. byte count contains the number of bytes to transfer. after the dma controller reads the descriptor from memory, this field is loaded into the byte count register.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-39 figure 15-24 describes the dma transaction flow. figure 15-24. dma transaction flow with dma descriptors current list descriptor address register . . . list descriptor link descriptor link descriptor link descriptor (eolnd) list descriptor descriptors in memory dma controller flow (extended mode) mr n [cs] is set by software after programming start finish fetch the first list descriptor using the clsdar n address. write nlsdar n , clndar n. fetch the first link descriptor. write programming model registers. begin dma transfer using sar n , satr n , dar n , datr n. after transfer check if nlndar n [eolnd] is set. move nlndar n to clndar n. fetch the current link descriptor. write programming model registers. begin dma transfer using sar n , satr n , dar n , datr n. after dma transfer check if nlndar n [eolnd] is set. check if nlsdar n [eolsd] is set. move nlsdar n to clsdar n. fetch the current list descriptor. write nlsdar n , clndar n. move nlndar n to clndar n. fetch the first link descriptor. write programming model registers. begin dma transfer using sar n , satr n , dar n , datr n. after dma transfer check if nlndar n [eolnd] is set. move nlndar n to clndar n. fetch the current link descriptor. write programming model registers. begin dma transfer using sar n , satr n , dar n , datr n. after dma transfer check if nlndar n [eolnd] is set. check if nlsdar n [eolsd] is set. move nlsdar n to clsdar n. fetch the current list descriptor. write nlsdar n , clndar n. fetch the first link descriptor. write programming model registers. begin dma transfer using sar n , satr n , dar n , datr n. after dma transfer check if nlndar n [eolnd] is set. move nlndar n to clndar n. fetch the current link descriptor. write programming model registers. begin dma transfer using sar n , satr n , dar n , datr n. after dma transfer check if nlndar n [eolnd] is set. check if nlsdar n [eolsd] is set. clear sr n [cb]. dma transfer complete . . link descriptor link descriptor link descriptor (eolnd) list descriptor . link descriptor link descriptor link descriptor (eolnd/eolsd) . descriptors in memory.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-40 freescale semiconductor dma controller figure 15-25 describes the format of the list descriptors. figure 15-25. list descriptor format figure 15-26 describes the format of the link descriptors. figure 15-26. link descriptor format 15.4.5 limitations and restrictions this section addresses some of the limitations and restrictions of the dma controller and is intended to help software maximize the dma performance and avoid dma programming errors. the limitations of the dma controller are the following:  due to the limited number of buffers that the dma controller can use, stride sizes less than 64 bytes should be avoided. maximum utilization is obtained from strides greater than or equal to 256-bytes. however, small stride sizes can be used for scatter-gather functions.  coherent reads or writes are broken up into cache line accesses in the dma. reserved next list descriptor address reserved first link descriptor address source stride destination stride reserved reserved offset 0x00 0x08 0x18 0x10 0x04 0x14 0x0c 0x1c byte count reserved source attributes destination attributes offset 0x00 0x08 0x18 0x10 0x04 source address next link descriptor address 0x14 0x0c destination address reserved 0x1c
dma system considerations MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-41 the dma controller restrictions are as follows:  setting the source or destination priority level (stflowlvl or dtflowlvl) to a value of three (0b11) is considered a programming error.  all interface capabilities from where descriptors are being fetched must support read sizes 32-bytes or greater.  if mr n [sahe] is set, the source interface transfer size capability must be greater than or equal to mr n [sahts]. the source address must be aligned to the size specified by sahts.  if mr n [dahe] is set, the destination interface transfer size capability must be greater than or equal to mr n [dahts]. the destination address must be aligned to the size specified by dahts.  destination striding is not supported if mr n [dahe] is set and source striding is not supported if mr n [sahe] is set.  if the dma is programmed to send swrites over rapidio, the programmer must ensure that the destination address is double-word aligned and that the byte count is a double-word multiple.  if the dma is programmed to send messages over rapidio, the programmer must ensure that the message length (bcr n [bc]) is 8, 16, 32, 64, 128 or 256 bytes. this can be achieved by setting the byte count register (bcr) to a power of 2 value equal to 8 or greater.  striding does not work if the destination transaction type is message (datr[dwritettype] = 0x0110) because messages have no memory addresses. as well, destination address hold should be disabled (mr n [dahe] is cleared) unless the destination address hold transfer size indicates an 8-byte message (mr n [dahts] = 0x11). software is responsible for disabling striding and dahe, in this case, and for ensuring that the bandwidth control is large enough to support the desired message size. failure to adhere to these restrictions results in boundedly undefined behavior.  when dma is used to issue maintenance reads and writes in bypass mode, the sum of the starting offset field in dar and the byte count must not cause the offset to rollover. failure to adhere to this restriction results in boundedly undefined behavior. 15.5 dma system considerations figure 15-27 shows the most important data paths within the MPC8540. many of these paths are served by captive dma controllers and virtually all can be served by the general purpose four-channel dma controller. this section provides information about how to make most effective use of these dma channels including the following topics:  dma transaction initiators (masters)  dma targets, that is, data sources and destinations
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-42 freescale semiconductor dma controller  transparency of the bus interfaces to dma operations  what is useful as opposed to what is possible. for example, it is possible to address any internal register via the internal control bus, which means configuration and control registers can be dma source or destination targets. however, the typical use of dma functionality is to reduce host processor loading by moving large amounts of data with minimal cpu involvement. using a general-purpose dma controller to load small amounts of configuration data only makes sense in special circumstances (perhaps during system boot, for example). figure 15-27. dma data paths table 15-24 lists all of the dma controllers (both captive and general-purpose) on the device and the most likely dma targets on and off-chip. the bus controllers themselves cannot initiate dma three speed ocean ethernet controller 10/100/1g mac gmii rgmii tbi rtbi ddr sdram bus i/o voltages supported = 2.5v bus speeds: 100mhz(200)/ 133mhz(266)/150mhz(300)/166mhz(333 ) support 64-bit wide+ecc (error injection ) ddr sdram controller e500 core l2 cache local bus controller three speed ethernet controller 10/100/1g mac pci/pci-x controller rapidio endpoint ext dma pins i 2 c dma (4 channel) controller boot sequencer register & control pci/pci-x bus rapidio i/o voltages supported = 3.3v local bus i/o voltages supported = 3.3v bus speeds: 66mhz/83mhz/ 100mhz/133mhz/166mhz peripheral sizes 8/16/32-bit e500 coherency module ecm open pic dma dma duart tbi rtbi fast ethernet controller 10/100 mac dma serial in/out
dma system considerations MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 15-43 transfers; rather, they operate transparently with respect to both on- and off-chip dma controllers. the codes in the table cells have the following meaning:  y?supported  nr?possible, but not recommended. inefficient use of system resources.  ns?possible, but not supported. resulting system behavior is not defined. 15.5.1 unusual dma scenarios the following is a description of unusual dma paths including explanations of why some functional blocks cannot serve as dma targets. the following topics are addressed:  transaction initiators (masters)  dma targets, that is, data sources or destinations  transparency of the bus controllers to dma transactions  what is useful as opposed to what is possible. for example, any register can be addressed through an internal control bus, which means configuration and control registers can be dma targets. 15.5.1.1 dma to e500 core the l1 cache cannot be a direct dma target because it cannot be directly addressed by software. however, dma access into the l1 cache occurs indirectly if a block of memory that is cached in the l1 is specified as the dma target. this effect is deterministic if the target memory block was locked into the l1 with cache locking instructions. table 15-24. dma paths dma controllers on-chip targets off-chip targets l2 configuration registers 1 1 includes i 2 c data register. ddr local bus pci/ pci-x rapidio duart fifo ethernet buffers on-chip ethernet 2 2 captive resource. not available to external masters. ynsyyyyyy 4 channel 3 3 can serve external masters. ynryyyyyns off-chip pci-x controller ynsyy?yyy rapidio controller ynsyyy?yy
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 15-44 freescale semiconductor dma controller 15.5.1.2 dma to ethernet the ethernet controllers cannot serve as dma targets because they have no suitable internal memory for this purpose. the ethernet controllers have dedicated dma channels to move data between the external transmit and receive buffers and the internal packet buffer. this dedicated channel is the only dma service to the internal packet buffers. however, ethernet ports can serve as dma targets by using a general-purpose dma controller to access the transmit and receive buffers defined by the ethernet buffer descriptors. because ethernet data buffers are located in ram outside of the ethernet controllers, general-purpose dma engines can move data to or from these memory regions. also, because ethernet controllers automatically read buffer descriptors and send (or load) data buffers, a dma transfer into (or out of) these buffers is effectively a transfer into (or out of) the ethernet ports. 15.5.1.3 dma to configuration and control registers because any internal register can be addressed with the four-channel dma controller, configuration and control registers throughout the device are valid dma targets. however, the primary purpose of dma?to reduce processor load by moving large blocks of data? is not served by dma transfers of configuration data. for example, while it is possible to dma into the i 2 c controller or programmable interrupt controller (pic), doing so is extremely inefficient and is seldom beneficial in normal operation. the overhead of creating dma descriptors far exceeds any savings in cpu cycles. 15.5.1.4 dma to i 2 c the i 2 c controller is not transparent to dma transfers. observe the caveats listed in section 15.5.1.3, ?dma to configuration and control registers,? when accessing any i 2 c register, including the data register (i2cdr). 15.5.1.5 dma to duart the duart provides complete and sophisticated dma support which is described in chapter 12, ?duart,? specifically section 12.4.5, ?fifo mode.?
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-1 chapter 16 pci/pci-x bus interface the MPC8540 pci/pci-x interface complies with the pci local bus specification , rev. 2.2 and the pci-x addendum to the pci local bus specification , rev. 1.0a. it is beyond the scope of this manual to document the intricacies of the pci and pci-x buses. this chapter describes the pci/pci-x controller (referenced as pci/x throughout this chapter) of this device and provides a basic description of the pci and pci-x bus operations. the specific emphasis is directed at how the MPC8540 implements the pci and pci-x buses. designers of systems incorporating pci/pci-x devices should refer to the respective specification for a thorough description of the pci/pci-x buses. note much of the available pci literature refers to a 16-bit quantity as a word and a 32-bit quantity as a dword. note that this is inconsistent with the terminology in the rest of this manual where the terms ?word? and ?double word? refer to a 32-bit and 64-bit quantity respectively. where necessary to avoid confusion, the precise number of bits or bytes is specified. 16.1 introduction the pci/x controller acts as a bridge between the pci/x interface and the ocean switch fabric. figure 16-1 is a high-level block diagram of the pci/x controller.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-2 freescale semiconductor pci/pci-x bus interface figure 16-1. pci/x controller block diagram 16.1.1 overview the pci/x controller connects the ocean to the pci/x bus, to which i/o components are connected. the pci bus uses a 32- or 64-bit multiplexed address/data bus, plus various control and error signals. the pci/x interface supports address and data parity with error checking and reporting. the pci/x interface of the MPC8540 functions both as a master (initiator) and a target device. internally, the design is divided into the following:  data path blocks  control logic blocks  memory the data path blocks contain the queues, tables for transaction tracking, and ordering. the control blocks contain control logic and state-machines for buffer control, bus protocol, tag generation, and transaction resizing. the memory blocks are used solely for inbound and outbound data storage. this allows the MPC8540 to handle separate pci/x transactions simultaneously. for example, consider the case where a burst-write transaction from the MPC8540 to another pci device ocean physical interface pci/x interface fabric request data out data in arb arb pci pci-x regs regs interface
introduction MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-3 terminates with a disconnect before finishing the transaction. if another pci device is granted the pci bus and requests a burst-read from local memory, the MPC8540, as a target, can accept the burst-read transfer. when the MPC8540 is granted mastership of the pci bus, the burst-write transaction continues. there are two blocks of memory in the design:  the inbound buffers  the outbound read buffers combined with the outbound write buffers there are many blocks of control logic in the block. on the pci/x side there are machines for pci/x controller-initiated address and data tenures for inbound and outbound data, respectively. on the ocean side there are machines for fabric arbitration, outbound data, and inbound data. as an initiator, the MPC8540 supports read and write operations to the pci/x memory space, the pci/x i/o space, and the 256-byte pci/x configuration space. as an initiator, the MPC8540 also supports generating pci/x special-cycle and interrupt-acknowledge transactions. as a target, the MPC8540 supports read and write operations to local memory, and, when configured in agent mode, read and write operations to the internal pci/x configuration registers. the MPC8540 can function as either a pci/x host bridge (host mode) or a peripheral device on the pci/x bus (agent mode). see section 16.1.3.1.1, ?host mode,? for more information. in agent mode, all of the pci/x configuration registers in the MPC8540 can be programmed from the pci/x bus. see section 16.4.2.11.3, ?pci configuration in agent and agent lock modes,? for more information. the pci/x interface provides bus arbitration for the MPC8540 and up to five other pci/x bus masters. the arbitration algorithm is a programmable two-level, round-robin priority selector. the on-chip pci/x arbiter can operate in both host and agent modes or it can be disabled to allow for an external pci/x arbiter. the MPC8540 also provides an address translation mechanism to map inbound pci/x to ocean accesses and outbound ocean to pci/x accesses. 16.1.1.1 MPC8540 as a pci/x initiator upon detecting an ocean-to-pci/x transaction, the MPC8540 requests the use of the pci/x bus. for ocean-to-pci/x bus write operations, the MPC8540 requests mastership of the pci/x bus when the source completes the write operation to the ocean. for ocean-to-pci/x read operations, the MPC8540 requests mastership of the pci/x bus when it decodes that the access is for pci/x address space. once granted, the MPC8540 drives the address (pci_ad[63:0]) and the bus command (pci_c/be [7:0]) signals.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-4 freescale semiconductor pci/pci-x bus interface the master part of the interface can initiate master-abort cycles, recognizes target-abort, target-retry, and target-disconnect cycles, and supports various device selection timings. the master interface does not run fast back-to-back or exclusive accesses. 16.1.1.2 MPC8540 as a pci/x target upon detection of a pci/x address phase, the MPC8540 decodes the address and bus command to determine if the transaction is within the local memory access boundaries. if the transaction is destined for local memory, the target interface latches the address, decodes the pci/x bus command, and forwards the transaction to the ocean control unit. on writes to local memory, data is forwarded along with the byte enables (if applicable) to the internal control unit. on reads, the data is driven on the bus and the byte enables (if applicable) determine which byte lanes contain meaningful data. the target interface of the MPC8540 can issue target-abort, target-retry, and target-disconnect cycles. the target interface supports fast back-to-back transactions. the target interface uses the fastest device selection timing. as a pci/x target, the MPC8540 can issue split response and split completion transactions. the MPC8540 supports data streaming to and from local memory. this means that data can flow between the MPC8540?s pci/x interface and local memory as long as the internal buffers are not filled. 16.1.2 features the following is a list of pci features that are supported:  pci interface 2.2 compatible  66- and 33-mhz support  64- and 32-bit pci interface support on primary pci port  host and agent mode support  64-bit dual address cycle (dac) support  on-chip arbitration with support for 5 high-priority request and grant signal pairs  accesses to all pci memory and i/o address spaces  pci-to-memory and memory-to-pci streaming  memory prefetching of pci read accesses  posting of processor-to-pci and pci-to-memory writes  selectable snoop for inbound accesses  pci configuration registers  pci 3.3-v compatible
introduction MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-5 the following is a list of pci-x features supported:  pci-x revision 1.0a compatible  support for up to 133-mhz point-to-point connection  support for 32- and 64-bit interface  64-bit dual address cycle (dac) support  on-chip arbitration with support for 5 high-priority request and grant signal pairs  support for accesses to all pci-x memory and i/o address spaces  support for four split transactions  complete allowable disconnect boundary (adb) support  all pci-x ordering rules enforced  implementation of relaxed-ordering  pci-x 3.3-v compatible 16.1.3 modes of operation a number of parameters that affect the pci/x controller modes of operation are determined at power-on reset (por) by reset configuration signals as described in chapter 4, ?reset, clocking, and initialization.? table 16-1 provides a summary of these modes. 16.1.3.1 host/agent modes the pci/x controller can function as either a pci/x host bridge (host mode) or a peripheral device on the pci bus (agent mode). the pci/x controller can also operate in agent configuration lock mode. note that host/agent mode selection is determined at power-up as summarized in section 16.5.1, ?power-on reset configuration modes.? table 16-1. por parameters for pci/x controller parameter description section/pag e host/agent configuration selects between host and agent mode for the pci/x and rapidio interfaces. 4.4.3.4/4-14 pci width selection selects between 32-bit or 64-bit data bus width. 4.4.3.12/4-19 pci i/o impedance selects the impedance of the pci/x i/o drivers 4.4.3.13/4-19 pci arbiter enable enables the on-chip pci/x bus arbiter 4.4.3.14/4-19 pci debug mode enable selects between normal operation or debug mode for pci_ad[62:58]. 4.4.3.15/4-20 pci-x configuration selects between pci or pci-x operation 4.4.3.16/4-20 pci/x output hold selects the number of buffer delays for pci output signals depending on whether pci or pci-x operation is selected. this provides flexibility in meeting minimum output hold specifications relative to sysclk for both pci and pci-x systems 4.4.3.19/4-21
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-6 freescale semiconductor pci/pci-x bus interface 16.1.3.1.1 host mode when the device powers up in host mode, all inbound configuration accesses are ignored (and thus master aborted). see section 16.5.1.1, ?host mode,? for more information. 16.1.3.1.2 agent mode when the device powers up in agent mode, it acknowledges inbound configuration accesses. see section 16.5.1.2, ?agent mode,? for more information. note that in pci agent mode, the pci/x controller ignores all pci/x memory accesses except those to the memory-mapped registers) until inbound address translation is enabled. 16.1.3.1.3 agent configuration lock mode when the device powers up in agent configuration lock mode, it retries inbound configuration accesses until the acl bit in the pci bus function register is cleared. see section 16.5.1.3, ?agent configuration lock mode,? for more information. 16.1.3.2 pci/x bus width (64-/32-bit bus) this input configures the pci/x interface to be in 32-bit or 64-bit extended mode of operation. the initial value is determined by the value on the pci_req64 power-on reset configuration signal. see chapter 4, ?reset, clocking, and initialization ,? and the MPC8540 integrated processor hardware specifications , for more information. 16.1.3.3 pci/x arbiter (internal/external arbiter) this input configures the on-chip pci/x arbiter. the initial value is determined by the value on the pci_gnt2 power-on reset configuration signal. see chapter 4, ?reset, clocking, and initialization,? and the MPC8540 integrated processor hardware specifications . 16.1.3.4 pci/x bus mode this input configures pci or pci-x mode on the pci/x port. note that this input does not support the three states of the pcixcap input defined in the pci-x specification. it is sampled as either a 1 or a 0 during reset only. the initial value is determined by the value on the pci_gnt4 power-on reset configuration signal. see chapter 4, ?reset, clocking, and initialization,? and the MPC8540 integrated processor hardware specifications . 16.1.3.5 pci/x signal output hold timing to meet minimum output hold specifications relative to sysclk for both pci and pci-x systems, the MPC8540 has a programmable output hold delay for bus signals. the initial value of the output hold delay is determined by the values on the lwe [0:1] power-on reset configuration
external signal descriptions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-7 signals. see chapter 4, ?reset, clocking, and initialization,? and the MPC8540 integrated processor hardware specifications, for more information on these values and signal timing. 16.1.3.6 pci/x impedance the MPC8540 has a programmable impedance for pci/x bus signals. the initial value is determined by the value on the pci_gnt1 power-on reset configuration signal. see chapter 4, ?reset, clocking, and initialization,? and the MPC8540 integrated processor hardware specifications, for more information. 16.2 external signal descriptions figure 16-2 shows the external pci/x signals. figure 16-2. pci/x interface external signals 32 pci_ad[31:0] 4 pci_par pci_c/be [3:0] 1 1 pci_trdy 1 pci_irdy 1 pci_stop 1 pci_devsel pci_perr pci_serr pci_frame 1 pci_idsel pci/x required signals address interface error pci_req [0:4] pci_gnt [0:4] arbitration pci/x optional signals 32 pci_c/be [7:4] 1 pci_par64 1 pci_req64 1 pci_ack64 pci_ad[63:32] 4 64-bit and data command reporting extension (37 signals) (6 signals) (2 signals) (10 signals) (39 signals) 1 1 5 5 1
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-8 freescale semiconductor pci/pci-x bus interface table 16-2 contains the detailed descriptions of the external pci/x interface signals. table 16-2. pci interface signals?detailed signal descriptions signal i/ o description pci_ack64 i/ o 64-bit transaction acknowledge.indicates that the current target supports 64-bit transfers during the data phase of the current transaction. o as an output for the bidirectional 64-bit transaction acknowledge, this signal operates as follows: state meanin g asserted?indicates that this pci controller, as the target of a pci transaction, may use the full 64-bit data bus for the data phase of the transaction. negated?indicates that this pci controller, as the target of a pci transaction, may use only 32 bits of the data bus in servicing a data transfer. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a i as an input for the bidirectional 64-bit transaction acknowledge, this signal operates as follows: state meanin g asserted?indicates that the target of a pci transaction may use the full 64-bit data bus for the data phase of the transaction. negated?indicates that the target of a pci transaction may only use 32 bits of the data bus during the data phase of the transaction. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a pci_ad[63:0] i/ o pci address/data bus o as outputs for the bidirectional pci address/data bus, these signals operate as described below. state meanin g asserted/negated?represents the physical address during the address phase of a pci transaction. during the data phase(s) of a pci transaction, the pci address/data bus contain the data being written. the pci_ad[7:0] signals define the lsb and pci_ad[63:56] define the msb. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a i as inputs for the bidirectional pci address/data bus, these signals operate as described below. state meanin g asserted/negated?represents the address to be decoded as a check for device select during the address phase of a pci transaction or the data being received during the data phase(s) of a pci transaction. the pci_ad[7:0] signals define the lsb and pci_ad[63:56] define the msb. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a
external signal descriptions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-9 pci_c/be [7:0 ] i/ o command/byte enable. command encodings are described in section 16.4.2.2, ?pci bus commands ,? and section 16.4.3.2, ?pci-x command encodings.? o as outputs for the bidirectional command/byte enable, these signals operate as described below. state meanin g asserted/negated?during the address phase, pci_c/be [7:0] define the bus command. byte enables determine which byte lanes carry meaningful data for pci bus data phases. the pci_c/be 0 signal applies to the lsb. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a i as inputs for the bidirectional command/byte enable, these signals operate as described below. state meanin g asserted/negated?during the address phase, pci_c/be [7:0] indicate the command that another master is sending. during the pci bus data phase, pci_c/be [7:0] indicate which byte lanes are valid. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a pci_devsel i/ o device select o as outputs for the bidirectional device select, these signals operate as described below. state meanin g asserted?indicates that this pci controller has decoded the address and is the target of the current access. negated?indicates that this pci controller has decoded the address and is not the target of the current access. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a i as inputs for the bidirectional device select, these signals operate as described below. state meanin g asserted?indicates that some pci agent (other than this pci controller) has decoded its address as the target of the current access. negated?indicates that no pci agent has been selected. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a table 16-2. pci interface signals?detailed signal descriptions (continued) signal i/ o description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-10 freescale semiconductor pci/pci-x bus interface pci_frame i/ o frame o as outputs for the bidirectional frame, these signals operate as described below. state meanin g asserted?indicates that this pci controller, acting as a pci master, is initiating a bus transaction. while pci_frame is asserted, data transfers may continue. negated?if pci_irdy is asserted, indicates that the pci transaction is in the final data phase; if pci_irdy is negated, indicates that the pci bus is idle. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a i as inputs for the bidirectional frame, these signals operate as described below. state meanin g asserted?indicates that another pci master is initiating a bus transaction. negated?indicates that the transaction is in the final data phase or that the bus is idle. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a pci_ gnt [4:0] o pci bus grant. output signals on this pci controller when the arbiter is enabled. when the arbiter is disabled, pci_gnt0 is an input. note that pci_ gnt[ n] is a point-to-point signal. every master has its own bus grant signal. also, note that these signals are also used as reset configuration signals in the MPC8540 as described in section 4.4.3, ?power-on reset configuration." state meanin g asserted?indicates that this pci controller granted control of the pci bus to agent n . negated?indicates that this pci controller did not grant control of the pci bus to agent n . timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a pci_idsel i initialization device select. used as a chip select during configuration read and write transactions. state meanin g asserted?indicates this pci controller is being selected as a target of a configuration read or write transactions. negated?indicates this pci controller is not being selected as a target of configuration read or write transactions. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a table 16-2. pci interface signals?detailed signal descriptions (continued) signal i/ o description
external signal descriptions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-11 pci_irdy i/ o initiator ready o as outputs for the bidirectional initiator ready, these signals operate as described below. state meanin g asserted?indicates that this pci controller, acting as a pci master, can complete the current data phase of a pci transaction. during a write, this pci controller asserts pci_ irdy to indicate that valid data is present on pci_ad[63:0]. during a read, this pci controller asserts pci_ irdy to indicate that it is prepared to accept data. negated?indicates that the pci target needs to wait before this pci controller, acting as a pci master, can complete the current data phase. during a write, this pci controller negates pci_ irdy to insert a wait cycle when it cannot provide valid data to the target. during a read, this pci controller negates pci_ irdy to insert a wait cycle when it cannot accept data from the target. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a i as inputs for the bidirectional initiator ready, these signals operate as described below. state meanin g asserted?indicates another pci master can complete the current data phase of a transaction. negated?if pci_frame is asserted, indicates a wait cycle from another master. if pci_frame is negated, indicates the pci bus is idle. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a pci_par i/ o pci parity. o as outputs for the bidirectional pci parity, these signals operate as described below. state meanin g asserted?indicates odd parity across pci_ad[31:0] and pci_c/be [3:0] during address and data phases. negated?indicates even parity across pci_ad[31:0] and pci_c/be [3:0] during address and data phases. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a i as inputs for the bidirectional pci parity, these signals operate as described below. state meanin g asserted?indicates odd parity driven by another pci master or the pci target during read data phases. negated?indicates even parity driven by another pci master or the pci target during read data phases. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a table 16-2. pci interface signals?detailed signal descriptions (continued) signal i/ o description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-12 freescale semiconductor pci/pci-x bus interface pci_par64 i/ o upper dword parity. the even parity bit that protects the upper 32 bits of data and upper 4 bits of command/byte enable. o as outputs for the bidirectional upper dword parity, these signals operate as described below. state meanin g asserted?indicates odd parity across the pci_ad[63:32] and pci_c/be [7:4] signals during address and data phases. negated?indicates even parity across the pci_ad[63:32] and pci_c/be [7:4] signals during address and data phases. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a i as inputs for the bidirectional upper dword parity, these signals operate as described below. state meanin g asserted?indicates odd parity driven by another pci master or the pci target during read data phases. negated?indicates even parity driven by another pci master or the pci target during read data phases. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a pci_perr i/ o pci parity error o as outputs for the bidirectional pci parity error, these signals operate as described below. state meanin g asserted?indicates that this pci controller, acting as a pci agent, detected a data parity error. (driven by the pci initiator on reads; driven by the pci target on writes.) negated?indicates no error. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a i as inputs for the bidirectional pci parity error, these signals operate as described below. state meanin g asserted?indicates that another pci agent detected a data parity error while this pci controller was sourcing data (this pci controller was acting as the pci initiator during a write, or was acting as the pci target during a read). negated?indicates no error. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a note: if a parity error occurs on the last data beat of a pci-x transaction with inbound data (outbound read with split completion data or inbound write), the MPC8540 asserts perr longer than permitted by the pci-x specification. this condition may cause a subsequent transaction to erroneously detect a parity error. the condition may be remedied by placing a stronger pull-up resistors on the perr signal. for example:  1 kohm for 133 mhz point-to-point operation  2 kohm for 66 mhz operation  4 kohm for 33 mhz operation. these values are stronger than the specification allows (5 kohm minimum for pull-up resistors). table 16-2. pci interface signals?detailed signal descriptions (continued) signal i/ o description
external signal descriptions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-13 pci_req [4:0] i pci bus request . input signals on this pci controller when the arbiter is enabled. when the arbiter is disabled, pci_req [0] is an output. note that pci_req[n] is a point-to-point signal. every master has its own bus request signal. following is the state meaning for the pci_req [n] input. state meanin g asserted?indicates that agent n is requesting control of the pci bus to perform a transaction. negated?indicates that agent n does not require use of the pci bus. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a pci_req64 i/ o 64-bit transaction request. indicates that the current master desires to transfer data using 64-bit transfers. also used as a reset configuration signal in the MPC8540 as described in section 4.4.3, ?power-on reset configuration.? o as an output for the bidirectional 64-bit transaction request, this signal operates as follows: state meanin g asserted?indicates that this pci controller, as the master of a pci transaction, desires to use all 64 bits. negated?indicates that this pci controller, as the master of a pci transaction, uses only 32 bits of the data bus in servicing a data transfer. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a i as an input for the bidirectional 64-bit transaction request, this signal operates as described below. state meanin g asserted?indicates that the master of a pci transaction is requesting to use the full 64-bit data bus for the data phase of the transaction. negated?indicates that the master of a pci transaction uses only 32 bits of the data bus during the data phase of the transaction. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a pci_serr i/ o pci system error o as outputs for the bidirectional pci system error, these signals operate as described below. state meanin g asserted?indicates that an address parity error, a target-abort (when this pci controller is acting as the initiator), or some other system error (where the result is a catastrophic error) was detected. negated?indicates no error. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a i as inputs for the bidirectional pci system error, these signals operate as described below. state meanin g asserted?indicates that a target (other than this pci controller) has detected a catastrophic error. negated?indicates no error. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a table 16-2. pci interface signals?detailed signal descriptions (continued) signal i/ o description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-14 freescale semiconductor pci/pci-x bus interface pci_stop i/ o stop. o as outputs for the bidirectional stop, these signals operate as described below. state meanin g asserted?indicates that this pci controller, acting as a pci target, is requesting that the initiator stop the current transaction. negated?indicates that the current transaction can continue. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a i as inputs for the bidirectional stop, these signals operate as described below. state meanin g asserted?indicates that a target is requesting that the pci initiator stop the current transaction. negated?indicates that the current transaction can continue. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a pci_trdy i/ o target ready. o as outputs for the bidirectional target ready, these signals operate as described below. state meanin g asserted?indicates that this pci controller, acting as a pci target, can complete the current data phase of a pci transaction. during a read, this pci controller asserts pci_trdy to indicate that valid data is present on pci_ad[31:0]. during a write, this pci controller asserts pci_trdy to indicate that it is prepared to accept data. negated?indicates that the pci initiator needs to wait before this pci controller, acting as a pci target, can complete the current data phase. during a read, this pci controller negates pci_trdy to insert a wait cycle when it cannot provide valid data to the initiator. during a write, this pci controller negates pci_trdy to insert a wait cycle when it cannot accept data from the initiator. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a i as inputs for the bidirectional target ready, these signals operate as described below. state meanin g asserted?another pci target is able to complete the current data phase of a transaction. negated?indicates a wait cycle from another target. timing assertion/negation?as specified by pci local bus specification rev 2.2 or by pci-x addendum rev 1.0a table 16-2. pci interface signals?detailed signal descriptions (continued) signal i/ o description
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-15 16.3 memory map/register definitions the pci/x interface unit of the MPC8540 supports the following register types:  memory-mapped registers?these registers control pci address translation, pci error management, and pci configuration register access on the MPC8540. these registers are described in section 16.3.1, ?pci/x memory mapped registers,? and its subsections.  pci/x configuration registers contained within the pci/x configuration header?these registers are specified by the pci bus specification for every pci device. these registers are described in section 16.3.2, ?pci/x configuration header,? and its subsections. 16.3.1 pci/x memory mapped registers the pci/x memory mapped registers are accessed by reading and writing to an address comprised of the base address (specified in the ccsrbar on the local side or the pcsrbar on the pci/x side) plus the offset of the specific register to be accessed. note that all memory-mapped registers (except the pci/x configuration data register, pci cfg_data) must only be accessed as 32-bit quantities. table 16-3 lists the memory-mapped registers. table 16-3. pci/x memory-mapped register map offset register access reset section/page pci/x configuration access registers 0x0_8000 cfg_addr?pci/x configuration address r/w 0x0000_0000 16.3.1.1.1/16-18 0x0_8004 cfg_data?pci/x configuration data r/w 0x0000_0000 16.3.1.1.1/16-18 0x0_8008 int_ack?pci/x interrupt acknowledge r 0x0000_0000 16.3.1.1.3/16-20 0x0_800c? 0x0_8bfc reserved ? ? ? pci/x atmu registers?outbound and inbound 0x0_8c00?0x0_8c3c?outbound window 0 (default) 0x0_8c00 potar0?pci/x outbound window 0 (default) translation address register r/w 0x0000_0000 16.3.1.2.1/16-21 0x0_8c04 potear0?pci/x outbound window 0 (default) translation extended address register r/w 0x0000_0000 16.3.1.2.2/16-21 0x0_8c08 reserved ? ? 0x0_8c0c reserved ? ? 0x0_8c10 powar0?pci/x outbound window 0 (default) attributes register r/w 0x8004_401f 16.3.1.2.4/16-22 0x0_8c14? 0x0_8c1c reserved ? ?
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-16 freescale semiconductor pci/pci-x bus interface 0x0_8c20?0x0_8c3c?outbound window 1 0x0_8c20 potar1?pci/x outbound window 1 translation address register r/w 0x0000_0000 16.3.1.2.1/16-21 0x0_8c24 potear1?pci/x outbound window 1 translation extended address register r/w 0x0000_0000 16.3.1.2.2/16-21 0x0_8c28 powbar1?pci/x outbound window 1 base address register r/w 0x0000_0000 16.3.1.2.3/16-22 0x0_8c2c reserved ? ? 0x0_8c30 powar1?pci/x outbound window 1 attributes register r/w 0x0000_0000 16.3.1.2.4/16-22 0x0_8c34? 0x0_8c3c reserved ? ? 0x0_8c40?0x0_8c5c?outbound window 2 0x0_8c40 potar2?pci/x outbound window 2 translation address register r/w 0x0000_0000 16.3.1.2.1/16-21 0x0_8c44 potear2?pci/x outbound window 2 translation extended address register r/w 0x0000_0000 16.3.1.2.2/16-21 0x0_8c48 powbar2?pci/x outbound window 2 base address register r/w 0x0000_0000 16.3.1.2.3/16-22 0x0_8c4c reserved ? ? 0x0_8c50 powar2?pci/x outbound window 2 attributes register r/w 0x0000_0000 16.3.1.2.4/16-22 0x0_8c54? 0x0_8c5c reserved ? ? 0x0_8c60?0x0_8c7c?outbound window 3 0x0_8c60 potar3?pci/x outbound window 3 translation address register r/w 0x0000_0000 16.3.1.2.1/16-21 0x0_8c64 potear3?pci/x outbound window 3 translation extended address register r/w 0x0000_0000 16.3.1.2.2/16-21 0x0_8c68 powbar3?pci/x outbound window 3 base address register r/w 0x0000_0000 16.3.1.2.3/16-22 0x0_8c6c reserved ? ? 0x0_8c70 powar3?pci/x outbound window 3 attributes register r/w 0x0000_0000 16.3.1.2.4/16-22 0x0_8c74? 0x0_8c7c reserved ? ? 0x0_8c80?0x0_8c9c?outbound window 4 0x0_8c80 potar4?pci/x outbound window 4 translation address register r/w 0x0000_0000 16.3.1.2.1/16-21 0x0_8c84 potear4?pci/x outbound window 4 translation extended address register r/w 0x0000_0000 16.3.1.2.2/16-21 table 16-3. pci/x memory-mapped register map (continued) offset register access reset section/page
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-17 0x0_8c88 powbar4?pci/x outbound window 4 base address register r/w 0x0000_0000 16.3.1.2.3/16-22 0x0_8c8c reserved ? ? 0x0_8c90 powar4?pci/x outbound window 4 attributes register r/w 0x0000_0000 16.3.1.2.4/16-22 0x0_8c94? 0x0_8d9c reserved ? ? 0x0_8da0?0x0_8dbc?inbound window 3 0x0_8da0 pitar3?pci/x inbound window 3 translation address register r/w 0x0000_0000 16.3.1.3.1/16-25 0x0_8da4 reserved ? ? 0x0_8da8 piwbar3?pci/x inbound window 3 base address register r/w 0x0000_0000 16.3.1.3.2/16-25 0x0_8dac piwbear3?pci/x inbound window 3 base extended address register r/w 0x0000_0000 16.3.1.3.3/16-26 0x0_8db0 piwar3?pci/x inbound window 3 attributes register r/w 0x0000_0000 16.3.1.3.4/16-26 0x0_8db4? 0x0_8dbc reserved ? ? 0x0_8dc0?0x0_8ddc?inbound window 2 0x0_8dc0 pitar2?pci/x inbound window 2 translation address register r/w 0x0000_0000 16.3.1.3.1/16-25 0x0_8dc4 reserved ? ? 0x0_8dc8 piwbar2?pci/x inbound window 2 base address register r/w 0x0000_0000 16.3.1.3.2/16-25 0x0_8dcc piwbear2?pci/x inbound window 2 base extended address register r/w 0x0000_0000 16.3.1.3.3/16-26 0x0_8dd0 piwar2?pci/x inbound window 2 attributes register r/w 0x0000_0000 16.3.1.3.4/16-26 0x0_8dd4? 0x0_8ddc reserved ? ? 0x0_8de0?0x0_8dfc?inbound window 1 0x0_8de0 pitar1?pci/x inbound window 1 translation address register r/w 0x0000_0000 16.3.1.3.1/16-25 0x0_8de4 reserved ? ? 0x0_8de8 piwbar1?pci/x inbound window 1 base address register r/w 0x0000_0000 16.3.1.3.2/16-25 0x0_8dec reserved ? ? 0x0_8df0 piwar1?pci/x inbound window 1 attributes register r/w 0x0000_0000 16.3.1.3.4/16-26 0x0_8df4? 0x0_8dfc reserved ? ? pci/x error management registers table 16-3. pci/x memory-mapped register map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-18 freescale semiconductor pci/pci-x bus interface 16.3.1.1 pci/x configuration access registers the pci/x configuration header, shown in figure 16-25 and figure 16-26 , is accessed through an indirect method using a pair of 32-bit memory-mapped access registers, cfg_addr at offset 0x0_8000 and cfg_data at offset 0x0_8004. 16.3.1.1.1 pci/x configuration address register (cfg_addr) the cfg_addr register is shown in figure 16-3 . figure 16-3. pci/x cfg_addr register 0x0_8e00 err_dr?pci/x error detect register special 0x0000_0000 16.3.1.4.1/16-29 0x0_8e04 err_cap_dr?pci/x error capture disabled register r/w 0x0000_0000 16.3.1.4.2/16-30 0x0_8e08 err_en?pci/x error enable register r/w 0x0000_0000 16.3.1.4.3/16-31 0x0_8e0c err_attrib?pci/x error attributes capture register r/w 0x0000_0000 16.3.1.4.4/16-32 0x0_8e10 err_addr?pci/x error address capture register r/w 0x0000_0000 16.3.1.4.5/16-33 0x0_8e14 err_ext_addr?pci/x error extended address capture register r/w 0x0000_0000 16.3.1.4.6/16-34 0x0_8e18 err_dl?pci/x error data low capture register r/w 0x0000_0000 16.3.1.4.7/16-34 0x0_8e1c err_dh?pci/x error data high capture register r/w 0x0000_0000 16.3.1.4.8/16-34 0x0_8e20 gas_timr?pci/x gasket timer register r/w 0x0000_0000 16.3.1.4.9/16-35 0x0_8e24 pcix_timr?pci-x split completion timer register r/w 0x0000_0000 16.3.1.4.10/16-3 6 0x0_8e28? 0x0_8efc reserved ? ? 0x0_8f00? 0x0_8ffc reserved for debug ? ? 0 7 8 1516 2021 2324 293031 r en 0 0 0 0000 bus number device number function number register number 00 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8000 table 16-3. pci/x memory-mapped register map (continued) offset register access reset section/page
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-19 table 16-4 describes the bit settings for the cfg_addr register. bus number 0xb00 and device number 0b0_0000 are used to configure the internal pci/x configuration header of the MPC8540 itself. see section 16.4.2.11.2, ?accessing the pci configuration space in host mode,? and section 16.4.2.11.3, ?pci configuration in agent and agent lock modes ,? for usage of pci/x cfg_addr. 16.3.1.1.2 pci/x configuration data register (cfg_data) the cfg_data register is shown in figure 16-3 . figure 16-4. pci/x cfg_data register table 16-5 describes the bit settings for the cfg_data register the cfg_data register is a 4-byte window into the little-endian pci/x configuration header data structure; therefore byte addressing within the cfg_data register uses little-endian convention. note that cfg_data may contain 1, 2, 3, or 4 bytes depending on the size of the register being accessed. table 16-4. pci/x cfg_addr field descriptions bits name description 0 enable allow a pci configuration access when pci cfg_data is accessed 1?7 ? reserved 8?15 bus number pci bus number to access 16?20 device number device number to access on specified bus 21?23 function number function to access within specified device 24?29 register number 32-bit register to access within specified device 30?31 ? reserved, hardwired to logic 00 0 31 r data w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8004 table 16-5. pci/x cfg_data field descriptions bits name description 0?31 data a read or write to this register starts a pci configuration cycle if the pci cfg_addr enable bit is set. if the enable bit is not set, a pci i/o transaction is generated.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-20 freescale semiconductor pci/pci-x bus interface see section 16.4.2.11.2, ?accessing the pci configuration space in host mode,? and section 16.4.2.11.3, ?pci configuration in agent and agent lock modes,? for use of cfg_data. 16.3.1.1.3 pci/x interrupt acknowledge register (int_ack) an external pci/x interrupt acknowledge transaction is generated by reading the int_ack register at offset 0x0_8008. pci int_ack is read-only and a write to that address results in nothing. the int_ack register is shown in figure 16-5 . figure 16-5. pci/x int_ack register table 16-6 describes the bit settings for the int_ack register. 16.3.1.2 pci/x atmu outbound registers the outbound address translation and mapping unit controls the mapping of transactions from the internal 32-bit address space of the MPC8540 to the external pci address space. the outbound atmu consists of four translation windows plus a default translation for transactions that do not hit in one of the four windows. each window contains a base address that points to the beginning of the window in the local address map, a translation address that specifies the high-order bits of the transaction in the external pci address space, and a set of attributes including window size and external transaction type. each window must be aligned based on the granularity specified by the window size. if two outbound atmu windows overlap in the local address space, the mapping of the lower numbered window has precedence over the higher numbered window. note that outbound translation windows must not overlap the configuration access registers. window 0 is the default window and is the only window enabled upon reset. the default outbound register set is used when a transaction misses in all other outbound windows. 0 31 rdata w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8008 table 16-6. pci/x int_ack field descriptions bits name description 0?31 data a read to this register generates a pci interrupt acknowledge cycle.
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-21 16.3.1.2.1 pci/x outbound translation address registers (potar n ) the pci/x outbound translation address registers (potar n ) select the starting addresses in the pci address space for hits in the pci/x outbound windows. the translated address is created by concatenating the transaction offset to this translation address. the format of the potar n is shown in figure 16-6 . figure 16-6. pci/x outbound translation address registers table 16-7 describes the fields of the potar n registers. 16.3.1.2.2 pci/x outbound translation extended address registers (potear n ) the pci/x outbound translation extended address registers (potear n ), shown in figure 16-7 , contain the most significant bits of a 64-bit translation address. figure 16-7. pci/x outbound translation extended address registers 01112 31 r tea ta w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8c00, 0x0_8c20, 0x0_8c40, 0x0_8c60, 0x0_8c80 table 16-7. potar n field descriptions bits nam e description 0?11 tea translation extended address. represents bits 43?32 of a 64-bit pci address (bit 0 is lsb). 12?3 1 ta translation address. represents bits 31?12 of the pci address. based on the size of the window specified in powar n [ows], the low-order bits of this field may be ignored. 01112 31 r000000000000 tea w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8c04, 0x0_8c24, 0x0_8c44, 0x0_8c64, 0x0_8c84
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-22 freescale semiconductor pci/pci-x bus interface table 16-8 describes the fields of the potear n . 16.3.1.2.3 pci/x outbound window base address registers (powbar n ) the pci/x outbound window base address registers (powbar n ), shown in figure 16-8 , point to the beginning of each translation window in the local 32-bit address space. addresses for outbound transactions are compared to the appropriate bits in these registers, according to the sizes of the windows. if a transaction does not fall within one of these windows, the default translation and mapping is used. the default window is always enabled and used when the other windows miss. note that powbar0 (for outbound atmu window 0) is not used, because window 0 is the default window used when no other windows match. powbar0 may be read from and written to, but the value is ignored. figure 16-8. pci/x outbound window base address registers table 16-9 describes the field of the powbar n . 16.3.1.2.4 pci/x outbound window attributes registers (powar n ) the pci/x outbound window attributes registers (powar n ) define the window sizes to translate and other attributes for the translations. the minimum window size is 4 kbytes. the maximum window size is 4 gbytes. table 16-8. potear n field descriptions bits name description 0?11 ? reserved 12?31 tea translation extended address. represents bits [63?44] of a 64-bit pci address (used in conjunction with potar n ) 01112 31 r ?wba w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8c08, 0x0_8c28, 0x0_8c48, 0x0_8c68, 0x0_8c88 table 16-9. powbar n field descriptions bits name description 0?11 ? reserved, should be cleared. 12?3 1 wba window base address. source address that is the starting point for the outbound translation window. the window must be aligned based on the size selected in the window size bits.
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-23 the default window attribute register, powar0, is shown in figure 16-9 . note that the fields for all of the powar n registers are the same, only the reset values are different. powar1?powar4 are shown in figure 16-10 . figure 16-10. pci/x outbound window attributes registers 1?4 table 16-10 describes the fields for the powar n registers. 0 1 11 12 15 16 19 20 25 26 31 r en 1 0 0 0 0000000 0 rtt wtt 000000 ows w reset 1000_0000_0000_0100_0100_0000_0001_ 1111 2 offset 0x0_8c10 1 for powar0, translation is always enabled. the enable field (en) may be read and written, but the value is ignored. 2 the default window is enabled, configured for memory read and memory write, and set to an ows size of 4 gbytes. figure 16-9. pci/x outbound window attributes register 0 (default) 0 1 11 12 15 16 19 20 25 26 31 r en 00000000000 rtt wtt 000000 ows w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8c30, 0x0_8c50, 0x0_8c70, 0x0_8c90 table 16-10. powar n field descriptions bits name description 0 en enable. enables this address translation. note that for powar0, translation is always enabled. the enable field (en) may be read and written, but the value is ignored. 1?11 ? reserved 12?15 rtt read transaction type to run on pci 0000?0011reserved 0100 memory read 0101?0111reserved 1000 i/o read 1001? 1111reserved 16?19 wtt writetransaction type to run on pci 0000?0011reserved 0100 memory write 0101?0111reserved 1000 i/o write 1001? 1111reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-24 freescale semiconductor pci/pci-x bus interface 16.3.1.3 pci/x atmu inbound registers the inbound address translation and mapping unit controls the mapping of transactions from the external pci address space to the local address space of the MPC8540. the inbound atmu is comprised of four windows?a configuration window and three general translation windows. the configuration window has higher priority than all other inbound atmu windows and takes precedence over them if there is an overlap. each window contains the following:  a base address, which points to the beginning of the window in the external pci address map. the base address of each window is also accessible by pci configuration transactions as base address registers within the pci configuration header, as shown in figure 16-25 . the registers may be read or updated equivalently through the atmu memory map or through pci configuration transactions to the pci configuration header.  a translation address, which specifies the upper order bits of the transaction in the local address space.  a set of attributes including window size and internal transaction attributes. each window?s base address and translation address must be aligned to the size of the window. if two general inbound atmu windows overlap in the external pci address space, the mappings of the lower numbered window are applied; however, it is illegal for an inbound window to overlap the pcsrbar window. in addition, if inbound atmu windows are overlapped, the atmu windows must not map to the same address with different sets of attributes. note that pcsrbar in the pci configuration header acts as a fourth inbound window that translates a 1-mbyte region of pci space to the local configuration space pointed to by ccsrbar. pcsrbar can be accessed by pci configuration cycles or by accessing the pci configuration header through the pci cfg_addr and pci cfg_data registers. see section 16.3.1.1.1, ?pci/x configuration address register (cfg_addr),? section 16.3.1.1.2, ?pci/x configuration data register (cfg_data),? and section 16.3.2.11, ?pci base address 20?25 ? reserved 26?31 ows outbound window size. outbound translation window size n which is the encoded 2 (n+1) bytes window size. the smallest window size is 4 kbytes. 000000?0010114 kbyte window size 0011008-kbyte window size ... 0111114-gbyte window size 100000? 111111reserved the default po war register (0x0_8c10) has an ows value of 011111. also note that for powar0, setting ows to less than 4 gbytes causes addresses that miss in the other outbound windows to be aliased to the smaller address range defined by powar0[ows] and potar0. table 16-10. powar n field descriptions (continued) bits name description
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-25 registers.? all accesses to pcsrbar have an automatic internal byte lane redirection from the little-endian pci bus to the big-endian ccsrbar configuration space. 16.3.1.3.1 pci/x inbound translation address registers (pitar n ) the pci/x inbound translation address registers (pitar n ) points to the beginning of the local address space for the inbound window. the translated address is created by concatenating the transaction offset to this translation address. the format of the pitar n is shown in figure 16-11 . figure 16-11. pci/x inbound translation address registers table 16-11 describes the fields of the pitar n registers. 16.3.1.3.2 pci/x inbound window base address registers (piwbar n ) pci/x inbound window base address registers (piwbar n ), shown in figure 16-12 , select the pci/x base address for windows translated to the MPC8540 local address space. inbound transaction addresses are compared to these windows. if a pci/x transaction does not fall in one of these spaces, the pci/x interface does not assert devsel. figure 16-12. pci/x inbound window base address registers 01112 31 r ?ta w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8da0, 0x0_8dc0, 0x0_8de0 table 16-11. pitar n field descriptions bits nam e description 0?11 ? reserved, should be cleared. 12?3 1 ta translation address. indicates the starting point of the inbound translated address. the translation address must be aligned based on the size field. ta corresponds to the high-order 20 bits of a 32-bit local address. 01112 31 r bea ba w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8da8, 0x0_8dc8, 0x0_8de8
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-26 freescale semiconductor pci/pci-x bus interface table 16-12 describes the fields of the piwbar n registers. 16.3.1.3.3 pci/x inbound window base extended address registers (piwbear n ) the pci/x inbound window base extended address registers (piwbear n ), shown in figure 16-13 , contain the msbs of a 64-bit base address. note that inbound window 1 supports only a 32-bit base address and does not define an inbound window base extended address register. figure 16-13. pci/x inbound window base extended address registers table 16-13 describes the fields of the piwbear n registers. 16.3.1.3.4 pci/x inbound window attributes registers (piwar n ) the pci/x inbound window attributes registers (piwar n ) define the window sizes to translate and other attributes for the translations. 16 gbytes is the largest window size allowed. the format of the piwbar n is shown in figure 16-14 . table 16-12. piwbar n field descriptions bits name description 0?11 bea base extended address. corresponds to bits 43?32 of a 64-bit pci base address. 12?31 ba base address. corresponds to bits 31?12 of a pci base address. 01112 31 r000000000000 bea w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8dac, 0x0_8dcc table 16-13. piwbear n field descriptions bits name description 0?11 ? reserved 12?31 bea base extended address. corresponds to bits 63?44 of a 64-bit pci base address.
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-27 figure 16-14. pci/x inbound window attributes registers table 16-14 describes the fields of the piwar n registers. 0 1 2 3 7 8 11 12 15 16 19 20 25 26 31 r en 0 pf 00000 tgi rtt wtt 000000 iws w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8db0, 0x0_8dd0, 0x0_8df0 table 16-14. piwar n field descriptions bits name description 0 en enable. enables this address translation 1?reserved 2 pf prefetchable. indicates that the address space is prefetchable so that prefetching and streaming are attempted. 0 not prefetchable 1 prefetchable 3?7 ? reserved 8?11 tgi target interface. 0000?1011 reserved 1100 rapidio 1101?1110 reserved 1111 local memory (ddr sdram, local bus, sram) note: if this field is set to an i/o port rather than local memory space, attributes for the external i/o transaction are assigned in an outbound atmu of that i/o controller. 12?15 rtt read transaction type. transaction type to run if access is a read. the field description differs subject to the transaction being targeted to i/o interface or to local memory. following are the transaction type settings for reads to the rapidio interface: 0000?0011 reserved 0100 read 0101?1111 reserved following are the transaction type settings for reads to local memory: 0000?0011 reserved 0100 read, don?t snoop local processor 0101 read, snoop local processor 0110 reserved 0111 read, unlock l2 cache line 1000?1111 reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-28 freescale semiconductor pci/pci-x bus interface 16.3.1.4 pci/x error management registers when a pci/x error is detected, the appropriate error bit is set in the pci/x error detect register. subsequent errors set the appropriate error bits in the error detection registers, but relevant information (attributes, address, and data) is captured only for the first error. the pci/x error detect register is a write-1-to-clear type register. that is, reading from this register occurs normally; however, write operations are different in that the bits can be cleared but not set. a bit is cleared whenever the register is written, and the data in the corresponding bit location is a 1. for example, to clear bit 25 and not affect any other bits in the register, the value 0x0000_0040 is written to the register. the error bit is set regardless of the state of the corresponding error enable bit in the pci/x error enable register. the error enable bits are used to send or block the error reporting to the interrupt mechanism. the interrupt can be cleared by writing 0xffff_ffff to the pci/x error detect register. note that some errors are reported in two bits?one in the pci/x error detect register (err_dr) and another in the pci bus status register in the pci/x configuration header. these bits must be cleared separately; that is, clearing one does not clear the other. for example, clearing the 16?19 wtt write transaction type. transaction type to run if access is a write. the field description differs subject to the transaction being targeted to an i/o interface or to local memory. following are the transaction type settings for writes to the rapidio interface: 0000?0011 reserved 0100 write 0101?1111 reserved following are the transaction type settings for writes to local memory: 0000?0011 reserved 0100 write, don?t snoop local processor 0101 write, snoop local processor 0110 write, allocate l2 cache line 0111 write, allocate and lock l2 cache line 1000?1111 reserved 20?25 ? reserved 26?31 iws inbound window size. inbound translation window size n which is the encoded 2^(n+1) bytes window size. the smallest window is 4 kbytes. 000000?001010 reserved 001011 4-kbyte window size 001100 8-kbyte window size ... 011111 4-gbyte window size 100000? 111111 reserved for configuration and run-time registers, the window size is fixed at 010011 1-mbyte window size for register set 0, the window size is limited to 4 gbytes or smaller. table 16-14. piwar n field descriptions (continued) bits name description
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-29 err_dr[mstr abort error] does not clear the received master abort bit in the pci bus status register. in these cases, both bits must be cleared before further error reporting can occur. refer to table 16-57 for pci mode error actions and table 16-65 for pci-x mode error actions. likewise, some errors are enabled by programming two bits?one in the pci/x error enable register and another in the pci bus command register in the pci/x configuration header. a master-abort condition during a configuration cycle is not necessarily an error. in this case, if relevant, the master-abort error enable can be disabled to prevent the reporting of master-aborts during outbound configuration cycles. master-aborts during configuration reads return 0xffff_ffff. if a data parity error occurs during an inbound configuration write access, the error is reported and captured. however, the erroneous data is written to the register specified in the transaction. therefore, pci data parity error recovery routines must include reinitialization of the pci/x configuration register if the error occurred during a configuration write. a dual address cycle (dac) transaction on the pci bus has two address phases. the command of the first phase is dac and the command of the second phase is the actual transaction type. if an error occurs on a dac transaction, the dac command is stored in command field in the pci/x error attribute capture register. in pci-x mode, the MPC8540 does not check the parity on the data of a split response to an outbound read transaction because no data is actually transferred. however, outbound writes that end with a split response do transfer data and thus parity is checked for these transactions. also note that the MPC8540 does drive the correct parity for inbound read transactions that it terminates with a split response. see section 16.4.2.13, ?pci error functions,? and section 16.4.3.8, ?pci-x error functions,? for more details on error handling. 16.3.1.4.1 pci/x error detect register (err_dr) figure 16-15. pci/x error detect register (err_dr) table 16-15 describes err_dr fields. note that uncorrectable read errors may cause the assertion of core_fault_in , which causes the core to generate a machine check interrupt, unless it is disabled (by clearing hid1[rfxe]). if rfxe is zero and an error occurs, the appropriate parity detect and master-abort bits in err_dr must be cleared and the appropriate enable bits in err_en must be 0 1 20 21 22 23 24 25 26 27 28 29 30 31 r multiple pci errors addr parity error rcvd serr error mstr perr error trgt perr error mstr abort error trgt abort error owmsv error ormsv error irmsv error scm error toe error w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8e00
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-30 freescale semiconductor pci/pci-x bus interface set to ensure that an interrupt is generated. see section 6.10.2, ?hardware implementation-dependent register 1 (hid1).? 16.3.1.4.2 pci/x error capture disable register (err_cap_dr) figure 16-16. pci/x error capture disable register (err_cap_dr) table 16-15. err_dr field descriptions bits name description 0 multiple pci errors 0 multiple pci errors of the same type were not detected (write-1-to-clear) 1 multiple pci errors of the same type were detected 1?20 ? reserved 21 addr parity error address parity error (write-1-to-clear) 22 rcvd serr error received serr error (write-1-to-clear) 23 mstr perr error master perr error (write-1-to-clear) 24 trgt perr error target perr error (write-1-to-clear) 25 mstr abort error master-abort error (write-1-to-clear) 26 trgt abort error target abort error (write-1-to-clear) 27 owmsv error outbound write memory space violation error (write-1-to-clear) 28 ormsv error outbound read memory space violation error (write-1-to-clear) 29 irmsv error pci/x inbound read memory space violation error (write-1-to-clear) 30 scm error pci/x split completion message error (write-1-to-clear) 31 toe error pci/x time out error (write-1-to-clear) 02021 31 r addr parity error capture disable rcvd serr error capture disable mstr perr error capture disable trgt perr error capture disable mstr abort error capture disable trgt abort error capture disable owmsv error capture disable ormsv error capture disable irmsv error capture disable scm error capture disable toe error capture disable w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8e04
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-31 16.3.1.4.3 pci/x error enable register (err_en) figure 16-17. pci/x error enable register (err_en) table 16-17 describes err_dr fields. note that uncorrectable read errors may cause the assertion of core_fault_in , which causes the core to generate a machine check interrupt unless it is disabled by clearing hid1[rfxe]. if rfxe is zero and this error occurs, the appropriate parity detect and master-abort bits in err_dr must be cleared and the appropriate err_en bits must be set to ensure that an interrupt is generated. see section 6.10.2, ?hardware implementation-dependent register 1 (hid1).? table 16-16. err_cap_dr field descriptions bits name description 0?20 ? reserved 21 addr parity error capture disable disable capture for address parity errors 22 rcvd serr error capture disable disable capture for received serr errors 23 mstr perr error capture disable disable capture for master perr errors 24 trgt perr error capture disable disable capture for target perr errors 25 mstr abort error capture disable disable capture for master-abort errors 26 trgt abort error capture disable disable capture for target abort errors 27 owmsv error capture disable disable capture for outbound write memory space violation errors 28 ormsv error capture disable disable capture for outbound read memory space violation errors 29 irmsv error capture disable disable capture for pci/x inbound read memory space violation errors 30 scm error capture disable disable capture for pci/x split completion message errors 31 toe error capture disable disable capture for pci/x time out errors 0 202122 232425 26 27 28 293031 r addr parity error enable rcvd serr error enable mstr perr error enable trgt perr error enable mstr abort error enable trgt abort error enable owmsv error enable ormsv error enable irmsv error enable scm error enable toe error enable w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8e08
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-32 freescale semiconductor pci/pci-x bus interface 16.3.1.4.4 pci/x error attributes capture register (err_attrib) figure 16-18. pci/x error attributes capture register (err_attrib) table 16-17. err_en field descriptions bits name description 0?20 ? reserved 21 addr parity error enable enable reporting address parity errors 22 rcvd serr error enable enable reporting received serr errors 23 mstr perr error enable enable reporting master perr errors 24 trgt perr error enable enable reporting target perr errors 25 mstr abort error enable enable reporting master-abort errors 26 trgt abort error enable enable reporting target abort errors 27 owmsv error enable enable reporting outbound write memory space violation errors 28 ormsv error enable enable reporting outbound read memory space violation errors 29 irmsv error enable enable reporting pci/x inbound read memory space violation errors 30 scm error enable enable reporting pci/x split completion message errors 31 toe error enable enable reporting pci/x time out errors 0 3 4 7 8 9 10 11 15 16 19 20 30 31 r high word byte enables low word byte enables high parity bit low parity bit error source command valid w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8e0c table 16-18. err_attrib field descriptions bits name description 0?3 high word byte enables pci byte enables for most significant word of the double word 4?7 low word byte enables pci byte enables for least significant word of the double word 8 high parity bit parity bit for most significant pci bus data word (only valid for 64-bit pci bus) 9 low parity bit parity bit for least significant pci bus data word 10 ? reserved
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-33 16.3.1.4.5 pci/x error address capture register (err_addr) figure 16-19. pci/x error address capture register (err_addr) 11?15 error source the source of the pci transaction 00000 pci/x interface 00001 reserved 00010?00011 reserved 00100 local bus controller 00101?01000 reserved 01001 reserved 01010?01011 reserved 01100 rapidio interface 01101 reserved 01110 reserved 01111 reserved 10000 e500 core (instruction) 10001 e500 core (data) 10010 reserved 10011 reserved 10100 reserved 10101 dma 10110 rdc 10111 sap 11000 tsec1 11001 tsec2 11010 fec (10/100) 11011 reserved 11100 rapidio message units 11101 rapidio doorbell units 11110 rapidio port-write units 11111 reserved 16?19 command pci command 20?30 ? reserved 31 valid info the pci bus capture registers contain valid information 0 31 r memory address w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8e10 table 16-19. err_addr field descriptions bits name description 0?31 memory address memory transaction address table 16-18. err_attrib field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-34 freescale semiconductor pci/pci-x bus interface 16.3.1.4.6 pci/x error extended address capture register (err_ext_addr) figure 16-20. pci/x error extended address capture register (err_ext_addr) 16.3.1.4.7 pci/x error data low capture register (err_dl) note that for inbound reads that have data parity errors, only the address (err_addr and err_ext_addr) and attributes (err_attrib) are captured. the data is not captured. also note that pci-x split completion error messages for outbound dword writes are incorrectly reported in the pci/x error data low capture register (err_dl). figure 16-21. pci/x error data low capture register (err_dl) 16.3.1.4.8 pci/x error data high capture register (err_dh) note that for inbound reads that have data parity errors, only the address (err_addr and err_ext_addr) and attributes (err_attrib) are captured. the data is not captured. 0 31 r memory extended address w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8e14 table 16-20. err_ext_addr field descriptions bits name description 0?31 memory extended address memory transaction extended address 0 31 r data low w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8e18 table 16-21. err_dl field description bits name description 0?31 data low least significant pci bus data word
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-35 figure 16-22. pci/x error data high capture register (err_dh) 16.3.1.4.9 pci/x gasket timer register (gas_timr) figure 16-23. pci/x gasket timer register (gas_timr) 0 31 r data high w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x0_8e1c table 16-22. err_dh field description bits name description 0?31 data high most significant pci bus data word (only valid with 64-bit pci bus) 078 31 r0000000 en tcnt w reset 0000_0001_0000_0000_0011_ 1111_1111_1111 (pci m ode) 0000_0000_0000_0000_0011_ 1111_1111_1111 (pci-x mode) offset 0x0_8e20 table 16-23. gas_timr field descriptions bits name description 0?6 ? reserved 7 en gasket timer enable. 0 pci-x default: gasket timer is disabled. 1 pci default: gasket timer is enabled. 8?31 tcnt number of system clocks to purge a non-prefetchable inbound read buffer
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-36 freescale semiconductor pci/pci-x bus interface 16.3.1.4.10pci-x split completion timer register (pcix_timr) figure 16-24. pci-x split completion timer register (pcix_timr) 16.3.2 pci/x configuration header the pci local bus specification defines the configuration registers contained within the pci/x configuration header from 0x00 through 0x3f. the pci-x addendum to the pci local bus specification defines additional registers beyond 0x3f. figure 16-25 lists the common pci/x configuration header as implemented by the MPC8540. 078 31 r0 0 0 0 000 en tcnt w reset 0000_0001_0000_0000_0011_ 1111_1111_1111 offset 0x0_8e24 table 16-24. pcix_timr field descriptions bits nam e description 0?6 ? reserved 7 en pci-x timer enable 0 pci-x timer is disabled. 1 pci-x timer is enabled (default). 8?3 1 tcn t number of system clocks to purge a split completion buffer. this occurs when a split completion does not follow a split response.
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-37 figure 16-25. MPC8540 pci/x configuration header figure 16-26 lists the additional pci-x configuration registers. figure 16-26. pci-x additional configuration registers note that software must be restricted from accessing any reserved or undefined register space on the MPC8540; doing so may hang the device. table 16-54 in section 16.4.2.11.1, ?pci configuration space header,? provides a summary of the pci configuration header registers. detailed descriptions of these registers are provided in the pci local bus specification . 16.3.2.1 pci vendor id register?offset 0 x 00 the pci vendor id register, shown in figure 16-27 , is used to identify the manufacturer of the part. reserved device id vendor id pci bus status pci bus command bus base class code bus programming interface subclass code revision id bist control bus latency timer header type bus cache line size pci bus max_lat pci bus interrupt pin pci bus min_gnt pci bus interrupt line 00 04 08 0c 3c pci configuration and status register base address register (pcsrbar) 10 24 40 44 pci bus arbiter configuration 64-bit high memory base address register 34 38 2c subsystem id subsystem vendor id 14 32-bit memory base address register 18 64-bit low memory base address register 1c 64-bit high memory base address register 20 64-bit low memory base address register pci bus function pci bus capability pointer 28 address offset (hex) 30 reserved pci-x command pci-x status pci-x next capability pci-x capability id 60 64 address offset (hex )
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-38 freescale semiconductor pci/pci-x bus interface figure 16-27. pci vendor id register table 16-25 describes pci vendor id register fields. 16.3.2.2 pci device id register?offset 0 x 02 the pci device id register, shown in figure 16-28 , is used to identify the device. figure 16-28. pci device id register 16.3.2.3 pci bus command register?offset 0 x 04 the 2-byte pci bus command register provides control over the ability to generate and respond to pci cycles. table 16-27 describes the bits of the pci bus command register. 15 0 r vendor id w reset 0001_0000_0101_0111 offset 0x00 table 16-25. pci vendor id register field description bits name description 15?0 vendor id 0x1057 (freescale semiconductor) 15 0 r device id w reset 0000_0000_0000_1000 offset 0x02 table 16-26. pci device id register field description bits name description 15?0 device id 0x0008
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-39 figure 16-29. pci bus command register 15 10 9 8 7 6 5 4 3 2 1 0 r fast back-to- back serr parity error response memory-write- and-invalidate special cycles bus master memory space i/o space w reset 0000_0000_0000_0*00 *0 = agent, 1 = host offset 0x04 table 16-27. pci bus command register field descriptions bits name description 15?1 0 ? reserved 9fast back-to-back hard-wired to 0, indicating that this pci controller (as a master) does not run fast back-to-back transactions 8 serr controls the pci_serr driver of this pci controller. this bit (and bit 6) must be set to report address parity errors. 0 disables the pci_serr driver 1 enables the pci_serr driver 7?reserved 6 parity error response controls whether this pci controller responds to parity errors. 0 parity errors are ignored and normal operation continues. 1 parity errors cause the appropriate bit in the pci status register to be set. however, note that errors are reported based on the values set in the pci error enable and detection registers. 5?reserved 4 memory-write - and-invalidate hard-wired to 0, indicating that this pci controller, acting as a master, can not generate the memory-write-and-invalidate command 3 special-cycle s hard-wired to 0, indicating that this pci controller (as a target) ignores all special-cycle commands 2 bus master indicates whether this pci controller is configured as a master. this indicates the setting of the host/agent configuration input (lwe2 ) at power-on reset. 0 disables the ability to generate pci accesses 1 enables this pci controller to behave as a pci bus master (host) note that the bus master bit in the MPC8540?s pci bus command register must be set before any outbound configuration access is attempted. 1 memory space controls whether this pci controller (as a target) responds to memory accesses. 0 this pci controller does not respond to pci memory space accesses. 1 this pci controller (as a target) responds to pci memory space accesses. 0 i/o space hard-wired to 0, indicating that this pci controller (as a target) does not respond to pci i/o space accesses
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-40 freescale semiconductor pci/pci-x bus interface 16.3.2.4 pci bus status register?offset 0 x 06 the 2-byte pci bus status register is used to record status information for pci bus bus-related events. the definition of each bit is given in table 16-28 . only 2-byte accesses to address offset 0x06 are allowed. note that some errors are reported in two bits?one in the pci bus status register and another in the pci/x error detect register (err_dr). these bits must be cleared separately; that is, clearing one does not clear the other. for example, clearing the err_dr[mstr abort error] does not clear the received master abort bit in the pci bus status register. in these cases, both bits must be cleared before further error reporting can occur. refer to table 16-57 for pci mode error actions and table 16-65 for pci-x mode error actions. likewise, some errors are enabled by programming two bits?one in the pci bus command register and another in the pci/x error enable register (err_en). reads to this register behave normally. writes are slightly different in that bits can be cleared, but not set. a bit is cleared whenever the register is written, and the data in the corresponding bit location is a 1. for example, to clear bit 14 and not affect any other bits in the register, write the value 0b0100_0000_0000_0000 to the register. figure 16-30. pci bus status register . 15 14 13 12 11 10 9 8 7 6 5 4 3 0 r detected parity error signaled system error received master abort received target abort signaled target abort devsel timing master data parity error detected fast back-to- back capable 66-mhz capable capabilities list w reset 0000_0000_1011_0000 offset 0x06 table 16-28. pci bus status register field descriptions bits name description 15 detected parity error set whenever this pci controller detects a pci parity error, even if parity error handling is disabled (as controlled by bit 6 in the pci bus command register) 14 signaled system error set whenever this pci controller asserts pci_serr . 13 received master-abort set whenever this pci controller, acting as the pci master, terminates a transaction (except for a special-cycle) using master-abort 12 received target-abort set whenever a pci transaction initiated by this pci controller (excluding a special-cycle) is terminated by a target-abort 11 signaled target-abort set whenever this pci controller, acting as the pci target, issues a target-abort to a pci master 10? 9 devsel timing hard-wired to 0b00, indicating that this pci controller uses fast device select timing.
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-41 16.3.2.5 pci revision id register?offset 0 x 08 the pci revision id register is used to identify the revision of the part. figure 16-31. pci revision id register 16.3.2.6 pci bus programming interface register?offset 0 x 09 table 16-30 describes the pci bus programming interface register (pir). figure 16-32. pci bus programming interface register 8 master data parity error detected set upon detecting a data parity error. three conditions must be met for this bit to be set:  this pci controller detected a parity error.  this pci controller was acting as bus master for the operation in which the error occurred.  bit 6 in the pci bus command register was set. 7 fast back-to-back capable hard-wired to 1, indicating that this pci controller (as a target) is capable of accepting fast back-to-back transactions 6?reserved 5 66-mhz capable read-only bit indicates that this pci controller is capable of 66 mhz pci bus operation. 4 capabilities list hard-wired to 1 3?0 ? reserved 7 0 r revision id w reset revision specific offset 0x08 table 16-29. pci revision id register field descriptions bits name description 7?0 revision id revision specific 7 0 r programming interface w reset 0000_000* *0 = host, 1 = agent offset 0x09 table 16-28. pci bus status register field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-42 freescale semiconductor pci/pci-x bus interface 16.3.2.7 pci subclass code register?offset 0x0a table 16-32 describes the pci subclass code register (pscr). figure 16-33. pci subclass code register 16.3.2.8 pci bus base class code register?offset 0 x0b table 16-32 describes the pci bus base class code register (pbccr). figure 16-34. pci bus base class code register table 16-30. pci bus programming interface register field description bits name description 7?0 programming interface 0x00 when the pci controller is configured as host bridge 0x01 when the pci controller is configured as an agent device 7 0 r subclass code w reset 0010_0000 offset 0x0a table 16-31. pci subclass code register field description bits name description 7?0 subclass code powerpc?0x20 7 0 r base class code w reset 0000_1011 offset 0x0b table 16-32. pci bus base class code register field description bits name description 7?0 base class code processor?0x0b
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-43 16.3.2.9 pci bus cache line size register?offset 0x0c table 16-33 describes the pci bus cache line size register (pclsr). figure 16-35. pci bus cache line size register (pclsr) 16.3.2.10 pci bus latency timer register?0x0d table 16-34 describes the pci latency timer register (pltr). figure 16-36. pci bus latency timer register 16.3.2.11 pci base address registers a pci base address register points to the beginnings of each address range to which the device responds by assertingt pci_devsel . the base address register (bar) at offset 0x10 is a fixed 7 0 r cache line size w reset 0000_0000 (pci); 0000_1000 (pci-x) offset 0x0c table 16-33. pci bus cache line size register (pclsr) field descriptions bits name description 7?0 cache line size represents the cache line size of the processor in terms of 32-bit words (eight 32-bit words = 32 bytes). pclsr is read-write; however, for pci operation, an attempt to program this register to any value other than 0x8 results in clearing it. for pci-x operation, this register is hardwired to 0x8. 7 32 0 r latency timer latency timer w reset 0000_0000 offset 0x0d table 16-34. pci bus latency timer register field descriptions bit s name description 7?3 latency timer the maximum number of pci clocks that the device, when mastering a transaction, holds the bus after pci bus grant has been negated. the value is in pci clocks. the pci 2.2 specification gives rules by which the pci bus interface unit completes transactions when the timer has expired. 2?0 latency timer read-only bits. the minimum latency timer value when set is 8 pci clocks.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-44 freescale semiconductor pci/pci-x bus interface 1-mbyte window that is automatically translated to the local configuration, control, and status registers address space. the other base address registers are aliases (with differing format) of the pci inbound atmu windows; see section 16.3.1.3, ?pci/x atmu inbound registers.? the 32-bit base address register at offset 0x14 corresponds to inbound atmu window 1; the 64-bit base address registers at offsets 0x18 and 0x20 correspond to inbound atmu windows 2 and 3. if one of these registers is written, the corresponding atmu register is also updated; if a pci inbound atmu register is written, the corresponding bar is also updated. if one of these registers is read, the corresponding size of atmu is returned on the pci bus providing valid window size in the inbound atmu window attributes register. note that pcsrbar cannot be updated through the inbound atmu registers. figure 16-37. pci configuration and status register base address register (pcsrbar) figure 16-38. 32?bit memory base address register 31 20 19 4 3 2 1 0 r address pref type msi w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x10 table 16-35. pcsrbar field descriptions bits name description 31?2 0 addres s indicates the base address at which the inbound configuration/run-time window resides. this window is fixed at 1 mbyte. 19?4 ? reserved 3 pref prefetchable 2?1 type type. 00?locate anywhere in 32-bit address space. 0 msi memory space indicator 31 12 11 4 3 2 1 0 r address pref type msi w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x14
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-45 figure 16-39. 64-bit low memory base address register table 16-36. 32-bit memory base address register field descriptions bits name description 31?1 2 addres s indicates the base address at which the inbound memory window resides. the number of upper bits that the device allows to be writable is selected through the inbound translation windows. 11?4 ? reserved. the device allows a 4 kbyte window minimum. 3 pref prefetchable 2?1 type type: 00?locate anywhere in 32-bit address space. 0 msi memory space indicator. 31 16 r address w reset 0000_0000_0000_0000 15 1211 43210 r address pre type msi w reset 0000_0000_0000_0100 offset 0x18, 0x20 table 16-37. 64-bit low memory base address register field descriptions bits name description 31?1 2 addres s indicates the base address at which the inbound memory window resides. the number of upper bits that the device allows to be writable is selected through the inbound translation windows. 11?4 ? reserved. the device allows a 4 kbyte window minimum. 3 pref prefetchable 2?1 type type: 10?locate anywhere in 64-bit address space. 0 msi memory space indicator
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-46 freescale semiconductor pci/pci-x bus interface figure 16-40. 64-bit high memory base address register 16.3.2.12 pci subsystem vendor id register the pci subsystem vendor id register is used to identify the subsystem. figure 16-41. pci subsystem vendor id register 16.3.2.13 pci subsystem id register the pci subsystem id register is used to identify the subsystem. 31 0 r address w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x1c, 0x24 table 16-38. 64-bit high memory base address register field description bits name description 31? 0 address indicates the base address that the inbound memory window resides at. the number of upper bits that the device allows to be writable is selected through the inbound translation windows. if no access to local memory is to be permitted by external masters, then all bits are programmed. 15 0 r subsystem vendor id w reset 0000_0000_0000_0000 offset 0x2c table 16-39. pci subsystem vendor id register field description bits name description 15?0 subsystem vendor id 0x0000
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-47 figure 16-42. pci subsystem id register 16.3.2.14 pci bus capabilities pointer register the pci bus capabilities pointer identifies additional functionality supported by the device. this field is set to point to the pci-x configuration registers. the definition of each bit is given in table 16-41 . figure 16-43. pci bus capabilities pointer register 16.3.2.15 pci bus interrupt line register figure 16-44. pci bus interrupt line register 15 0 r subsystem id w reset 0000_0000_0000_0000 offset 0x2e table 16-40. pci subsystem id register field description bits name description 15?0 subsystem id 0x0000 7 0 r capab ilities pointer w reset 0110_0000 offset 0x34 table 16-41. pci bus capabilities pointer register field description bits name description 7?0 capabilities pointer specifies the byte offset in the configuration space containing the first item in the capabilities list. the default value points to the pci-x configuration registers. 7 0 r interrupt line w reset 0000_0000 offset 0x3c
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-48 freescale semiconductor pci/pci-x bus interface 16.3.2.16 pci bus interrupt pin register the MPC8540 does not generate specific pci_inta, pci_intb, etc. outputs, nor does this device respond to intack or special cycle commands on the pci/x interfaces. the MPC8540 does have 12 general purpose interrupt request lines (irq[0:11]) and an interrupt output, irq_out (active low, level sensitive), to which all external and most internal interrupt sources (including pci/x) can be routed. figure 16-45. pci bus interrupt pin register 16.3.2.17 pci bus minimum grant (min_gnt) register figure 16-46. pci bus minimum grant register table 16-42. pci bus interrupt line register field description bits name description 7?0 interrupt line this register is used to communicate interrupt line routing information (hard-wired to zero). 7 0 r interrupt pin w reset 0000_0000 offset 0x3d table 16-43. pci bus interrupt pin register field description bits name description 7?0 interrupt pin no pci_int pin selected 7 0 rmin_gnt w reset 0000_0000 offset 0x3e table 16-44. pci bus minimum grant register field description bits name description 7?0 min_gnt specifies the length of the device?s burst period (0x00 indicates that this pci controller has no major requirements for the settings of latency timers)
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-49 16.3.2.18 pci bus maximum latency (max_lat) register figure 16-47. pci bus maximum latency register 16.3.2.19 pci bus function register (pbfr) the 2-byte pci bus function register is used to determine how different features of the pci interface are configured. this register is at pci configuration space at offset 0x44. figure 16-48. pci bus function register 7 0 r maxlat w reset 0000_0000 offset 0x3f table 16-45. pci bus maximum latency register field description bits name description 7?0 maxlat specifies how often the device needs to gain access to the pci bus (0x00 indicates that this pci controller has no major requirements for the settings of latency timers) 15 6 5 4 3 2 1 0 r0 0 0 0 0 0 0 0 0 0 acl 0p640 0pah w reset 0000_0000_00*0_*00* *depends on the state of the reset configuration signals at reset offset 0x44 table 16-46. pci bus function register field descriptions bits name description 15? 6 ?reserved 5 acl agent configuration lock. indicates to an external host whether the local processor is doing internal configuration and must be explicitly set and cleared by the local processor during this time. acl is set during reset if the la27 (cfg_cpu_boot) input selects the cpu as the configuration owner. this bit is only meaningful in agent mode. 0 pci interface allows incoming pci configuration cycles. 1 pci interface retries all incoming pci configuration cycles. 4?reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-50 freescale semiconductor pci/pci-x bus interface 16.3.2.20 pci bus arbiter configuration register (pbacr) the pci bus arbiter configuration register is used to determine the configuration of the pci bus arbiter. figure 16-49. pci bus arbiter configuration register 3 p64 pci 64-bit configuration. read-only. indicates the reset value of the pci 64-bit configuration signal, pci_req64 . 0 64-bit interface functions as a 32-bit interface. 1 64-bit interface functions as a 64-bit interface. 2?1 ? reserved 0 pah pci agent/host. read-only. indicates the reset value of the pci host/agent configuration signal, lwe3 . 0 pci interface is in host mode 1 pci interface is in agent mode 15 14 13 12 11 10 9 8 7 6 2 1 0 rpad pm 0 pbmd 00000 pbmp 0 dp w reset 0000_0000_0000_0000 offset 0x46 table 16-47. pci bus arbiter configuration register field descriptions bits name description 15 pad pci arbiter disable. determines if the device is the pci arbiter on the pci bus or not. the reset state is determined by the inverse of the pci_gnt2 configuration input signal when reset is released. 0 device is the pci arbiter. 1 device is not the pci arbiter. device presents its request on pci_ req0 to the external arbiter and receives its grant on pci_ gnt0 . 14 pm parking mode. controls which device receives the bus grant when there are no outstanding bus requests and the bus is idle. 0 the bus is parked on the last device to use the bus. 1 the bus is parked on this device. 13 ? reserved 12 pbmd pci broken master disable. determines if the device ignores the bus requests of an initiator that requests the bus for an excessive period without using the bus. 0 an initiator that requests the bus and receives the grant must begin using the bus within 16 pci clock periods after the bus becomes idle or else its request is subsequently ignored. 1 no requests are ignored. 11?7 ? reserved table 16-46. pci bus function register field descriptions (continued) bits name description
memory map/register definitions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-51 16.3.2.21 pci-x next capabilities id register?0x60 this register is an additional standard register specified by the pci-x addendum to the pci local bus specification . figure 16-50. pci-x next capabilities id register 16.3.2.22 pci-x capability pointer register?0x61 the pci-x next capabilities pointer register is an additional standard register specified by the pci-x addendum to the pci local bus specification . this register identifies additional functionality supported by the device. the definition of each bit is given in table 16-49 . figure 16-51. pci-x capability pointer register 6?2 pbmp pci bus master priorities. determines arbitration priority given to different masters on the pci bus. bit 6 corresponds to the priority of the master sourcing pci_ req0 ; bit 2 corresponds to the priority of the master sourcing pci_ req4 . 0master n is low priority. 1master n is high priority. 1?reserved 0 dp device priority. determines this device?s arbitration priority. 0 device is low priority. 1 device is high priority. 7 0 r capabilities id w reset 0000_0111 offset 0x60 table 16-48. pci-x next capabilities id register field descriptions bits name description 7?0 capabilities id this register identifies this item in the capabilities list as a pci-x device having pci-x registers. 7 0 r capability pointer w reset 0000_0000 offset 0x61 table 16-47. pci bus arbiter configuration register field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-52 freescale semiconductor pci/pci-x bus interface 16.3.2.23 pci-x command register?0x62 the 2-byte pci-x command register is an additional standard register specified by the pci-x addendum to the pci local bus specification . this register provides control over the ability to generate and respond to pci-x cycles. table 16-50 describes the bits of the pci-x command register. figure 16-52. pci-x command register 16.3.2.24 pci-x status register?0x64 the 4-byte pci-x status register is an additional standard register specified by the pci-x addendum to the pci local bus specification . this register is used to record additional status information for pci-x bus-related events. in agent mode, the device and bus number are updated by the inbound configuration write transaction except for the inbound configuration write to pci-x status register. the definition of each bit is given in table 16-51 . only 4-byte accesses to address offset 0x64 are allowed. table 16-49. pci-x capability pointer register field description bits name description 7?0 capability pointer specifies the byte offset in the configuration space containing the first item in the capabilities list. 15 76 4321 0 r000000000 most mmrbc ero dpre w reset 0000_0000_0011_0000 offset 0x62 table 16-50. pci-x command register field descriptions bits name description 15?7 ? reserved 6-4 most maximum outstanding split transactions (4 supported) 3-2 mmrbc maximum memory read byte count (128 supported) 1 ero enable relax ordering (read-only) 0 dpre data parity error recovery enable (supported)
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-53 figure 16-53. pci-x status register 16.4 functional description this section describes the functionality of the pci/x interface. 16.4.1 pci/x bus arbitration pci/x bus arbitration is access-based. bus masters must arbitrate for each access performed on the bus. the pci/x bus uses a central arbitration scheme where each master has a unique request 31 30 29 28 26 25 23 22 21 20 19 18 17 16 r0 0 rsm dmcrs dmost dmrbc dc usc scd mc sbd w reset 0001_0001_1000_001* *0 = 32-bit bus, 1 = 64-bit bus 15 8 7 3 2 0 r dbn ddn dfn w reset 1111_1111_1111_ 1010 offset 0x64 table 16-51. pci-x status register field descriptions bits name description 31?30 ? reserved 29 rsm receive split completion error message (write-1-to-clear) 28?26 dmcrs designed maximum cumulative read size (16 kbytes) 25?23 dmost designed maximum outstanding split transactions (4 outstanding) 22?21 dmrbc designed maximum memory read byte count (128 bytes) 20 dc device complexity (simple device, can retry writes) 19 usc unexpected split completion (write-1-to-clear) 18 scd split completion discarded (write-1-to-clear) 17 mc 133-mhz capability 16 sbd 64-bit device 15?8 dbn bus number (used for diagnostic purposes) 7?3 ddn device number (used for diagnostic purposes) 2?0 dfn function number (used for diagnostic purposes)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-54 freescale semiconductor pci/pci-x bus interface (r eq ) output and grant (g nt ) input signal. a simple request/grant handshake is used to gain access to the bus. arbitration for the bus occurs during the previous access so that no pci/x bus cycles are consumed due to arbitration (except when the bus is idle). the MPC8540 provides bus arbitration logic for its master interface and up to five other external pci/x bus masters. the on-chip pci/x arbiter functions in both host and agent modes, or it can be disabled to allow for an external pci/x arbiter. a configuration signal (pci_gnt2 ) sampled at the negation of hreset determines if the on-chip pci/x arbiter is enabled (high) or disabled (low). the state of the reset signal is reflected in bit 15 (read-only) of the pci/x bus arbitration control register (pbacr[pad]). note that pad is the inverse of the arbiter configuration signal; that is, when pad = 0 the arbiter is enabled, and when pad = 1 the arbiter is disabled. see chapter 4, ?reset, clocking, and initialization,? for more information on the reset configuration signals. if the on-chip pci/x arbiter is enabled, a request-grant pair of signals is provided for each external master (pci_req [0:4] and pci_gnt [0:4]). in addition, the internal request/grant pair for the internal master state machine of the MPC8540 governs processor, dma, and rapidio accesses to the pci/x interface. if the on-chip pci/x arbiter is disabled, the MPC8540 uses the pci_ req0 signal as an output to issue its request to the external arbiter and uses the pci_ gnt0 signal as an input to receive its grant from the external arbiter. the following sections describe the operation of the on-chip pci/x arbiter that arbitrates between external pci/x masters and the internal pci/x bus master of the MPC8540. 16.4.1.1 pci/x bus arbiter operation the on-chip pci/x arbiter uses a programmable two-level, round-robin arbitration algorithm. each of the five external masters, plus the MPC8540, can be programmed for two priority levels, high or low, using the appropriate bits in the pbacr. within each priority group, the pci/x bus grant is asserted to the next requesting device in numerical order, with the MPC8540 positioned before device 0. conceptually, the lowest-priority device is the master that is currently using the bus, and the highest-priority device is the device that follows the current master in numerical order and group priority. this is considered to be a fair algorithm, since a single device cannot prevent other devices from having access to the bus; it automatically becomes the lowest-priority device as soon as it begins to use the bus. if a master is not requesting the bus, then its transaction slot is given to the next requesting device within its priority group. a grant is awarded to the highest-priority requesting device as soon as the current master begins a transaction; however, the granted device must wait until the bus is relinquished by the current master before initiating a transaction.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-55 the grant given to a particular device may be removed and awarded to another higher-priority device, whenever the higher-priority device asserts its request. if the bus is idle when a device requests the bus, then the arbiter withholds the grant for 1 clock cycle. the arbiter re-evaluates the priorities of all requesting devices and grants the bus to the highest-priority device in the following clock cycle. this allows a turnaround clock when a higher-priority device is using address stepping or when the bus is parked. the low-priority group collectively has one bus transaction request slot in the high-priority group. for n high-priority devices and m low-priority devices, each high-priority device is guaranteed at least 1 of n+1 bus transactions and each low-priority device is guaranteed at least 1 of (n+1) m bus transactions, with one low-priority device receiving the grant in 1 of n+1 bus transactions. if all devices are programmed to the same priority level, or if the low-priority group has only one device, the algorithm defaults to give each device an equal number of bus grants in round-robin sequence. for the example in figure 16-54 , assume that several devices are requesting the bus. if two masters are in the high-priority group and three are in the low-priority group, each high-priority master is guaranteed at least one out of three transaction slots and each low-priority master is guaranteed one out of nine transaction slots. in figure 16-54 , the grant sequence (with all devices, except device 4 requesting the bus and device 3 being the current master) is 0, 2, MPC8540, 0, 2, 1, 0, 2, 3, ?, and repeating. if device 2 is not requesting the bus, the grant sequence is 0, MPC8540, 0, 1, 0, 3, ?, and repeating. if device 2 requests the bus when device 0 is conducting a transaction and the MPC8540 has the next grant, the MPC8540 has its grant removed and device 2 is awarded the grant since device 2 is higher priority than the MPC8540 when device 0 has the bus. figure 16-54. pci/x arbitration example device 2 device 0 low- high-priority group device 1 device 3 low-priority group (1/3) (1/3) (1/3) (1/9) (1/9) (1/9) priority slot MPC8540
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-56 freescale semiconductor pci/pci-x bus interface 16.4.1.2 pci/x bus parking when no device is using or requesting the bus, the pci/x arbiter grants the bus to a selected device. this is known as parking the bus on the selected device. the selected device is required to drive the pci_ad[31:0], pci_c/be [0:3], and the pci/x parity signals to a stable value, preventing these signals from floating. the parking mode parameter (pbacr[pm]) determines which device the arbiter selects for parking the pci/x bus. if pbacr[pm] = 0 (or if the bus is not idle), then the bus is parked on the last master to use the bus. if the bus is idle and pbacr[pm] = 1, the bus is parked on the MPC8540. 16.4.1.3 broken master lock-out (pci only) the pci bus arbiter on the MPC8540 has a feature that allows it to lock out any masters that are broken or ill-behaved. the broken master feature is controlled by programming bit 12 of the pci bus arbitration control register (0 = enabled, 1 = disabled). note that the pci-x bus arbiter does not support the broken master lockout function. when the broken master feature is enabled, a granted device that does not assert pci_frame within 16 pci clock cycles after the bus is idle, has its grant removed and subsequent requests are ignored until its req is negated for at least one clock cycle. this prevents ill-behaved masters from monopolizing the bus. when the broken master feature is disabled, a device that requests the bus and receives a grant never loses its grant until and unless it begins a transaction or negates its req signal. note that disabling the broken master feature is not recommended. 16.4.1.4 power-saving modes and the pci arbiter in the sleep power-saving mode, the clock signal driving sysclk can be disabled. if the clock is disabled, arbitration logic cannot perform its function. system programmers must park the bus with a device that can sustain the pci_ad[31:0], pci_c/be [3:0], and parity signals prior to disabling the sysclk signal. if the bus is parked on the MPC8540 when its clocks are stopped, the MPC8540 sustains the pci_ad[31:0], pci_c/be [3:0], and parity signals in their prior states. in this situation, the only way for another agent to use the pci bus is by waking the MPC8540. in the doze or nap power-saving modes, the arbiter continues to operate allowing other pci devices to run transactions. 16.4.2 pci bus protocol this section provides a general description of the pci bus protocol. specific pci bus transactions are described in section 16.4.2.7, ?pci bus transactions.? refer to figure 16-55 , figure 16-56 , figure 16-57 , and figure 16-58 for examples of the transfer-control mechanisms described in this section.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-57 all signals are sampled on the rising edge of the pci bus clock (sysclk). each signal has a setup and hold aperture with respect to the rising clock edge in which transitions are not allowed. outside this aperture, signal values or transitions have no significance. see the MPC8540 integrated processor hardware specifications for specific setup and hold times. 16.4.2.1 basic transfer control the basic pci bus transfer mechanism is a burst, composed of an address phase followed by one or more data phases. fundamentally, all pci data transfers are controlled by three signals?pci_frame (frame), pci_irdy (initiator ready), and pci_trdy (target ready). an initiator asserts pci_frame to indicate the beginning of a pci bus transaction and negates pci_frame to indicate the end of a pci bus transaction. an initiator negates pci_irdy to force wait cycles. a target negates pci_trdy to force wait cycles. the pci bus is considered idle when both pci_frame and pci_irdy are negated. the first clock cycle in which pci_frame is asserted indicates the beginning of the address phase. the address and bus command code are transferred in that first cycle. the next cycle begins the first of one or more data phases. data is transferred between initiator and target in each cycle that both pci_irdy and pci_trdy are asserted. wait cycles may be inserted in a data phase by the initiator (by negating pci_irdy ) or by the target (by negating pci_trdy ). once an initiator has asserted pci_irdy , it cannot change pci_irdy or pci_frame until the current data phase completes regardless of the state of pci_trdy . once a target has asserted pci_trdy or pci_stop , it cannot change pci_devsel , pci_trdy , or pci_stop until the current data phase completes. in simpler terms, once an initiator or target has committed to the data transfer, it cannot change its mind. when the initiator intends to complete only one more data transfer (which could be immediately after the address phase), pci_frame is negated and pci_irdy is asserted (or kept asserted), indicating the initiator is ready. after the target indicates the final data transfer (by asserting pci_trdy ), the pci bus may return to the idle state (both pci_frame and pci_irdy are negated) unless a fast back-to-back transaction is in progress. in the case of a fast back-to-back transaction, an address phase immediately follows the last data phase. 16.4.2.2 pci bus commands a pci bus command is encoded in pci_c/be [3:0] during the address phase of a pci transaction. the bus command indicates to the target the type of transaction the initiator is requesting. table 16-52 describes the pci bus commands implemented by the MPC8540.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-58 freescale semiconductor pci/pci-x bus interface table 16-52. pci bus commands pci_c/ be [3:0] pci bus command MPC8540 supports as an initiator MPC8540 supports as a target definition 0000 interrupt- acknowledge yes no a read (implicitly addressing the system interrupt controller). only one device on the pci bus should respond to this command; others ignore it. see section 16.4.2.12.1, ?interrupt-acknowledge transactions,? for more information. 0001 special cycle yes no provides a way to broadcast select messages to all devices on the pci bus. see section 16.4.2.12.2, ?special-cycle transactions,? for more information. 0010 i/o-read yes no accesses agents mapped into the pci i/o space. 0011 i/o-write yes no accesses agents mapped into the pci i/o space. 0100 reserved 1 1 reserved command encodings are reserved for future use. the MPC8540 does not respond to these commands. no no ? 0101 reserved 1 no no ? 0110 memory-read yes yes accesses either local memory or agents mapped into pci memory space, depending on the address. when a pci master issues this command to local memory, the MPC8540 (the target) fetches data from the requested address to the end of the cache line (32 bytes) from local memory, even though all of the data may not be requested by (or sent to) the initiator. 0111 memory-write yes yes accesses either local memory or agents mapped into pci memory space, depending on the address. 1000 reserved 1 no no ? 1001 reserved 1 no no ? 1010 configuration- read yes agent mode only access the 256-byte configuration space of a pci agent. a specific agent is selected when its idsel signal is asserted during the address phase. see section 16.4.2.11, ?configuration cycles,? for details. 1011 configuration- write yes agent mode only 1100 memory-read- multiple yes yes similar to the memory-read command, but also causes a prefetch of the next cache line (32 bytes). 1101 dual-address- cycle yes yes used to transfer a 64-bit address (in two 32-bit address cycles) to 64-bit addressable devices. 1110 memory-read- line yes yes indicates that an initiator is requesting the transfer of an entire cache line. this occurs only when the processor is performing a burst read. note that these processors perform burst reads only when the appropriate cache is enabled and the transaction is not cache-inhibited. 1111 memory-write- and-invalidate no yes indicates that an initiator is transferring an entire cache line; if this data is in any cacheable memory, that cache line needs to be invalidated.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-59 16.4.2.3 addressing pci defines three physical address spaces?pci memory space, pci i/o space, and pci configuration space. access to the pci memory and i/o space is straightforward, although one must take into account the local memory access window and address translation being used. the address translation registers are described in section 16.3.1, ?pci/x memory mapped registers.? access to the pci configuration space is described in section 16.4.2.11, ?configuration cycles.? address decoding on the pci bus is performed by every device for every pci transaction. each agent is responsible for decoding its own address. pci supports two types of address decoding?positive decoding and subtractive decoding. for positive decoding, each device looks for accesses in the address range that the device has been assigned. for subtractive decoding, one device on the bus looks for accesses that no other device has claimed. see section 16.4.2.4, ?device selection,? for information about claiming transactions. the information contained in the two low-order address bits (pci_ad[1:0]) varies by the address space (memory, i/o, or configuration). regardless of the encoding scheme, the two low-order address bits are always included in parity calculations. 16.4.2.3.1 memory space addressing for memory accesses, pci defines two types of burst ordering controlled by the two low-order bits of the address?linear incrementing (pci_ad[1:0] = 0b00) and cache wrap mode (pci_ad[1:0] = 0b10), as shown in table 16-53 . the other two pci_ad[1:0] possibilities (0b01 and 0b11) are reserved. as an initiator, the MPC8540 always encodes pci_ad[1:0] = 00 for pci memory space accesses. as a target, the MPC8540 executes a target disconnect after the first data phase completes if pci_ad[1:0] = 01 or pci_ad[1:0] = 0b11 during the address phase of a local memory access. see section 16.4.2.8.2, ?target-initiated termination,? for more information on target disconnect conditions. for linear incrementing mode, the memory address is encoded/decoded using pci_ad[63:2]. thereafter, the address is incremented by 4 bytes after each data phase completes until the transaction is terminated or completed (a 4-byte data width per data phase is implied). note that the two low-order bits on the address bus are included in all parity calculations. table 16-53. supported combinations of pci_ad[1:0] pci_ad[1:0] MPC8540 as target MPC8540 as initiator read write read write 00 linear ??? 01 reserved td td ? ? 10 cache wrap td ? ? 11 reserved td td ? ?
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-60 freescale semiconductor pci/pci-x bus interface for cache wrap mode (pci_ad[1:0] = 0b10) reads, the critical memory address is decoded using pci_ad[63:2]. the address is incremented by 4 bytes after each data phase completes until the end of the cache line is reached. for cache-wrap reads, the address wraps to the beginning of the current cache line and continues incrementing until the entire cache line (32 bytes) is read. the MPC8540 does not support cache-wrap write operations and executes a target disconnect after the data phase for the end of the cache line completes for writes with pci_ad[1:0] = 0b10. that is, the MPC8540 does not wrap back to the beginning of the cache line. note that the two low-order bits on the address bus are included in all parity calculations. 16.4.2.3.2 i/o space addressing for pci i/o accesses, 32 address signals (pci_ad[31:0]) are used to provide a byte address. after a target has claimed an i/o access, it must determine if it can complete the entire access as indicated by the byte enable signals. if all the selected bytes are not in the address range of the target, the entire access cannot complete. in this case, the target does not transfer any data and terminates the transaction with a target-abort error. see section 16.4.2.8.2, ?target-initiated termination,? for more information. 16.4.2.3.3 configuration space addressing pci supports two types of configuration accesses that use different formats for the pci_ad[31:0] signals during the address phase. the two low-order bits of the address indicate the format used for the configuration address phase?type 0 (pci_ad[1:0] = 0b00) or type 1 (pci_ad[1:0] = 0b01). both address formats identify a specific device and a specific configuration register for that device. see section 16.4.2.11, ?configuration cycles,? for descriptions of the two formats. 16.4.2.4 device selection the pci_ devsel signal is driven by the target of the current transaction. pci_ devsel indicates to the other devices on the pci bus that the target has decoded the address and claimed the transaction. pci_ devsel may be driven one, two, or three clock cycles (fast, medium, or slow device select timing) following the address phase. device select timing is encoded into the device?s pci bus status register. if no agent asserts pci_ devsel within three clock cycles of pci_ frame , the agent responsible for subtractive decoding may claim the transaction by asserting pci_ devsel . a target must assert pci_ devsel (claim the transaction) before or coincident with any other target response (assert pci_ trdy , pci_ stop , or data signals). in all cases except target-abort, once a target asserts pci_ devsel , it must not negate pci_ devsel until pci_ frame is negated (with pci_ irdy asserted) and the last data phase has completed. for normal termination, negation of pci_ devsel coincides with the negation of pci_ trdy or pci_ stop .
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-61 if the first access maps into a target?s address range, that target asserts pci_ devsel to claim the access. however, if the initiator attempts to continue the burst access across the resource boundary, then the target must issue a target disconnect. the MPC8540 is hardwired for fast device select timing (pci bus status register [10?9] = 0b00). therefore, when the MPC8540 is the target of a transaction (local memory access or configuration register access), it asserts pci_ devsel one clock cycle following the address phase. as an initiator, if the MPC8540 does not detect the assertion of pci_ devsel within four clock cycles after the address phase (that is, five clock cycles after it asserts pci_ frame ), it terminates the transaction with a master-abort termination; see section 16.4.2.8.1, ?master-initiated termination.? 16.4.2.5 byte alignment the byte enable signals of the pci bus (pci_c/be [7:0], during a data phase) are used to determine which byte lanes carry meaningful data. the byte enable signals may enable different bytes for each of the data phases. the byte enables are valid on the edge of the clock that starts each data phase and stay valid for the entire data phase. note that parity is calculated for all bytes regardless of the state of the byte enable signals. see section 16.4.2.13.1, ?pci parity,? for more information. if the MPC8540, as a target, detects no byte enables asserted, it completes the current data phase with no permanent change. this implies that on a read transaction, the MPC8540 expects that the data is not changed, and on a write transaction, the data is not stored. 16.4.2.6 bus driving and turnaround to avoid contention, a turnaround cycle is required on all signals that may be driven by more than one agent. the turnaround cycle occurs at different times for different signals. the pci_ irdy , pci_ trdy , pci_ devsel , and pci_ stop signals use the address phase as their turnaround cycle. pci_ frame , pci_c/be [7:0], and pci_ad[63:0] signals use the idle cycle between transactions (when both pci_ frame and pci_ irdy are negated) as their turnaround cycle. pci_ perr has a turnaround cycle on the fourth clock cycle after the last data phase. the pci address/data signals, pci_ad[63:0], are driven to a stable condition during every address/data phase. even when the byte enables indicate that byte lanes carry meaningless data, the signals carry stable values. parity is calculated on all bytes regardless of the byte enables. see section 16.4.2.13.1, ?pci parity,? for more information. 16.4.2.7 pci bus transactions this section provides descriptions of the pci bus transactions. all bus transactions follow the protocol as described in section 16.4.2, ?pci bus protocol.? read and write transactions are
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-62 freescale semiconductor pci/pci-x bus interface similar for the memory and i/o spaces, so they are described as generic read transactions and generic write transactions. the timing diagrams in this section show the relationship of significant signals involved in bus transactions. when a signal is drawn as a solid line, it is actively being driven by the current master or target. when a signal is drawn as a dashed line, no agent is actively driving it. high-impedance signals are indicated to have indeterminate values when the dashed line is between the two rails. the terms ?edge? and ?clock edge? always refer to the rising edge of the clock; ?asserted? and ?negated? always refer to the globally visible state of the signal on the clock edge, and not to signal transitions. ? ? represents a turnaround cycle in the timing diagrams. 16.4.2.7.1 pci read transactions this section describes pci single-beat read transactions and pci burst read transactions. a read transaction starts with the address phase, occurring when an initiator asserts pci_ frame . during the address phase, pci_ad[63:0] contains a valid address and pci_c/be [7:0] contains a valid bus command. the first data phase of a read transaction requires a turnaround cycle. this allows the transition from the initiator driving pci_ad[63:0] as address signals to the target driving pci_ad[63:0] as data signals. the turnaround cycle is enforced by the target with the trdy signal. the target provides valid data at the earliest one cycle after the turnaround cycle. the target must drive the pci_ad[63:0] signals when pci_ devsel is asserted. during the data phase, the pci_c/be [7:0] signals indicate which byte lanes are involved in the current data phase. a data phase may consist of a data transfer and wait cycles. the pci_c/be [7:0] signals remain actively driven for both reads and writes from the first clock of the data phase through the end of the transaction. a data phase completes when data is transferred, which occurs when both pci_ irdy and pci_ trdy are asserted on the same clock edge. when either pci_ irdy or pci_ trdy is negated, a wait cycle is inserted and no data is transferred. the initiator indicates the last data phase by negating pci_ frame when pci_ irdy is asserted. the transaction is considered complete when data is transferred in the last data phase.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-63 figure 16-55 illustrates a pci single-beat read transaction. figure 16-55. pci single-beat read transaction figure 16-56 illustrates a pci burst read transaction. figure 16-56. pci burst read transaction 16.4.2.7.2 pci write transactions this section describes pci single-beat write transactions, and pci burst write transactions. a pci write transaction starts with the address phase, occurring when an initiator asserts pci_ frame . a write transaction is similar to a read transaction except no turnaround cycle is needed following the address phase because the initiator provides both address and data. the data phases are the same for both read and write transactions. although not shown in the figures, the initiator must sysclk pci_ frame pci_ irdy pci_ad[63:0] addr pci_ devsel pci_ trdy pci_c/be [7:0] be cmd data sysclk pci_ frame pci_ irdy pci_ad[63:0] addr pci_ devsel pci_ trdy pci_c/be [7:0] be1 data2 data1 cmd be2
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-64 freescale semiconductor pci/pci-x bus interface drive the pci_c/be [7:0] signals, even if the initiator is not ready to provide valid data (pci_ irdy negated). figure 16-57 illustrates a pci single-beat write transaction. figure 16-57. pci single-beat write transaction figure 16-58 illustrates a pci burst write transaction. figure 16-58. pci burst write transaction 16.4.2.8 transaction termination a pci transaction may be terminated by either the initiator or the target. the initiator is ultimately responsible for concluding all transactions, regardless of the cause of the termination. all sysclk pci_ frame pci_ irdy pci_ad[63:0] addr pci_d evsel pci_ trdy pci_c/be [7:0] data cmd be sysclk pci_ frame pci_ irdy pci_ad[63:0] addr pci_ devsel pci_ trdy pci_c/be [7:0] data4 data1 data2 data3 be1 be2 cmd be4 be3
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-65 transactions are concluded when pci_ frame and pci_ irdy are both negated, indicating the bus is idle. 16.4.2.8.1 master-initiated termination normally, a master initiates termination by negating pci_ frame and asserting pci_ irdy . this indicates to the target that the final data phase is in progress. the final data transfer occurs when both pci_ trdy and pci_ irdy are asserted. the transaction is considered complete when data is transferred in the last data phase. after the final data phase, both pci_ frame and pci_ irdy are negated (the bus becomes idle). there are three types of master-initiated termination:  completion?refers to termination when the initiator has concluded its intended transaction. this is the most common reason for termination.  timeout?refers to termination when the initiator loses its bus grant (gnt n is negated), and its internal latency timer has expired. the intended transaction is not necessarily concluded.  master-abort?an abnormal case of master-initiated termination. if no device (including the subtractive decoding agent) asserts pci_ devsel to claim a transaction, the initiator terminates the transaction with a master-abort. for a master-abort termination, the initiator negates pci_ frame and then negates pci_ irdy on the next clock. if a transaction is terminated by master-abort (except for a special-cycle command), the received master-abort bit (bit 13) of the pci bus status register is set. as an initiator, if the MPC8540 does not detect the assertion of pci_ devsel within four clock cycles following the address phase (five clock cycles after asserting pci_ frame ), it terminates the transaction with a master-abort. 16.4.2.8.2 target-initiated termination by asserting pci_ stop , a target may request that the initiator terminate the current transaction. once asserted, the target holds pci_ stop asserted until the initiator negates pci_ frame . data may or may not be transferred during the request for termination. if pci_ trdy and pci_ irdy are asserted during the assertion of pci_ stop , data is transferred. however, if pci_ trdy is negated when pci_ stop is asserted, it indicates that the target will not transfer any more data; therefore, the initiator does not wait for a final data transfer as it would in a completion termination. when a transaction is terminated by pci_ stop , the initiator must negate its req n signal for a minimum of two pci clock cycles, (one corresponding to when the bus goes to the idle state (pci_ frame and pci_ irdy negated)). if the initiator intends to complete the transaction, it can reassert its req n immediately following the two clock cycles. if the initiator does not intend to complete the transaction, it can assert req n whenever it needs to use the pci bus again.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-66 freescale semiconductor pci/pci-x bus interface there are three types of target-initiated termination:  disconnect?refers to termination requested because the target is temporarily unable to continue bursting. disconnect implies that some data has been transferred. the initiator may restart the transaction at a later time starting with the address of the next untransferred data. (that is, data transfer may resume where it left off.)  retry?refers to termination requested because the target is currently in a state where it is unable to process the transaction. retry implies that no data was transferred. the initiator may start the entire transaction over again at a later time. note that the pci local bus specification , rev. 2.2 requires that all retried transactions must be completed.  target-abort?an abnormal case of target-initiated termination. target-abort is used when a fatal error has occurred or when a target can never respond. as a target, the MPC8540 terminates a transaction with a target disconnect due to the following:  it cannot respond within eight pci clock cycles (not including the first data phase).  the transaction is attempting to cross a 4-kbyte boundary.  a single beat of data has been transferred and the inbound atmu is marked non-prefetchable.  the end of a cache line has been transferred for a cache-wrap mode write transaction. see section 16.4.2.3.1, ?memory space addressing.? as a target, the MPC8540 responds to a transaction with a retry due to the following:  the 16-clock latency timer has expired, and the first data phase has not begun.  there is no more internal buffer space available for an inbound transaction. target-abort is indicated by asserting pci_ stop and negating pci_ devsel . this indicates that the target requires termination of the transaction and does not want the transaction retried. if a transaction is terminated by target-abort, the received target-abort bit (bit 12) of the initiator?s bus status register and the signaled target-abort bit (bit 11) of the target?s bus status register are set. note that any data transferred in a target-aborted transaction may be corrupt. for pci writes to local memory, if an address parity error or data parity error occurs, the MPC8540 aborts the transaction internally, but continues the transaction on the pci bus.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-67 figure 16-59 shows several target-initiated terminations. figure 16-59. pci target-initiated terminations sysclk pci_ frame pci_ irdy pci_ devsel pci_ trdy pci_ stop sysclk pci_ frame pci_ irdy pci_ devsel pci_ trdy pci_ stop sysclk pci_ frame pci_ irdy pci_ devsel pci_ trdy pci_ stop sysclk pci_ frame pci_ irdy pci_ devsel pci_ trdy pci_ stop sysclk pci_ frame pci_ irdy pci_ devsel pci_ trdy pci_ stop disconnect a disconnect b retry disconnect without data target abort
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-68 freescale semiconductor pci/pci-x bus interface the three disconnect terminations are unique in the data transferred at the end of the transaction. for disconnect a, the initiator is negating pci_irdy when the target asserts pci_stop and data is transferred only at the end of the current data phase. for disconnect b, the target negates pci_trdy one clock after it asserts pci_stop , indicating that the target can accept the current data, but no more data can be transferred. for disconnect-without-data, the target asserts pci_stop when pci_trdy is negated indicating that the target cannot accept any more data. 16.4.2.9 fast back-to-back transactions the pci bus allows fast back-to-back transactions by the same master. during a fast back-to-back transaction, the initiator starts the next transaction immediately without an idle state. the last data phase completes when pci_frame is negated, and pci_irdy and pci_trdy are asserted. the current master starts another transaction in the clock cycle immediately following the last data transfer for the previous transaction. fast back-to-back transactions must avoid contention on the pci_trdy , pci_devsel , pci_perr , and pci_stop signals. there are two types of fast back-to-back transactions?those that access the same target and those that access multiple targets sequentially. the first type places the burden of avoiding contention on the initiator; the second type places the burden of avoiding contention on all potential targets. as an initiator, the MPC8540 does not perform any fast back-to-back transactions. as a target, the MPC8540 supports both types of fast back-to-back transactions. during fast back-to-back transactions, the MPC8540 monitors the bus states to determine if it is the target of a transaction. if the previous transaction was not directed to the MPC8540 and the current transaction is directed at the MPC8540, it delays the assertion of pci_devsel (as well as pci_trdy , pci_stop , and pci_perr ) for one clock cycle to allow the other target to stop driving the bus. 16.4.2.10 dual address cycles the MPC8540 supports dual address cycle (dac) commands (64-bit addressing on pci bus) as both an initiator and a target. dacs are different from single address cycles (sacs) in that the address phase takes two pci beats instead of one pci beat to transfer (64-bit vs. 32-bit addressing). only pci memory commands can use dac cycles; i/o, configuration, interrupt acknowledge, and special cycle command cannot use dac cycles. the MPC8540 block supports single-beat and burst dac transactions. for the case of the local processor, dac generation depends on the setting of the potearx. if the potearx are programmed with nonzero values and a transaction from the local processor core hits in one of the outbound windows, a dac transaction is generated on the pci bus with the translated lower 32-bit addresses. refer to section 16.3.1.2, ?pci/x atmu outbound registers,? for more information.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-69 figure 16-60 shows the timing sequence of the pci signals for single-beat dac reads. figure 16-60. dac single-beat read example the timing for a dac burst read is shown in figure 16-61 . figure 16-61. dac burst read example figure 16-62 and figure 16-63 show single-beat dac writes and burst dac writes. figure 16-62. dac single-beat write example pci_clk pci_frame pci_irdy pci_devsel pci_c/be [3:0] pci_ad[31:0] pci_trdy lo-addr data be t/a t/a t/a hi-addr cmd 0x0d pci_clk data2 be1 t/a t/a data1 be2 cmd 0x0d pci_frame pci_irdy pci_devsel pci_c/be [3:0] pci_ad[31:0] pci_trdy lo-addr hi-addr t/a pci_clk be data cmd pci_frame pci_irdy pci_devsel pci_c/be [3:0] pci_ad[31:0] pci_trdy lo-addr hi-addr t/a t/a 0x0d
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-70 freescale semiconductor pci/pci-x bus interface figure 16-63. dac burst write example figure 16-64 shows the timing sequence of the pci signals for 64-bit dac reads. figure 16-64. 64-bit dual address read cycle 16.4.2.11 configuration cycles this section describes pci configuration cycles used for configuring standard pci devices. the pci configuration space of any device is intended for configuration, initialization, and catastrophic error-handling functions only. access to the pci configuration space should be limited to initialization and error-handling software. pci_clk t/a t/a data1 data2 data3 data4 be1 be2 be4 cmd pci_frame pci_irdy pci_devsel pci_c/be [3:0] pci_ad[31:0] pci_trdy be3 lo-addr hi-addr 0x0d pci_clk pci_frame pci_ad[31:0] pci_c/be [3:0] pci_irdy pci_trdy 123456789 pci_devsel lo-addr hi-addr dual ad bus cmd be [3:0] pci_ad[63:32] hi-addr data1 data3(2) data2 data4 bus cmd be [7:4] pci_c/be [7:4] (optional) address phase data phase data phase data transfer wait data transfer wait fms
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-71 16.4.2.11.1 pci configuration space header figure 16-65 shows the predefined header for all pci devices. figure 16-65. standard pci configuration header the first 64 bytes of the 256-byte configuration space consists of a predefined header that every pci device must support. the first 16 bytes of the predefined header are defined the same for all pci devices; the remaining 48 bytes of the header may have differing layouts depending on the function of the device. most pci devices use the configuration header layout shown in figure 16-65 . the rest of the 256-byte configuration space is device-specific. the pci header specific to the MPC8540 is described in section 16.3.2, ?pci/x configuration header .? table 16-54 summarizes the configuration header registers. detailed descriptions of these registers are provided in the pci local bus specification, rev. 2.2. device id vendor id status command class code revision id bist latency timer header type cache line size max_lat interrupt pin min_gnt interrupt line 0x00 0x04 0x08 0x3c address offset 0x2c 0x14 0x18 0x1c 0x20 0x24 0x28 0x30 0x34 0x38 0x10 0x0c expansion rom base address reserved reserved reserved base address registers subsystem id subsystem vendor id
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-72 freescale semiconductor pci/pci-x bus interface 16.4.2.11.2 accessing the pci configuration space in host mode to access the configuration space, a 32-bit value must be written to the pci cfg_addr register that specifies the target pci bus, the target device on that bus, and the configuration register to be accessed within that device. note that the bus master bit in the MPC8540?s pci bus command register must be set before an outbound configuration access is attempted. device 0 on pci/x bus 0 is the MPC8540 itself; thus, device 0, bus 0 is used to access the internal pci/x configuration header. table 16-54. pci configuration space header summary offset register name description 0x00 vendor id identifies the manufacturer of the device (assigned by the pci sig (special-interest group) to ensure uniqueness). 0x02 device id identifies the particular device (assigned by the vendor). 0x04 command provides coarse control over a device?s ability to generate and respond to pci bus cycles 0x06 status records status information for pci bus-related events 0x08 revision id specifies a device-specific revision code (assigned by vendor) 0x09 class code identifies the generic function of the device and (in some cases) a specific register-level programming interface 0x0c cache line size specifies the system cache line size in 32-bit units 0x0d latency timer specifies the value of the latency timer in pci bus clock units for the device when acting as an initiator 0x0e header type bits 0?6 identify the layout of bytes 0x10?0x3f; bit 7 indicates a multifunction device. the most common header type (0x00) is shown in figure 16-65 and in this table. 0x0f bist optional register for control and status of built-in self test (bist) 0x10?0x27 base address registers address mapping information for memory and i/o space 0x28 ? reserved for future use 0x2c subsystem vendor id identifies the subsystem vendor id (read-only for MPC8540) 0x2e subsystem id identifies the subsystem id (read-only for MPC8540) 0x30 expansion rom base address base address and size information for expansion rom contained in an add-on board 0x34, 0x38 ? reserved for future use 0x3c interrupt line contains interrupt line routing information 0x3d interrupt pin indicates which interrupt pin the device (or function) uses 0x3e min_gnt specifies the length of the device?s burst period in 0.25-s units 0x3f max_lat specifies how often the device needs access to the bus in 0.25-s units
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-73 when the MPC8540 detects an access to pci cfg_data, it checks the enable flag and the device number in the pci cfg_addr register. if the enable bit is set, and the device number is not 0b1_ 1111, the mpc 8540 performs a configuration cycle translation function and runs a configuration-read or configuration-write transaction on the pci bus. if the bus number corresponds to the local pci bus (bus number = 0x00), the MPC8540 performs a type 0 configuration cycle translation. if the bus number indicates a remote pci bus (that is, nonlocal), the MPC8540 performs a type 1 configuration cycle translation. the device number 0b1_ 1111 is used for performing interrupt-acknowledge and special-cycle transactions. see section 16.4.2.12, ?other bus transactions,? for more information. see section 16.3.1.1.1, ?pci/x configuration address register (cfg_addr),? for details on pci cfg_addr and section 16.3.1.1.2, ?pci/x configuration data register (cfg_data),? for details on pci cfg_data. note that because all pci/x registers are intrinsically little-endian, in the following examples, the data in the configuration register is shown in little-endian order. powerpc processor accesses to the pci cfg_data register should use the load/store with byte-reversed instructions. external pci masters that use the local address map to access configuration space do not need to reverse bytes since byte lane redirection from the little-endian pci bus is performed internally. example: configuration sequence, 4-byte data read from the revision id/standard programming interface/subclass code/class code registers at address offset 0x08 of the pci/x configuration header (device 0 on the pci/x bus 0 is the MPC8540 itself). initial values: r0 contains 0x8000_0008 r1 contains ccsrbar + 0x0_8000 (address of pci cfg_addr register) r2 contains ccsrbar + 0x0_8004 (address of pci cfg_data register) r3 contains 0xffff_ffff register at 0x08 contains 0x0b20_0002 (0x0b to 0x08) code sequence: stw r0, 0 (r1) lwbrx r3, 0 (r2) results: address ccsrbar + 0x0_8000 contains 0x8000_0008 register r3 contains 0x0b20_0002 example: configuration sequence, 4-byte data write to pci/x register at address offset 0x14 of device 1 on pci/x bus 0. initial values: r0 contains 0x8000_0814 r1 contains ccsrbar + 0x0_8000 (address of pci cfg_addr register) r2 contains ccsrbar + 0x0_8004 (address of pci cfg_data register) r3 contains 0x1122_3344 register at 0x14 contains 0xffff_ffff (0x17 to 0x14)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-74 freescale semiconductor pci/pci-x bus interface code sequence: stw r0, 0 (r1) // update pci cfg_addr register to point to //register offset 0x14 of device 1. stwbrx r3, 0 (r2) results: address ccsrbar + 0x0_8000 contains 0x8000_0814 register at 0x14 contains 0x1122_3344 (0x17 to 0x14) example: configuration sequence, 2-byte data write to pci register at address offset 0x1c of device 1 on pci/x bus 0. initial values: r0 contains 0x8000_081c r1 contains ccsrbar + 0x0_8000 r2 contains ccsrbar + 0x0_8004 r3 contains 0xddcc_bbaa register at 0x1c contains 0xffff_ffff (0x1f to 0x1c) code sequence: stw r0, 0 (r1) sthbrx r3, 0 (r2) results: address ccsrbar + 0x0_8000 contains 0x8000_081c register at 0x1c contains 0xffff_bbaa (0x1f to 0x1c) 16.4.2.11.3 pci configuration in agent and agent lock modes in general, agents should not access the configuration space of other external pci devices. configuration of agents is a function usually reserved for the host. when the MPC8540 is in agent mode, it responds to remote host-generated pci/x configuration cycles. this occurs when a configuration command is decoded along with the idsel input signal being asserted. when the MPC8540 is in agent lock mode, it retries all externally-generated pci/x configuration cycles until the acl bit in the pci bus function register (0x44) is set. see section 16.5.1, ?power-on reset configuration modes ,? for more information. in either agent or agent lock mode, access to the internal pci/x configuration header by the processor core is handled as described in section 16.4.2.11.2, ?accessing the pci configuration space in host mode ,? using device = 0 and bus = 0 in pci cfg_addr to indicate the internal pci/x header. 16.4.2.11.4 pci type 0 configuration translation figure 16-66 shows the pci type 0 translation function performed on the contents of the pci cfg_addr register to the pci_ad[31:0] signals on the pci bus during the address phase of the configuration cycle.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-75 figure 16-66. pci type 0 configuration translation for pci type 0 configuration cycles, the MPC8540 translates the device number field of the pci cfg_addr register into a unique idsel signal for up to 21 different devices. each device connects its idsel input to one of the pci_ad[31:11] signals. for pci type 0 configuration cycles, the MPC8540 translates the device number to ad n as shown in table 16-55 . table 16-55. pci type 0 configuration?device number to ad n translation device number ad n used for iidsel device number ad n used for iidsel binary decimal binary decimal 0b0_0000?0b0_1001 0?9 ? 0b1_0101 21 ad21 0b0_1010 10 ad31 0b1_0110 22 ad22 0b0_1011 11 ad11 0b1_0111 23 ad23 0b0_1100 12 ad12 0b1_1000 24 ad24 0b0_1101 13 ad13 0b1_1001 25 ad25 0b0_1110 14 ad14 0b1_1010 26 ad26 0b0_ 1111 15 ad15 0b1_1011 27 ad27 0b1_0000 16 ad16 0b1_1100 28 ad28 0b1_0001 17 ad17 0b1_1101 29 ad29 0b1_0010 18 ad18 0b1_1110 30 ad30 0b1_0011 19 ad19 0b1_ 1111 1 31 ? 0b1_0100 20 ad20 1 a device number of all ones indicates a pci special-cycle or interrupt-acknowledge transaction. 0 1 7 8 15 16 20 21 23 24 29 30 3 1 bus number 000_0000 reserved device number function number register number e 00 31 11 10 2 1 0 idsel?only one signal high function/register number 00 contents of pci cfg_addr register pci_ad[31:0] signals during address phase see table 16-55
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-76 freescale semiconductor pci/pci-x bus interface for pci type 0 translations, the function number and register number fields are copied without modification onto the pci_ad[10:2] signals during the address phase. the pci_ad[1:0] signals are driven to 0b00 during the address phase for type 0 configuration cycles. the MPC8540 implements address stepping on configuration cycles so that the target?s idsel, which is connected directly to one of the pci_ad lines, reaches a stable value. this means that a valid address and command are driven on pci_ad[31:0] and pci_c/be [3:0] one clock cycle before the assertion of pci_frame . 16.4.2.11.5 type 1 configuration translation for type 1 translations, the MPC8540 copies the 30 high-order bits of the pci cfg_addr register (without modification) onto the pci_ad[31:2] signals during the address phase. the MPC8540 automatically translates pci_ad[1:0] into 0b01 during the address phase to indicate a type 1 configuration cycle. 16.4.2.12 other bus transactions there are two other pci transactions that the MPC8540 supports?interrupt acknowledge and special cycles. as an initiator, the MPC8540 may initiate both interrupt acknowledge and special-cycle transactions; however, as a target, the MPC8540 ignores interrupt-acknowledge and special-cycle transactions. both transactions make use of the pci cfg_addr and pci cfg_data registers described in section 16.4.2.11.3, ?pci configuration in agent and agent lock modes.? 16.4.2.12.1interrupt-acknowledge transactions the pci bus supports an interrupt-acknowledge transaction. the interrupt-acknowledge command is a read operation implicitly addressed to the system interrupt controller. note that the pci interrupt-acknowledge command does not address the MPC8540 pic processor interrupt-acknowledge register and does not return the interrupt vector address from the pic unit. see chapter 10, ?programmable interrupt controller,? for more information about the pic unit. when the MPC8540 detects a read to pci cfg_data, it checks the enable flag and the device number in pci cfg_addr. if the enable bit is set, the bus number corresponds to the local pci bus (bus number = 0x00), the device number is all ones (0b1_1111), the function number is all ones (0b111), and the register number is zero (0b00_0000), then the MPC8540 performs an interrupt-acknowledge transaction. if the bus number indicates a nonlocal pci bus, the MPC8540 performs a type 1 configuration cycle translation, similar to any other configuration cycle for which the bus number does not match. the address phase contains no valid information other than the interrupt-acknowledge command (pci_c/be [3:0] = 0b0000). although there is no explicit address, pci_ad[63:0] are driven to a stable state, and parity is generated. only one device (the system interrupt controller) on the pci bus should respond to the interrupt-acknowledge command by asserting pci_devsel . all other
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-77 devices on the bus should ignore the interrupt-acknowledge command. as stated previously, the MPC8540 pic unit does not respond to pci interrupt-acknowledge commands. during the data phase, the responding device returns the interrupt vector on pci_ad[63:0] when pci_ trdy is asserted. the size of the interrupt vector returned is indicated by the value driven on pci_c/be [7:0]. the MPC8540 also can generate pci interrupt-acknowledge transactions directly. reads from pci int_ack at offset 0x0_8008 generate pci interrupt-acknowledge transactions. note that processor writes to these addresses do nothing. 16.4.2.12.2special-cycle transactions the special-cycle command provides a mechanism to broadcast select messages to all devices on the pci bus. the special-cycle command contains no explicit destination address but is broadcast to all pci agents. when the MPC8540 detects a write to pci cfg_data, it checks the enable flag and the device number in pci cfg_addr. if the enable bit is set, the bus number corresponds to the local pci bus (bus number = 0x00), the device number is all ones (0b1_1111), the function number is all ones (0b111), and the register number is zero (0b00_0000), then the MPC8540 performs a special-cycle transaction on the local pci bus. if the bus number indicates a nonlocal pci bus, the MPC8540 performs a type 1 configuration cycle translation, similar to other configuration cycles for which the bus number does not match. aside from the special-cycle command (pci_c/be [3:0] = 0b0001) the address phase contains no other valid information. although there is no explicit address, pci_ad[63:0] are driven to a stable state, and parity is generated. during the data phase, pci_ad[63:0] contain the special-cycle message and an optional data field. the special-cycle message is encoded on the 16 least-significant bits (pci_ad[15:0]); the optional data field is encoded on the most-significant 16 lines (pci_ad[31:16]). the special-cycle message encodings are assigned by the pci sig steering committee. the current list of defined encodings are provided in table 16-56 . note that the MPC8540 does not automatically issue a special-cycle message when it enters any of its power-saving modes. it is the responsibility of software to issue the appropriate special-cycle message, if needed. table 16-56. special-cycle message encodings pci_ad[15:0] message 0x0000 shutdown 0x0001 halt 0x0002 x86 architecture-specific 0x0003?0xffff ?
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-78 freescale semiconductor pci/pci-x bus interface each receiving agent must determine whether the special-cycle message is applicable to itself. it is unnecessary to assert pci_ devsel in response to a special-cycle command. the initiator of the special-cycle transaction can insert wait states, but because there is no specific target, the special-cycle message and optional data field are valid on the first clock pci_ irdy is asserted. all special-cycle transactions are terminated by master-abort; however, the master-abort bit in the initiator?s bus status register is not set for special-cycle terminations. 16.4.2.13 pci error functions pci provides for parity and other system errors to be detected and reported. this section describes generation and detection of parity and error reporting for the pci bus. 16.4.2.13.1pci parity generating parity is not optional; it must be performed by all pci-compliant devices. all pci transactions, regardless of type, calculate even parity; that is, the number of ones on the pci_ad[31:0], pci_c/be [3:0], and pci_par signals all sum to an even number and the number of ones on the pci_ad[63:33], pci_c/be [7:4], and pci_par64 signals all sum to an even number. parity provides a way to determine, on each transaction, if the initiator successfully addressed the target and transferred valid data. the pci_c/be [7:4] and pci_c/be [3:0] signals are included in the parity calculation to ensure that the correct bus command is performed (during the address phase) and correct data is transferred (during the data phase). the agent responsible for driving the bus must also drive even parity on the par and pci_par64 signals one clock cycle after a valid address phase or valid data transfer, as shown in figure 16-67 . during the address and data phases, parity covers all 64 address/data signals and 8 command/byte enable signals, regardless of whether all lines carry meaningful information. byte lanes not actually transferring data must contain stable (albeit meaningless) data and are included in parity calculation. during configuration, special-cycle, or interrupt-acknowledge commands, some address lines are not defined, but are driven to stable values and are included in parity calculation.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-79 figure 16-67. pci parity operation 16.4.2.13.2error reporting pci provides for the detection and signaling of both parity and other system errors. two signals are used to report these errors?pci_perr and pci_serr . the pci_perr signal is used exclusively to report data parity errors on all transactions except special cycles. the pci_serr signal is used for other error signaling including address parity errors and data parity errors on special-cycle transactions; it may also be used to signal other system errors. note that some errors are enabled by programming two bits?one in the pci bus command register and another in the pci/x error enable register (err_en). likewise, some errors are reported in two bits?one in the pci bus status register and another in the pci/x error detect register (err_dr). these bits must be cleared separately; that is, clearing one does not clear the other. for example, clearing the err_dr[mstr abort error] does not clear the received master abort bit in the pci bus status register. in these cases, both bits must be cleared before further error reporting can occur. table 16-57 shows the actions taken for each kind of error. sysclk pci_par, pci_par64 pci_ frame pci_ad[63:0] addr pci_ irdy pci_ devsel pci_c/be [7:0] data be be pci_ trdy pci_ perr pci_ serr cmd data addr cmd
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-80 freescale semiconductor pci/pci-x bus interface table 16-57. pci mode error actions pci error type error detect register bit pci bus status register bit comment pci outbound read received serr at any phase rcvd serr error ? no data transferred received parity error for data phase mstr perr error detected parity error, master data parity error detected no data transferred master abort mstr abort error received master abort no data transferred target abort trgt abort error received target abort no data transferred memory space violation ormsv error ? no data transferred. only 8 bytes are requested in pci bus pci outbound write received serr related to address phase rcvd serr error ? may float ad bus to avoid contention received serr related to data phase rcvd serr error ? received perr (data phase) mstr perr error master data parity error detected master abort mstr abort error received master abort target abort trgt abort error received target abort memory space violation owmsv error ? only 8 bytes transferred. pci inbound read detected parity error for address phase addr parity error detected parity error, signaled system error float ad bus detected parity error on upper address bus for address phase (sac or dac) ? ? no par64 check during address phase received serr at any phase rcvd serr error ? received perr (data phase) trgt perr error ? internal error trgt abort error signaled target abort pci inbound write detected parity error for address phase addr parity error detected parity error, signaled system error cache line purged detected parity error on upper address bus for address phase (sac or dac) ? ? no par64 check during address phase
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-81 16.4.3 pci-x bus protocol the pci-x bus protocol is an enhancement of the pci bus protocol that features a backward-compatible, higher-bandwidth, 32- or 64-bit multiplexed address/data bus at frequencies up to 133 mhz. the most significant of these enhancements are the following:  slightly different command types define burst and dword transaction types  a new attribute phase for each transaction provides more information about the transaction including a byte count, sequence id, and handling instructions (for ordering and cacheability)  restricted wait state and disconnection rules  a new split transaction, consisting of a split response termination and one or more split completions, replaces the delayed transaction functionality from the pci bus protocol. the following sections describe the new functionality of the pci-x bus protocol. 16.4.3.1 pci-x terminology the pci-x addendum to the pci local bus specification introduces terminology that is helpful when describing aspects of the protocol. this terminology is introduced in context in the following sections. however, three terms that are important to keep in mind throughout these sections are defined as follows: sequence a sequence is one or more transactions associated with carrying out a single logical transfer by a requester. each transaction in the same sequence carries the same unique sequence id. requester a requester is an initiator that first introduces a transaction into the pci-x domain.if a transaction is terminated with a split response, the requester becomes the target of the subsequent split completion. completer a completer is the device addressed by a transaction (other than a split completion transaction). if a target terminates a transaction with a split response, the completer becomes the initiator of the subsequent split completion. received serr at any phase rcvd serr error ? detected parity error for data phase trgt perr error detected parity error cache line purged table 16-57. pci mode error actions (continued) pci error type error detect register bit pci bus status register bit comment
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-82 freescale semiconductor pci/pci-x bus interface 16.4.3.2 pci-x command encodings the pci-x protocol uses a slightly different set of command encodings for pci_c/be [3:0] during the address phase of a pci-x transaction. the bus command indicates to the target the type of transaction the initiator is requesting. table 16-52 describes the pci-x bus commands implemented by the MPC8540. table 16-58. pci-x command encodings pci_c/ be [3:0] pci -x bus command length/ byte-enable usage MPC8540 supports as initiator MPC8540 supports as target definition 0000 interrupt- acknowledge 4 bytes/ attribute yes no this command is a read (implicitly addressing the system interrupt controller). only one device on the pci bus should respond to this command; other devices ignore it. see section 16.4.2.12.1, ?interrupt-acknowledge transactions.? 0001 special cycle 4 bytes/ attribute yes no provides a way to broadcast select messages to all devices on the pci bus. see section 16.4.2.12.2, ?special-cycle transactions,? for more information. 0010 i/o-read 4 bytes/ attribute yes no accesses agents mapped into the pci i/o space. 0011 i/o-write 4 bytes/ attribute yes no accesses agents mapped into the pci i/o space. 0100 reserved 1 ???? 0101 reserved 1 ???? 0110 memory-read- dword 4 bytes/ attribute yes yes accesses 4-bytes in either local memory or agents mapped into pci memory space, depending on the address. 0111 memory-write burst/ data phase yes yes accesses either local memory or agents mapped into pci memory space, depending on the address. 1000 reserved. (aliased to memory-read- block) burst/ none no aliased reserved for use in future revisions of the pci-x specification. current targets must treat this command as if it were a a memory-read-block. 1001 reserved. (aliased to memory-write- block) burst/ none no aliased reserved for use in future revisions of the pci-x specification. current targets must treat this command as if it were a a memory-write-block. 1010 configuration- read 4 bytes/ attribute yes agent mode only accesses the configuration space of a pci-x agent. see section 16.4.3.7, ?pci-x configuration transactions,? for more detail on pci-x configuration cycles. 1011 configuration- write 4 bytes/ attribute yes agent mode only accesses the configuration space of a pci-x agent. see section 16.4.3.7, ?pci-x configuration transactions,? for more detail on pci-x configuration cycles.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-83 16.4.3.3 pci-x attribute phase pci-x defines a new attribute phase that occurs one clock cycle after the address phase. during the attribute phase, a specially encoded attribute is driven by the initiator on pci_c/be [3:0] and ad[31:0]. pci_c/be [3:0] provide either the upper four bits of the byte count for burst transactions or byte enables for dword transactions. figure 16-68 shows pci_ad[31:0] attributes for burst and dword transactions. the attributes for split completion transactions are described in section 16.4.3.6, ?pci-x split transactions,? and the attributes for pci-x configuration transactions are described in section 16.4.3.7, ?pci-x configuration transactions.? figure 16-68. ad[31:0] during pci-x burst/dword attribute phase 1100 split- completion burst/ none yes (as completer) ye s (as requester) similar to the memory-write command, but the transaction is associated with a previous read or write transaction that was terminated with a split response. 1101 dual-address- cycle ? yes yes indicates the transfer a 64-bit address (in two 32-bit address cycles) to 64-bit addressable devices. the actual transaction command is transfered either on pci_c/be [3:0] in the second address phase for a 32-bit bus or on pci_c/be [7:4] for a 64-bit bus. 1110 memory-read- block burst/ none yes yes indicates that an initiator is requesting the transfer of a block of data. 1111 m em ory-write- block burst/ none yes yes indicates that an initiator is transferring a block of data. 1 reserved command encodings are reserved for future use. the MPC8540 does not respond to these commands. 0 ns ro tag requester bus number 31 30 29 28 24 23 16 requester device number requester function number lower byte count (reserved for dword transactions) 15 11 10 8 7 0 table 16-58. pci-x command encodings (continued) pci_c/ be [3:0] pci -x bus command length/ byte-enable usage MPC8540 supports as initiator MPC8540 supports as target definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-84 freescale semiconductor pci/pci-x bus interface table 16-59 describes the fields of the attribute for burst and dword transactions. 16.4.3.4 pci-x transactions figure 16-69 shows a typical pci-x write transaction. to highlight some of the difference with the pci protocol, compare this to the pci write transaction shown in figure 16-58 . table 16-59. burst/dword transaction attribute summary ad name description 31 ? reserved. must be 0 30 ns no snoop. this attribute indicates whether the sequence should be snooped for coherency. 0 the requester cannot guarantee that the locations between the starting and ending address, inclusive, of this sequence are not stored in any cache in the system. thus, all potentially affected caches should be snooped. 1 the requester guarantees that the locations between the starting and ending address, inclusive, of this sequence are not stored in any cache in the system. thus, snooping is not necessary. 29 ro relaxed ordering. this attribute indicates whether the requester requires a transaction to be strictly ordered. in general, devices set the ro attribute for payload sequences and clear the ro attribute for control and status sequences. refer to the pci-x addendum to the pci bus specification for a complete discussion of usage models for relaxed transaction ordering. 0 the requester requires that the transaction remain in strict order. 1 the requester guarantees that the transaction is not required to remain in strict order. 28:24 tag the tag attribute identifies up to 32 unique sequences from a single initiator. tag is also a component of the sequence id. 23:16 requester bus number the requester bus number attribute is supplied by the bus number field in the pci-x status register. the requester bus number is also a component of the sequence id. 15:11 requester device number the requester device number attribute is supplied by the device number field in the pci-x status register. the requester bus number is also a component of the sequence id. 10:8 requester function number the requester function number attribute is supplied by the function number field in the pci-x status register. the requester bus number is also a component of the sequence id. 7:0 lower byte count for a burst transaction attribute phase, pci_c/be [3:0] is concatenated with ad[7:0] to create a 12-bit byte count. the byte count indicates the number of bytes the initiator plans to transfer in the remainder of the sequence. for dword transactions, the transaction has an implicit size of up to 4-bytes. therefore, for dword transactions, there is no byte count and ad[7:0] is reserved. pci_c/be [3:0] contain the individual byte enables for dword transactions.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-85 figure 16-69. typical pci-x write transaction figure 16-70 shows a the following burst write transactions: memory write, memory write block, and split completion transactions. signals preceded by ?s1_? indicate a signal that is internal to the device after the signal has been sampled. for the memory write block and split completion transactions the pci_c/be [7:0] signals are driven high by the initiator on every data phase. note that there are no target initial wait states for this example. data transfer pci_clk pci_ad pci_irdy pci_trdy 12345678910111213 pci_devsel addr bus transaction attr data0 data1 data2 data3 data4 data5 pci_c/be cmd attr be0 be1 be2 be3 be4 be5 pci_frame initiator termination around turn data phase data phase data phase data phase data phase data phase target response phase attribute phase address phase
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-86 freescale semiconductor pci/pci-x bus interface figure 16-70. burst memory write transaction figure 16-71 shows a memory read block transaction. signals preceded by ?s1_? indicate a signal that is internal to the device after the signal has been sampled. note that there are no target initial wait states for this example. data transfer target?s view of the pci bus s1_frame s1_ad s1_c/be s1_irdy pci_trdy pci_devsel addr attr data0 data1 data2 data3 data4 data5 data6 data7 attr be0 be1 be2 be3 be4 be5 be6 be7 pci bus pci_clk pci_frame pci_ad pci_c/be pci_irdy pci_trdy 1234567891011121314 pci_devsel 15 addr attr data0 data1 data2 data3 data4 data5 data6 data7 attr be0 be1 be2 be3 be4 be5 be6 be7 cmd decode speed a bus transaction initiator signals termination 2 clocks before end of transaction initiator?s view of the pci bus pci_frame pci_ad pci_c/be pci_irdy s1_trdy s1_devsel addr attr data0 data1 data2 data3 data4 data5 data6 data7 attr be0 be1 be2 be3 be4 be5 be6 be7 cmd cmd
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-87 figure 16-71. memory read block transaction figure 16-72 shows a dword write transaction such as an i/o write. note that there are no target initial wait states for this example. be = ffh be = ffh target?s view of the pci bus s1_frame s1_ad s1_c/be s1_irdy pci_trdy pci_devsel addr attr attr pci bus pci_clk pci_frame pci_ad pci_c/be pci_irdy pci_trdy 1234567891011121314 pci_devsel 15 addr attr data0 data1 data2 data3 data4 data5 data6 data7 attr cmd decode speed a bus transaction initiator signals termination 2 clocks before end of transaction initiator?s view of the pci bus pci_frame pci_ad pci_c/be pci_irdy s1_trdy s1_devsel addr attr attr cmd cmd pci_ad data0 data1 data2 data3 data4 data5 data6 data7 s1_ad data0 data1 data2 data3 data4 data5 data6 data7 data transfer
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-88 freescale semiconductor pci/pci-x bus interface figure 16-72. dword (4-byte) write transaction figure 16-73 shows a dword read transaction that can be used for a memory read dword or an i/o read transaction. this example has two target initial wait states before data is transfered. figure 16-73. dword (4-byte) read transaction 16.4.3.5 pci-x wait state and termination rules pci-x adds the following restrictions to wait state and disconnect rules:  initiators are not permitted to insert wait states.  targets are not permitted to insert wait states after the initial data phase; that is, targets are only allowed to insert wait states on the initial data phase. be = fh pci_clk pci_frame pci_ad[31:0] pci_c/be [3:0] pci_irdy pci_trdy 12345678910 pci_devsel addr attr cmd attr data0 pci_clk pci_frame pci_ad[31:0] pci_c/be [3:0] pci_irdy pci_trdy 123456789101112 pci_devsel addr attr attr cmd data0 be = fh
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-89  initiators and targets can end burst transactions as follows: ? after a burst data transfer starts and the target signals it can accept more than one data phase, the transaction can only be stopped in one of the following ways: ? target or initiator disconnect at an allowable disconnect boundary (adb). an adb is a naturally-aligned, 128-byte address; that is, an address whose lower 7 bits are zeros. ? the transaction byte count is satisfied ? target abort ? burst transactions can start on any byte address. both the initiator and the target can disconnect on any adb. a target is also permitted to disconnect a burst transaction after a single data phase. in pci-x mode, the MPC8540 always terminates an inbound write transaction with a target-disconnect at the adb. also in pci-x mode, in addition to the target-retry conditions listed in section 16.4.2.8.2, ?target-initiated termination,? the MPC8540 may retry a subsequent inbound transaction if a previous outbound read transaction was terminated by a master-abort, a split-completion error message, or a target-abort. 16.4.3.6 pci-x split transactions the basic sequence for a split transaction is as follows: 1. the initiator (requester) requests the bus and the arbiter grants the bus to the requester. 2. the requester initiates a transaction (other than a split completion). 3. the target (completer) communicates its intent to split the transaction by using a split response termination. 4. the completer requests the bus and the arbiter grants the bus to the completer 5. the completer initiates a split completion transaction. split completions are routed back to original requester across bridges by using requester?s bus, device and function numbers in the split completion address. 16.4.3.6.1 split response figure 16-74 shows a split response to a read transaction. note that the read could be either a memory read block or a memory read dword transaction.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-90 freescale semiconductor pci/pci-x bus interface figure 16-74. split response to a read transaction figure 16-74 shows a split response to a write transaction. figure 16-75. split response to a dword (4-byte) write transaction 16.4.3.6.2 completion address figure 16-76 shows how ad[31:0] are driven during the address phase for split completion transactions. ffffffffh be = fh pci_clk pci_frame pci_ad pci_c/be pci_irdy pci_trdy 12345678910 pci_stop addr attr cmd attr pci_devsel be = fh pci_clk pci_frame pci_ad[31:0] pci_c/be [3:0] pci_irdy pci_trdy 12345678910 pci_stop addr attr cmd attr pci_devsel data0
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-91 figure 16-76. split completion transaction address ad[31:0] table 16-60 describes the fields of the attribute for burst and dword transactions. 16.4.3.6.3 completer attributes pci-x split completion transactions include an attribute phase one clock cycle after the address phase. the completer attribute for a split completion transaction is similar to the burst transaction attribute. for the split completion attribute, pci_c/be [3:0] provide the four msbs of the byte count and ad[31:0] are driven as shown in figure 16-77 . 00 ro tag requester bus number 31 30 29 28 24 23 16 requester device number requester function number 0 lower address [6?0] 15 11 10 8 7 6 0 table 16-60. split completion transaction address ad name description 31:30 ? reserved. must be 00. 29 ro relaxed ordering. the completer copies this field from the ro field of the requester attributes. bridges optionally use this to influence transaction ordering. 0 the requester requires that the transaction remain in strict order. 1 the requester guarantees that the transaction is not required to remain in strict order. 28:24 tag the completer copies this field from the tag field of the requester attributes. the requester uses this information to identify the appropriate split completions. 23:16 requester bus number the completer copies this field from the requester bus number field of the requester attributes. the requester uses this information to identify the appropriate split completions. 15:11 requester device number the completer copies this field from the requester device number field of the requester attributes. the requester uses this information to identify the appropriate split completions. 10:8 requester function number the completer copies this field from the requester function number field of the requester attributes. the requester uses this information to identify the appropriate split completions. 7 ? reserved. must be 0. 6:0 lower address the completer copies the 7 lsbs of the split request address if all of the following are true:  the split request for this sequence is a burst read  this is the first split completion of the sequence  the split completion is not a split completion message. if the split completion is disconnected on an adb, this field is cleared when the sequence resumes. if the split request is a dword transaction or the split completion is a split completion message, this field is cleared.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-92 freescale semiconductor pci/pci-x bus interface figure 16-77. ad[31:0] during pci-x split completion attribute phase table 16-61 describes the fields of the completer attribute for pci-x split completion transactions. 16.4.3.6.4 split completion messages for pci-x split completion transactions that include a split completion error or split completion message, the transaction has a single dword data phase with the format shown in figure 16-78 . figure 16-78. pci-x split completion message format bcm sce scm 00000 completer bus number 31 30 29 28 24 23 16 completer device number completer function number lower byte count 15 11 10 8 7 0 table 16-61. pci-x split completion transaction attribute summary ad name description 31 bcm byte count modified. the completer must set bcm if the byte count is less than the full remaining byte count of the transaction. if the byte count is the full byte count of the split request, the completer clears bcm. 30 sce split completion error. the completer sets this bit to indicate the transaction is a split completion message that includes an error message. 29 scm split completion message. the completer clears this bit if the split completion contains read data. the completer sets this bit if the split completion contains a split completion message. 28:24 ? reserved. must be 00000 23:16 completer bus number the completer bus number attribute is supplied by the bus number field in the pci-x status register. 15:11 completer device number the completer device number attribute is supplied by the device number field in the pci-x status register. 10:8 completer function number the completer function number is assigned to the function in the completer by design. 7:0 lower byte count for a split completion attribute phase, pci_c/be [3:0] is concatenated with ad[7:0] to create a 12-bit byte count. the byte count indicates the number of bytes remaining in the sequence. message class message index 0 remaining lower address 31 28 27 20 19 18 16 remaining lower address (cont.) remaining byte count 15 12 11 0
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-93 table 16-62 describes the fields of the pci-x split completion message. 16.4.3.7 pci-x configuration transactions pci-x configuration transactions are similar to pci configuration transaction as described in section 16.4.2.11, ?configuration cycles .? the exceptions are noted in this section. table 16-62. pci-x split completion message summary ad name description 31:28 message class a split completion message can be one of the following classes: 0x0 write completion 0x1 pci-x bridge error 0x2 completer error 0x3?0xfreserved 27:20 message index the message index identifies the type of message within the message class. for write completion message class: 0x00 normal completion for pci-x bridge error message class: 0x00 master-abort 0x01 target-abort 0x02 write data parity error for completer error message class: 0x00 byte count out-of-range error 0x01 split write data parity error 0x8n device-specific error 19 ? reserved 18:12 remaining lower address if the split request was a burst memory read transaction, the remaining lower address is the least significant seven bit of the first byte of data that has not been sent. if the split request was a dword transaction, the completer places all zeroes in this field. 1 1 note that the pci-x 1.0 specification states that if the split request is a dword transaction, the completer sets the remaining lower address field (bits 18?12) of the split completion message to zero. however, the MPC8540 deviates from the specification when the split request is a dword read transaction to the upper 32-bits of a quad word (that is, the address ends with 1xx); in this case, bit 14 of the split completion message is set to 1. 11:0 remaining byte count if the split request was a burst memory read transaction, the remaining byte count is the number of bytes that have not been sent. if the split request was a dword transaction, the completer places 0x004 in this field.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-94 freescale semiconductor pci/pci-x bus interface there is a rare situation where an internal access (originating from either the processor core, or other i/o ports on the device) to the 256-byte pci-x configuration header may be corrupted by concurrent outbound pci-x data transactions. the corruption does not occur if the pci-x configuration transactions and the outbound pci-x data transactions are not concurrent. the corruption does not occur with inbound pci-x traffic. this is an issue for any system that mixes internally generated pci-x configuration transactions with outbound pci-x data transactions. there are two ways to avoid the situation: 1. ensure that pci-x configuration transactions are completed before starting pci-x data transactions. 2. ensure that all pci-x outbound data traffic is quiesced before attempting pci-x configuration transactions. the programmer must ensure all of the following: ? non-configuration transactions to pci-x from the processor core are quiesced. ? the core is not fetching instructions from pci-x. ? dma transactions to pci-x are quiesced. ? rapidio bridging transactions to pci-x are quiesced. as is the case for pci configuration accesses, the bus master bit in the MPC8540?s pci bus command register must be set before an outbound configuration access is attempted. figure 16-79 shows the pci-x type 0 translation function performed on the contents of the pci cfg_addr register to ad[31:0] on the pci-x bus during the address phase of the configuration cycle. figure 16-79. pci-x type 0 configuration translation compare the pci-x translation in figure 16-79 with the pci configuration translation shown in figure 16-66 . note that for pci-x mode in addition to being used to generate the idsel signal, the device number is repeated on ad[15:11]. 0 1 7 8 15 16 20 21 23 24 29 30 31 bus number 000_0000 reserved device number function number register number e 00 3 1161521 idsel?only one signal high 00 contents of pci cfg_addr register pci_ad[31:0] signals during address phase see table 16-63 device/function/register number 0
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-95 for pci-x type 0 configuration cycles, the MPC8540 translates the device number field of pci cfg_addr into a unique idsel signal for up to 15 different devices. each device connects its idsel input to one of the ad[31:17] signals. for pci-x type 0 configuration cycles, the MPC8540 translates the device number to ad n as shown in table 16-63 . for pci-x type 0 translations, the function number and register number fields are copied without modification onto pci_ad[15:2] during the address phase. pci_ad[1:0] are driven to 0b00 during the address phase for pci-x type 0 configuration cycles. the MPC8540 implements address stepping on configuration cycles so that the target?s idsel, which is connected directly to one of the pci_ad lines, reaches a stable value. this means that a valid address and command are driven on pci_ad[31:0] and pci_c/be [3:0] four clocks before the assertion of pci_frame . pci-x configuration transactions include an attribute phase one clock cycle after the address phase. the the attribute for a configuration transaction is similar to the dword transaction attribute. for the configuration attribute, pci_c/be [3:0] provide the byte enables and ad[31:0] are driven as shown in figure 16-80 . figure 16-80. ad[31:0] during pci-x configuration attribute phase table 16-63. pci-x type 0 configuration?device number to ad n translation device number ad signal used for idsel device number ad signal used for idsel binary decimal binary decimal 0b0_0000 0 ? 0b0_1001 9 ad25 0b0_0001 1 ad17 0b0_1010 10 ad26 0b0_0010 2 ad18 0b0_1011 11 ad27 0b0_0011 3 ad19 0b0_1100 12 ad28 0b0_0100 4 ad20 0b0_1101 13 ad29 0b0_0101 5 ad21 0b0_1110 14 ad30 0b0_0110 6 ad22 0b0_1111 15 ad31 0b0_0111 7 ad23 0b1_xxxx ? ? 0b0_1000 8 ad24 0b1_ 1111 1 1 a device number of all ones indicates a pci-x special-cycle or interrupt-acknowledge transaction. 31 ? 000 tag requester bus number 31 29 28 24 23 16 requester device number requester function number secondary bus number 15 11 10 8 7 0
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-96 freescale semiconductor pci/pci-x bus interface table 16-64 describes the fields of the attribute for pci-x configuration transactions. 16.4.3.8 pci-x error functions pci-x provides for parity and other system errors to be detected and reported. this section describes generation and detection of parity and error reporting for the pci-x bus. 16.4.3.8.1 error reporting pci-x provides for the detection and signaling of both parity and other system errors. two signals are used to report these errors?pci_perr and pci_serr . pci_perr is used exclusively to report data parity errors on all transactions except special cycles. the pci_serr signal is used for other error signaling including address parity errors and data parity errors on special-cycle transactions; it may also be used to signal other system errors. note that some errors are enabled by programming two bits?one in the pci bus command register and another in the pci/x error enable register (err_en). likewise, some errors are reported in two bits?one in the pci bus status register and another in the pci/x error detect register (err_dr). these bits must be cleared separately; that is, clearing one does not clear the other. for example, clearing the err_dr[mstr abort error] does not clear the received master abort bit in the pci bus status register. in these cases, both bits must be cleared before further error reporting can occur. table 16-64. pci-x configuration transaction attribute summary ad name description 31:29 ? reserved. must be 0 28:24 tag identifies up to 32 unique sequences from a single initiator. tag is also a component of the sequence id. 23:16 requester bus number supplied by the bus number field in the pci-x status register. the requester bus number is also a component of the sequence id. 15:11 requester device number supplied by the device number field in the pci-x status register. the requester bus number is also a component of the sequence id. 10:8 requester function number supplied by the function number field in the pci-x status register. the requester bus number is also a component of the sequence id. 7:0 secondary bus number the number of the bus on which the type 0 configuration transaction is executing
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-97 table 16-65 shows actions taken for each kind of error. table 16-65. pci-x mode error actions pci-x error type error detect register bit pci bus status register bit pci-x status register bit comment pci-x outbound read received serr at any phase rcvd serr error ? ? no data transferred received data parity error for data phase mstr perr error detected parity error, master data parity error detected ? no data transferred master abort mstr abort error received master abort ? no data transferred target abort trgt abort error received target abort ? no data transferred memory space violation ormsv error ? ? no data transferred. only 8 bytes are requested in pci bus sc (split completion) with byte count value different than requested scm error signaled target abort usc no data transferred. target abort sc with wrong lower address field (burst read) scm error signaled target abort usc no data transferred. target abort sc with wrong lower address field (dword read) ?? ? extra sc. no pending sc with that tag scm error ? usc master abort sc error message scm error ? rsm no data transferred sc not received before sc pci-x timer time-out toe error ? ? no data transferred detected parity error at address or attribute phase of sc addr parity error detected parity error, signaled system error ? no data transferred detected parity error at data phase of sc mstr perr error detected parity error, master data parity error detected ? no data transferred received serr at any phase of sc rcvd serr error ? ? no data transferred pci-x outbound write received serr at any phase rcvd serr error ? ? float ad bus received perr (data phase) rcvd perr error master data parity error ? master abort rcvd abort error received master abort ?
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-98 freescale semiconductor pci/pci-x bus interface target abort trgt abort error received target abort ? memory space violation owmsv error ? ? no data transferred. only 8 bytes are requested in pci bus pci-x inbound read detected parity error for address or attribute phases addr parity error detected parity error, signaled system error ? split completion error message generated detected parity error on upper address bits for address (sac) or attribute phases ? ? ? no par64 checks for sac address or attribute phases detected parity error for address (dac) phases addr parity error detected parity error, signaled system error ? split completion error message generated received serr at any phase rcvd serr error ? ? split completion error message generated internal error ? ? ? split completion error message generated memory space violation irmsv error ? ? split completion error message generated received serr at any phase of sc rcvd serr error ? ? float ad bus received perr at sc (data phase) trgt perr error ? ? master abort for sc ? ? ? target abort for sc ? ? ? pci-x inbound write detected parity error for address or attribute phases addr parity error detected parity error, signaled system error ? transaction purged detected parity error on upper address bits for address (sac) or attribute phases ? ? ? no par64 checks for sac address or attribute phases detected parity error on upper address bits for address (dac) phases addr parity error detected parity error, signaled system error ? transaction purged received serr at any phase rcvd serr error ? ? transaction purged detected parity error for data phase trgt perr error detected parity error ? transaction from the point of the error is purged table 16-65. pci-x mode error actions (continued) pci-x error type error detect register bit pci bus status register bit pci-x status register bit comment
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-99 when an outbound pci-x read transaction has been split and the split completion transaction indicates a master-abort or a target-abort, the split-completion error message (scem) data field contains information for setting the received master-abort or received target-abort bit in the pci bus status register (bits 13 and 12, respectively). however, for misaligned reads (that is, reads not aligned on a 64-bit boundary), the error is not reflected in the pci bus status register. the error is reported in the pci error detection register (err_dr) at 0x0_8e00. the master-abort or target-abort can be inferred from the error data capture register (err_dl). drivers that require this information can read the err_dr register rather than the pci bus status register. 16.5 initialization/application information this section describes some tips for use of the pci/x controller. 16.5.1 power-on reset configuration modes the pci/x block can power-on in three modes: host mode, agent mode and agent configuration lock mode. certain bits in the configuration registers are set differently according to the por (power-on reset) mode. also, certain configuration bits have different implications when compared with past freescale semiconductor parts and pci implementations. note that after reset, the device cannot be switched from one mode to another. the affected configuration bits are defined in table 16-66 . table 16-66. affected configuration register bits for por register (offset) bi t name register description pci bus command register (0x04) 2bus master controls whether the device can master a transaction on the pci/x bus. if cleared, the device can not master a transaction. this bit is independent of host or agent mode. 1 memory space controls acknowledgement of inbound memory transactions. if cleared, all inbound memory accesses (including accesses to pcsrbar space) end in a master abort. this bit is independent of host or agent mode. pci bus function register (0x44) 5 acl valid only in agent mode. controls acknowledgement of inbound configuration accesses. if set, all inbound configuration accesses are retried. if cleared, inbound configuration accesses are acknowledged. in host mode all inbound configuration accesses end in master aborts. 0 pah determines whether the device is in agent or host mode. zero indicates host mode.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-100 freescale semiconductor pci/pci-x bus interface the por reset values for the affected configuration bits are described in table 16-67 . 16.5.1.1 host mode when the device powers up in host mode, all inbound configuration accesses are ignored (and thus master aborted). the acl bit is a don?t care. the device powers up with the ability to master transactions on the pci bus, however in order to acknowledge memory transactions, the memory space bit must be set. 16.5.1.2 agent mode when the device powers up in agent mode, it acknowledges inbound configuration accesses. however the device cannot master transactions or acknowledge inbound memory accesses on the pci bus until the appropriate configuration bits (bus master and memory space, respectively) have been set. 16.5.1.3 agent configuration lock mode agent configuration lock mode is similar to agent mode with the added restriction that when the device powers up in agent configuration lock mode, it retries all inbound configuration accesses until the acl bit is cleared. as in agent mode, the device in agent configuration lock mode cannot master transactions or acknowledge inbound memory accesses on the pci bus until the appropriate configuration bits (bus master and memory space, respectively) have been set. 16.5.2 nonposted writes in pci-x the pci-x block may pipeline i/o write and configuration write accesses to a target that signals a split response. to fully serialize these non-posted writes, the processor should follow each write transaction with a read of the same target, followed by proper barrier instructions to guarantee completion of the read before continuing with a subsequent write. this method guarantees completion of the write and serialization of a series of writes. table 16-67. power-on reset values for affected configuration bits mode configuration bit bus master memory space acl pah host 1 0 x 0 agent 0001 agent configuration lock 0011
initialization/application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 16-101 16.5.3 pci-x outbound read transaction alignment the pci-x protocol supports only read transactions with byte enables that are 32-bit aligned and are 32 bits wide. the MPC8540 requires the following: 1. reads to pci-x greater than 32 bits must be aligned to a 64-bit boundary and have a size that is a multiple of 8 bytes. 2. reads to pci-x less than or equal to 32 bits must not cross a 32-bit boundary. a read to pci-x that is not aligned to a 32-bit boundary that crosses a 32-bit boundary will execute only to the 32-bit boundary. no mechanism is provided in hardware to split this type of read into multiple transactions with byte enables on the pci-x bus. care should be taken on the MPC8540 when writing software to meet these alignment restrictions. 16.5.4 pci-x inbound reads that cross window boundaries for rev 1 of the MPC8540, inbound pci-x read requests can cross a window boundary. for rev 2, if an inbound pci-x read request crosses a window boundary, the MPC8540 responds with a split completion message indicating an error but does not return any data. this is a deviation from the pci-x specification which describes that data is returned up to the window boundary. 16.5.5 bridging between rapidio and pci/x the MPC8540 does not support bridging from rapidio according to the rapidio interoperability specification. if an external rapidio device tries to target the MPC8540 with a rapidio nwrite-r transaction or with any rapidio write at a priority level higher than 0, and the rapidio inbound atmu routes the transaction to the pci/pci-x interface, the MPC8540 could deadlock internally. therefore, the use of rapidio nwrite-r transactions must be avoided in bridging applications to the pci/x controller, and all rapidio writes targeting the pci/x controller must be of priority level 0. this means transaction ordering is relaxed because read responses will not necessarily push posted writes in the bridge, and writes will never bypass read requests. note that this specifically precludes the topology where two MPC8540s communicating with each other via pci or pci-x may deadlock when two rapidio devices (one on each MPC8540) are simultaneously performing priority-1 writes to targets on the remote MPC8540 through the pci/x link between the devices. to support such a topology, rapidio write transactions that bridge to the other MPC8540 must be priority 0.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 16-102 freescale semiconductor pci/pci-x bus interface
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-1 chapter 17 rapidio interface the rapidio controller conforms to revision 1.2 of the parallel rapidio interconnect specification . this chapter describes the implementation of the parallel rapidio controller. 17.1 introduction the rapidio controller is partitioned into inbound and outbound blocks, and these blocks are further partitioned into three implementation layers: physical, protocol, and logical. note that these implementation layers do not precisely correlate with the layers described in the parallel rapidio interconnect specification . the physical and protocol layers primarily address the portion of the parallel rapidio interconnect specification titled ?physical layer 8/16 lp-ep.? the logical layer refers primarily to the logical portions of the parallel rapidio interconnect specification . the physical layer operates at the rapidio interface applied frequency, and data is sampled at twice this frequency. the protocol and logical layers operate at the device frequency. 17.1.1 overview a block diagram of the rapidio controller is shown in figure 17-1 and includes a rapidio interface and a system core interface; those signals are divided into several groups. these groups include: the rapidio request, response, ack done, and data transfer interfaces, the system core request, response and data transfer interfaces, the register access interface, which is used to access the programming model registers, the interrupt interface, the systems functions interface, and the performance monitor interface.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-2 freescale semiconductor rapidio interface figure 17-1. rapidio high level block diagram the rapidio controller also implements extra process-specific circuitry for receive clock recovery and for transmit clock and data alignment. configuration interface core request interface rapidio ack done interface core response interface core data interface rapidio data interface rapidio request interface rapidio response interface configuration block outbound queue address/ attributes response queue data buffer inbound queue address/ attributes logical txdata[0:7] ack response queue address request layer header assembly link request logic packet and control symbol assembly protocol layer crc generator ack history queue asynchronous fifo ack queue crc check header assembly msg and doorbel l unit throttle logic rxdata[0:7] asynchronous fifo training idle symbol physical layer data data packet control symbols receive registers ack generator misalign block transmit registers global arbiter
introduction MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-3 the rapidio inbound interface receives and latches 8 double data rate (ddr) data bits. 64 bits are accumulated in the asynchronous boundary fifo and transferred across the asynchronous boundary into the protocol layer. at the protocol layer, the 64 bits are split into packet header, packet data, and control symbol information fields. after the packet header information arrives in the inbound packet assembly logic, packets are stripped of cyclical redundancy check (crc) information and other transport information not required by the logical layer. the crc is checked at the end of a packet. packet header information and packet data are then passed to the inbound logical layer. the header is interpreted by the logical layer and the transaction is stored in the inbound queue if space is available. the data is held in the inbound data queue until it is transferred out of the rapidio controller block and into the device. some control symbols (acks and link responses, for example) are passed to the outbound block for processing. on the outbound side, requests are received from the device at the logical layer and queued in the outbound queue. transactions from the outbound queue are scheduled according to priority and may be steered to the misalign block or directly to the protocol layer if global arbitration is won. transactions whose address and data payload are not aligned according to the rapidio alignment requirements are sent to the misalign block for processing. the response queue handles responses from the device for previously received inbound requests and schedules them as transactions out of the response queue according to priority. of all transactions from the outbound queue, misalign block, and the response queue, one is prioritized subject to global arbitration to be sent to the protocol layer. at the protocol layer, the packet crc is performed. the protocol layer logic chooses to transmit either control symbols or packets on the outbound rapidio interface. the packets and control symbols are then stored in the asynchronous boundary fifo. the physical layer logic then reads 32-bit quantities from the fifo and transmits them on the outbound rapidio interface as 8-bit symbols. while there exist no packet or control symbols to send, the physical layer sends idle symbols. idle symbols may also be inserted in a packet if a throttle request is received on the inbound interface. the following sections provide greater detail on the organization and operation of rapidio functionality. these sections are organized as follows:  section 17.2, ?external signal descriptions,? describes the interface signal groups, their meanings, and timing relationships.  section 17.3, ?memory map/register definition,? describes the configuration, runtime, and debug registers that constitute the programming model.  section 17.4.1, ?rapidio transaction, packet, and control symbol summary,? describes the functional organization and operation of the design.  section 17.5, ?rapidio functionality,? provides general information about implementing rapidio features.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-4 freescale semiconductor rapidio interface 17.1.2 rapidio terminology table 17-1 describes terminology used throughout this chapter. 17.1.3 rapidio interface features this section describes the rapidio interface features. 17.1.3.1 supported features rapidio supports the following features of the parallel rapidio interconnect specification :  8-bit interface as defined by the 8/16 lp-ep physical layer specification  support for non-coherent i/o transactions table 17-1. rapidio terminology term description ack acknowledge control symbol car capability register crc cyclic redundancy check csr command and status register domain logically associated group of processing elements doorbell port on a device that generates an interrupt to the processor double word an 8-byte quantity header part of a packet that contains all of the information about the packet excluding any data id identifier, the name of a processing element on the rapidio interconnect logical layer handles all logic transformations of packets between the protocol layer and the physical layer lp-lvds low-power, low-voltage differential signaling mailbox dedicated hardware that receives a message in the message passing unit physical layer physical handling of the transport of packets over the rapidio interface priority relative importance of a transaction or packet; in most systems a higher priority transaction or packet is serviced or transmitted before a lower priority transaction. protocol layer handling of packets at the protocol level on the rapidio interface receiver destination of a packet on the rapidio interface, also referred to as a destination or a target source originator of a packet on the rapidio interconnect symbol one beat of a packet appearing on the interface pins target destination of a packet on the rapidio interface, also referred to as a destination or a receiver word a 4-byte quantity
introduction MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-5  a message-passing programming model  default and configurable inbound atmu window  default outbound atmu window  crc-based error detection (ccitt-crc16) as described in the 8/16 lp-ep physical specification  256-byte data payloads  packet pacing/retry capability  only the small size transport information field (tt = 0b00)  link validation, error recovery, training, and time-out support as required by the physical layer specification  rapidio error injection 17.1.3.2 features not implemented the following portions of the parallel rapidio interconnect specification are not supported:  large size transport information field (tt = 0b01)  tod-sync control symbols (these are treated as idle control symbols)  atomic swap or atomic test and swap transactions 17.1.4 rapidio modes of operation this section describes the rapidio modes of operation. 17.1.4.1 transmit clock-select mode the rapidio transmit clock can be chosen from either an internal source or from the rapidio receive clock signal. the clock source is selected at power-on reset, as described in section 4.4.3.10, ?rapidio transmit clock source,? and section 4.4.4.2, ?rapidio clocks.? note that the ccb clock is the clock signal for the rest of the rapidio block. 17.1.4.2 crc checking modes rapidio offers the modes for packet crc checking shown in table 17-2 . note that a read that attempts to access an unmapped target causes the assertion of core_fault_in , which causes the core to generate a machine check interrupt, unless it is disabled (by clearing hid1[rfxe]). if rfxe is zero and this error occurs, pcr[cce] must be set to ensure that an interrupt is generated. for more information, see section 6.10.2, ?hardware implementation-dependent register 1 (hid1).?
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-6 freescale semiconductor rapidio interface . 17.1.4.3 error checking disable mode error checking can be enabled or disabled by setting a bit in the port control csr. this mode disables all rapidio transmission error checking. device behavior is undefined if error checking is disabled and an error condition occurs. 17.1.4.4 output port enable mode the output port can be disabled by setting a bit in the port control csr. in this mode, rapidio does not issue any packets of its own, except in response to maintenance packets. 17.1.4.5 output port driver disable mode this mode, controlled by pccsr[opd], disables rapidio input receivers and output drivers. 17.1.4.6 accept all mode this mode is controlled by a bit (cr[aa]) in the rapidio configuration register. while this mode is enabled, all packets are accepted regardless of the target id. table 17-3 describes the behavior with respect to the accept all mode. 17.1.4.7 packet response time-out disable mode the rapidio packet response time-out counters can be disabled by setting a bit in the rapidio port notification/fatal error disable register. for more information, see section 17.3.2.3.2, ?port notification/fatal error detect disable register (pnfedir).? 17.1.4.8 link response time-out disable mode the rapidio link time-out counters can be disabled by setting a bit in the rapidio port notification/fatal error disable register. for more information, see section 17.3.2.3.2, ?port notification/fatal error detect disable register (pnfedir).? table 17-2. crc checking mode pcr[cce] mode 0 crc checking disabled 1 crc enabled with hardware-based recovery table 17-3. accept all mode behavior accept all (cr[aa]) device behavior for target id device id 0 error reported in pnfedr[ite]. 1 accept and process the packet without regard to the target id
external signal descriptions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-7 17.2 external signal descriptions this section describes the signal names of the rapidio block, their meanings, and the timing relationships that exist among the signals. 17.2.1 signals overview the rapidio block implements the functionality described in the parallel rapidio interconnect specification for an 8-bit parallel interface with separate transmit and receive ports as shown in figure 17-2 . figure 17-2. rapidio interface signals model the rapidio signals are implemented as differential pairs of signals. table 17-4 lists the external rapidio signals implemented on this interface. table 17-4. rapidio interface signals summary signal name function pins i/o rio_rclk port receive clock 1 i rio_rclk port receive clock, inverted (differential pair) 1 i rio_rd [0:7] port receive data 8 i rio_rd [0:7] port receive data, inverted (differential pair) 8 i rio_rframe port receive framing signal 1 i rio_rframe port receive framing signal, inverted (differential pair) 1 i rio_tclk port transmit clock 1 o rio_tclk port transmit clock, inverted (differential pair) 1 o rio_td[0:7] port transmit data 8 o rio_td [0:7] port transmit data, inverted (differential pair) 8 o rio_tframe port transmit framing signal 1 o rio_tframe port transmit framing signal, inverted (differential pair) 1 o rio_tx_clk_in port transmit clock in 1 i rio_tx_clk_in port transmit clock in, inverted (differential pair) 1 i 8 1 1 rio_tclk rio_td[0:7] 1 rio_rclk 8 rio_rd[0:7] 1 rio_rframe rapidio interface rio_tframe rio_tx_clk_in
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-8 freescale semiconductor rapidio interface 17.2.2 detailed signal descriptions table 17-5 describes the rapidio interface signals in detail. table 17-5. rapidio interface signals?detailed signal descriptions signal i/o description rio_rclk i receive clock. free-running input clock used to capture control and data signals. rio_rclk is used to capture the frame signal rio_rframe and the data bus rio_rd[0:7]. rio_rclk is the differential pair of rio_rclk. state meaning asserted/negated?a clock event is determined as the rising or falling edge of rio_rclk. timing assertion/negation?free-running clock. see the MPC8540 integrated processor hardware specification for specific timing information for this signal. rio_rd[0:7] i receive data. the receive data bus rio_rd[0:7] carries packet information as well as control symbols. data is captured on both edges of rio_rclk. rio_rd [0:7] is the differential pair of rio_rd[0:7] state meaning asserted/negated?represents the data being received on the rapidio interface. timing rio_rd[0:7] data is captured on both the rising and falling edges of rio_rclk. rio_rframe i receive frame. non return to zero (nrz) input. it toggles at the beginning of a packet or control symbol. rio_rframe is the differential pair of rio_rframe. state meaning asserted/negated?assertion is signalled by a toggling of the signal. toggling indicates a special packet framing event on the receive data (rio_rd) pins. timing rio_rframe is sampled with respect to rio_rclk. rio_tclk o transmit clock out. free-running output clock which is launched in phase with the output data, rio_td, and the frame signal, rio_tframe. rio_tclk should track the data bus rio_td[0:7] through all the associated routing (board, package, and so forth). rio_tclk is the differential pair of rio_tclk. see section 17.1.4.1, ?transmit clock-select mode,? for more information on the source of the transmit clock. state meaning asserted/negated?a clock event in the transmit domain is determined as the rising or falling edge of this signal. timing assertion/negation?rio_tclk is a free-running clock. note that the rio_tclk is not phase aligned to the device clock. rio_td[0:7] o transmit data. carries packet information as well as control symbols. the data bus is switched on both edges of rio_tclk. rio_td [0:7] is the differential pair of rio_td[0:7]. state meaning asserted/negated?represents the data being transmitted on the rapidio interface. timing assertion of rio_td is always performed with a fixed relationship to rio_tclk.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-9 17.3 memory map/register definition the memory map for the rapidio controller is shown in table 17-6 . rio_tframe i transmit frame. nrz output. it toggles at the beginning of a packet or control symbol. rio_tframe is the differential pair of rio_tframe. state meaning asserted/negated?assertion is signalled by a toggling of the signal. toggling indicates a special packet framing event on the transmit data (rio_td[0:7]) pins. timing rio_tframe is generated with respect to rio_tclk. rio_tx_clk_in i transmit clock in. externally generated reference clock for the rapidio transmit domain. rio_tx_clk_in is the differential pair of rio_tx_clk_in. table 17-6. rapidio module memory map offset register access reset section/page rapidio architectural registers 0xc_0000 didcar?device identity capability register r 0x0002_0002 17.3.1.1/17-13 0xc_0004 dicar?device information capability register r 0x8030_0020 17.3.1.2/17-14 0xc_0008 aidcar?assembly identity capability register r/w 0x0000_0000 17.3.1.3/17-14 0xc_000c aicar?assembly information capability register r/w 0x0000_0100 17.3.1.4/17-15 0xc_0010 pefcar?processing element features capability register r 0xe088_0009 17.3.1.5/17-15 0xc_0014 spicar?switch port information capability register r 0x0000_0100 17.3.1.6/17-17 0xc_0018 socar?source operations capab ility register r 0x06 00_fcf0 17.3.1.7/17-17 0xc_001c docar?destination operations capability register r 0x0600_fcf4 17.3.1.8/17-19 0xc_0040 msr?mailbox command and status register r 0x0000_0000 17.3.1.9/17-22 0xc_0044 pwdcsr?port-write and doorbell command and status register r 0x0000_0020 17.3.1.10/17-22 0xc_004c pellccsr?processing element logical layer control command and status register r 0x0000_0001 17.3.1.11/17-24 0xc_0058 reserved r 0x0000_0000 ? 0xc_005c lcsba1csr?local configuration space base address 1 command and status register r/w 0x0000_0000 17.3.1.12/17-24 0xc_0060 bdidcsr?base device id command and status register r/w 0x00 nn _0000 17.3.1.13/17-25 0xc_0068 hbdidlcsr?host base device id lock command and status register r/w 0x0000_ffff 17.3.1.14/17-26 0xc_006c ctcsr?component tag command and status register r/w 0x0000_0000 17.3.1.15/17-26 0xc_0100 pmbh0csr?8/16 lp-lvds port maintenance block header 0 command and status register r 0x0000_0002 17.3.1.16/17-27 table 17-5. rapidio interface signals?deta iled signal descriptions (continued) signal i/o description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-10 freescale semiconductor rapidio interface 0xc_0120 pltoccsr?port link time-out control command and status register r/w 0xffff_ff00 17.3.1.17/17-27 0xc_0124 prtoccsr?port response time-out control command and status register r/w 0xffff_ff00 17.3.1.18/17-28 0xc_013c pgccsr?port general control command and status register r/w 0x n 000_0000 17.3.1.19/17-29 0xc_0140 plmreqcsr?port link maintenance request command and status register r/w 0x0000_0000 17.3.1.20/17-29 0xc_0144 plmrespcsr?port link maintenance response command and status register r 0x0000_0000 17.3.1.21/17-30 0xc_0148 plascsr?port local ackid status command and status register r/w 0x0000_0000 17.3.1.22/17-31 0xc_0158 pescsr?port error and status command and status register r/w 0x0000_0000 17.3.1.23/17-31 0xc_015c pccsr?port control command and status register r/w 0x4400_0000 17.3.1.24/17-33 rapidio implementation registers 0xd_0000 cr?configuration register r/w 0x0000_0001 17.3.2.1.1/17-34 0xd_0010 pcr?port configuration register r/w 0x0000_0010 17.3.2.1.2/17-35 0xd_0014 peir?port error injection register r/w 0x0000_0000 17.3.2.1.3/17-35 rapidio atmu registers 0xd_0c00 rowtar0?rapidio outbound window translation address register 0 r/w 0x0000_0000 17.3.2.2.1/17-37 0xd_0c10 rowar0?rapidio outbound window attributes register 0 r/w 0x8004_401f 17.3.2.2.3/17-39 0xd_0c20 rowtar1?rapidio outbound window translation address register 1 r/w 0x0000_0000 17.3.2.2.1/17-37 0xd_0c28 rowbar1?rapidio outbound window base address register 1 r/w 0x0000_0000 17.3.2.2.2/17-38 0xd_0c30 rowar1?rapidio outbound window attributes register 1 r/w 0x0004_401f 17.3.2.2.3/17-39 0xd_0c40 rowtar2?rapidio outbound window translation address register 2 r/w 0x0000_0000 17.3.2.2.1/17-37 0xd_0c48 rowbar2?rapidio outbound window base address register 2 r/w 0x0000_0000 17.3.2.2.2/17-38 0xd_0c50 rowar2?rapidio outbound window attributes register 2 r/w 0x0004_401f 17.3.2.2.3/17-39 0xd_0c60 rowtar3?rapidio outbound window translation address register 3 r/w 0x0000_0000 17.3.2.2.1/17-37 0xd_0c68 rowbar3?rapidio outbound window base address register 3 r/w 0x0000_0000 17.3.2.2.2/17-38 0xd_0c70 rowar3?rapidio outbound window attributes register 3 r/w 0x0004_401f 17.3.2.2.3/17-39 0xd_0c80 rowtar4?rapidio outbound window translation address register 4 r/w 0x0000_0000 17.3.2.2.1/17-37 0xd_0c88 rowbar4?rapidio outbound window base address register 4 r/w 0x0000_0000 17.3.2.2.2/17-38 0xd_0c90 rowar4?rapidio outbound window attributes register 4 r/w 0x0004_401f 17.3.2.2.3/17-39 table 17-6. rapidio module memory map (continued) offset register access reset section/page
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-11 0xd_0ca0 rowtar5?rapidio outbound window translation address register 5 r/w 0x0000_0000 17.3.2.2.1/17-37 0xd_0ca8 rowbar5?rapidio outbound window base address register 5 r/w 0x0000_0000 17.3.2.2.2/17-38 0xd_0cb0 rowar5?rapidio outbound window attributes register 5 r/w 0x0004_401f 17.3.2.2.3/17-39 0xd_0cc0 rowtar6?rapidio outbound window translation address register 6 r/w 0x0000_0000 17.3.2.2.1/17-37 0xd_0cc8 rowbar6?rapidio outbound window base address register 6 r/w 0x0000_0000 17.3.2.2.2/17-38 0xd_0cd0 rowar6?rapidio outbound window attributes register 6 r/w 0x0004_401f 17.3.2.2.3/17-39 0xd_0ce0 rowtar7?rapidio outbound window translation address register 7 r/w 0x0000_0000 17.3.2.2.1/17-37 0xd_0ce8 rowbar7?rapidio outbound window base address register 7 r/w 0x0000_0000 17.3.2.2.2/17-38 0xd_0cf0 rowar7?rapidio outbound window attributes register 7 r/w 0x0004_401f 17.3.2.2.3/17-39 0xd_0d00 rowtar8?rapidio outbound window translation address register 8 r/w 0x0000_0000 17.3.2.2.1/17-37 0xd_0d08 rowbar8?rapidio outbound window base address register 8 r/w 0x0000_0000 17.3.2.2.2/17-38 0xd_0d10 rowar8?rapidio outbound window attributes register 8 r/w 0x0004_401f 17.3.2.2.3/17-39 0xd_0d60 riwtar4?rapidio inbound window translation address register 4 r/w 0x0000_0000 17.3.2.2.4/17-40 0xd_0d68 riwbar4?rapidio inbound window base address register 4 r/w 0x0000_0000 17.3.2.2.5/17-41 0xd_0d70 riwar4?rapidio inbound window attributes register 4 r/w 0x0004_401f 17.3.2.2.6/17-42 0xd_0d80 riwtar3?rapidio inbound window translation address register 3 r/w 0x0000_0000 17.3.2.2.4/17-40 0xd_0d88 riwbar3?rapidio inbound window base address register 3 r/w 0x0000_0000 17.3.2.2.5/17-41 0xd_0d90 riwar3?rapidio inbound window attributes register 3 r/w 0x0004_401f 17.3.2.2.6/17-42 0xd_0da0 riwtar2?rapidio inbound window translation address register 2 r/w 0x0000_0000 17.3.2.2.4/17-40 0xd_0da8 riwbar2?rapidio inbound window base address register 2 r/w 0x0000_0000 17.3.2.2.5/17-41 0xd_0db0 riwar2?rapidio inbound window attributes register 2 r/w 0x0004_401f 17.3.2.2.6/17-42 0xd_0dc0 riwtar1?rapidio inbound window translation address register 1 r/w 0x0000_0000 17.3.2.2.4/17-40 0xd_0dc8 riwbar1?rapidio inbound window base address register 1 r/w 0x0000_0000 17.3.2.2.5/17-41 0xd_0dd0 riwar1?rapidio inbound window attributes register 1 r/w 0x0004_401f 17.3.2.2.6/17-42 0xd_0de0 riwtar0?rapidio inbound window translation address register 0 r/w 0x0000_0000 17.3.2.2.4/17-40 0xd_0df0 riwar0?rapidio inbound window attributes register 0 r/w 0x8004_401f 17.3.2.2.6/17-42 table 17-6. rapidio module memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-12 freescale semiconductor rapidio interface rapidio error management registers 0xd_0e00 pnfedr?port notification/fatal error detect register r/w 0x0000_0000 17.3.2.3.1/17-44 0xd_0e04 pnfedir?port notification/fatal error detect disable register r/w 0x0000_0000 17.3.2.3.2/17-47 0xd_0e08 pnfeier?port notification/fatal error interrupt enable register r/w 0x0000_0000 17.3.2.3.3/17-49 0xd_0e0c pecsr?port error capture status register r/w 0x0000_0000 17.3.2.3.4/17-52 0xd_0e10 epcr0?error packet capture register 0 r/w 0x0000_0000 17.3.2.3.5/17-52 0xd_0e14 epcr1?error packet capture register 1 r/w 0x0000_0000 17.3.2.3.6/17-53 0xd_0e18 epcr2?error packet capture register 2 r/w 0x0000_0000 17.3.2.3.16/17-58 0xd_0e20 predr?port recoverable error detect register r/w 0x0000_0000 17.3.2.3.23/17-61 0xd_0e28 pertr?port error recovery threshold register r/w 0x00ff_0000 17.3.2.3.24/17-64 0xd_0e2c prtr?port retry threshold register r/w 0x00ff_0000 17.3.2.3.25/17-64 rapidio message unit rapidio outbound message registers 0xd_1000 omr?outbound mode register r/w 0x0000_0000 17.3.3.1.1/17-65 0xd_1004 osr?outbound status register r/w 0x0000_0000 17.3.3.1.2/17-67 0xd_100c odqdpar?outbound descriptor queue dequeue pointer address register r/w 0x0000_0000 17.3.3.1.3/17-68 0xd_1014 osar?outbound source address register r/w 0x0000_0000 17.3.3.1.4/17-69 0xd_1018 odpr?outbound destination port register r/w 0x0000_0000 17.3.3.1.5/17-70 0xd_101c odatr?outbound destination attributes register r/w 0x0006_0000 17.3.3.1.6/17-70 0xd_1020 odcr?outbound double-word count register r/w 0x0000_0000 17.3.3.1.7/17-71 0xd_1028 odqepar?outbound descriptor queue enqueue pointer address register r/w 0x0000_0000 17.3.3.1.8/17-72 rapidio inbound message registers 0xd_1060 imr?inbound mailbox mode register r/w 0x0000_0000 17.3.3.2.1/17-72 0xd_1064 isr?inbound mailbox status register r/w 0x0000_0000 17.3.3.2.2/17-74 0xd_106c ifqdpar?inbound frame queue dequeue pointer address register r/w 0x0000_0000 17.3.3.2.3/17-75 0xd_1074 ifqepar?inbound frame queue enqueue pointer address register r/w 0x0000_0000 17.3.3.2.4/17-76 rapidio doorbell registers 0xd_1460 dmr?doorbell mode register r/w 0x0000_0000 17.3.3.3.1/17-77 0xd_1464 dsr?doorbell status register r/w 0x0000_0000 17.3.3.3.2/17-78 table 17-6. rapidio module memory map (continued) offset register access reset section/page
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-13 17.3.1 architectural registers following are the architectural registers of the rapidio module. for additional details of these registers, refer to the parallel rapidio interconnect specification . 17.3.1.1 device identity capability register (didcar) the didcar is a read-only register that provides information regarding the type of device being used as well as the vendor who manufactured it. figure 17-3 describes the didcar. table 17-7 describes the fields of the didcar. 0xd_146c dqdpar?doorbell queue dequeue pointer address register r/w 0x0000_0000 17.3.3.3.3/17-79 0xd_1474 dqepar?doorbell queue enqueue pointer address register r/w 0x0000_0000 17.3.3.3.4/17-80 rapidio port-write registers 0xd_14e0 pwmr?port-write mode register r/w 0x0000_0000 17.3.3.4.1/17-81 0xd_14e4 pwsr?port-write status register r/w 0x0000_0000 17.3.3.4.2/17-82 0xd_14ec pwqbar?port-write queue base address register r/w 0x0000_0000 17.3.3.4.3/17-83 0151631 r di dvi w reset 0000_0000_0000_0010_0000_0000_0000_0010 offset 0xc_0000 figure 17-3. device identity capability register (didcar) table 17-7. didcar field descriptions bits name description 0?15 di device identity field. uniquely identifies the type of device from the vendor specified in the device vendor identity field. the values of the device identity field are assigned and managed by the vendor. 0x0002?MPC8540 16?31 dvi device vendor identity field. identifies the vendor that manufactured the device. a value is uniquely assigned to a device vendor by the registration authority of the rapidio trade association. 0x0002?freescale table 17-6. rapidio module memory map (continued) offset register access reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-14 freescale semiconductor rapidio interface 17.3.1.2 device information capability register (dicar) the dicar, shown in figure 17-4 , identifies the revision level of the device. the value is assigned and managed by the vendor specified in didcar[dvi]. dicar represents a copy of the device?s system version register (svr). table 17-8 describes the field of the dicar. 17.3.1.3 assembly identity capability register (aidcar) aidcar, shown in figure 17-5 , provides information regarding the type of assembly or subsystem being used as well as the vendor who manufactured it. table 17-9 describes the fields of the aidcar. 0 31 rdr w reset 1000_0000_0011_0000_0000_0000_0010_0000 offset 0xc_0004 figure 17-4. device information capability register (dicar) table 17-8. dicar field description bits name description 0?31 dr device revision?copy of the device?s system version register (svr). draco: 0x8030_0020 0151631 r ai avi w reset 0000_0000_0000_0000_0000_0000_0000_0000 (alternate value may be read from serial rom) offset 0xc_0008 figure 17-5. assembly identity capability register (aidcar) table 17-9. aidcar field descriptions bits name description 0?15 ai assembly identity field. the assembly field uniquely identifies the type of assembly or subsystem from the vendor specified in the assembly vendor identity field. the value of the assembly identity field by default is all zeros but may be assigned by a boot rom device. 16?31 avi assembly vendor identity field. the assembly vendor identity field identifies the vendor that manufactured the assembly or subsystem. a value for the assembly vendor identity field is uniquely assigned to an assembly vendor by the registration authority of the rapidio trade association. by default, this value is all zeros but may be assigned by a boot rom device.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-15 17.3.1.4 assembly information capability register (aicar) the aicar, shown in figure 17-6 , provides additional information about the assembly. table 17-10 describes the fields of the aicar. 17.3.1.5 processing element features capability register (pefcar) the pefcar, shown in figure 17-7 , identifies major functionality provided by the rapidio block. table 17-11 describes the fields of the pefcar. 0151631 r ar efp w reset 0000_0000_0000_0000_0000_0001_0000_0000 (alternate value may be read from serial rom) offset 0xc_000c figure 17-6. assembly information capability register (aicar) table 17-10. aicar field descriptions bits name description 0?15 ar assembly revision. this field states the assembly revision level. 16?31 efp extended features pointer. pointer to the first entry in the extended features list. 0 1 2 3 4 7 8 9 10 11 12 13 26 27 28 29 31 r b m p s 0 0 0 0 m0 m1 m2 m3 d 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ctls ef eas w reset 1110_0000_1000_1000_0000_0000_0000_1001 offset 0xc_0010 figure 17-7. processing element features capability register (pefcar) table 17-11. pefcar field descriptions bits name description 0 b bridge. set for the MPC8540. 0 the rapidio controller does not have a dram interface. 1 the rapidio controller has a dram interface. 1 m memory. set for the MPC8540. 0 the rapidio controller does not have local address space. 1 the rapidio controller has local address space.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-16 freescale semiconductor rapidio interface 2 p processor. set for the MPC8540. 0 the rapidio controller does not have a processor core. 1 the rapidio controller has a processor core. 3 s switch. cleared for the MPC8540. 0 the rapidio controller is a switch. 1 the rapidio controller is not a switch. 4?7 ? reserved 8 m0 mailbox 0. set for the MPC8540. 0 the rapidio controller does not support mailbox 0. 1 the rapidio controller supports mailbox 0. 9 m1 mailbox 1. cleared for the MPC8540. 0 the rapidio controller does not support mailbox 1. 1 the rapidio controller supports mailbox 1. 10 m2 mailbox 2. cleared for the MPC8540. 0 the rapidio controller does not support mailbox 2. 1 the rapidio controller supports mailbox 2. 11 m3 mailbox 3. cleared for the MPC8540. 0 the rapidio controller does not support mailbox 3. 1 the rapidio controller supports mailbox 3. 12 d doorbell. set for the MPC8540. 0 the rapidio controller does not support inbound doorbells. 1 the rapidio controller supports inbound doorbells. 13?26 ? reserved 27 ctls common transport route. cleared for the MPC8540. 0 the rapidio controller does not support the large common transport route field. 1 the rapidio controller supports the large common transport route field. 28 ef extended features. set for the MPC8540. 0 the extended features pointer is not valid. 1 the extended features pointer is valid. 29?31 eas extended addressing support. possesses a value of 001 for the MPC8540. 001 the rapidio controller supports 34-bit local addresses. 010 reserved 011 the rapidio controller supports 50- and 34-bit local addresses. 100 reserved 101 the rapidio controller supports 66- and 34-bit local addresses. 110 reserved 111 the rapidio controller supports 60-, 50- and 34-bit local addresses. table 17-11. pefcar field descriptions bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-17 17.3.1.6 switch port information capability register (spicar) the spicar, shown in figure 17-8 , defines the rapidio block?s switching capabilities. table 17-12 describes the fields of the spicar. 17.3.1.7 source operations capability register (socar) the socar, shown in figure 17-9 , reflects the set of rapidio operations that this device can initiate. see the parallel rapidio interconnect specification for details. 01516232431 r0000000000000000 pt pn w reset 0000_0000_0000_0000_0000_0001_0000_0000 offset 0xc_0014 figure 17-8. switch port information capability register (spicar) table 17-12. spicar field descriptions bits name description 0?15 ? reserved 16?23 pt port total. the rapidio controller has one rapidio port. (spicar[pt] = 0x01) 24?31 pn port number. this is the port number from which this register was read. this field is 0 since the MPC8540 has only one port. 012345678910 15 r ir ro dci c f ior iki tie ties 0 0 0 0 0 0 w reset 0000_0110_0000_0000 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 r nr nw sw nwr m d 0 ats ai ad as ac 0 pw 0 0 w reset 1111_1100_1111_0000 offset 0xc_0018 figure 17-9. source operations capability register (socar)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-18 freescale semiconductor rapidio interface table 17-13 describes the fields of the socar. table 17-13. socar field descriptions bits name description 0 r read operation. cleared for the MPC8540. 0 the rapidio controller cannot initiate a read operation. 1 the rapidio controller can initiate a read operation. 1 ir iread operation. cleared for the MPC8540. 0 the rapidio controller cannot initiate an iread operation. 1 the rapidio controller can initiate an iread operation. 2 ro read to own operation. cleared for the MPC8540. 0 the rapidio controller cannot initiate a read to own operation. 1 the rapidio controller can initiate a read to own operation. 3 dci dkill operation. cleared for the MPC8540. 0 the rapidio controller cannot initiate a dkill operation. 1 the rapidio controller can initiate a dkill operation. 4 c castout operation. cleared for the MPC8540. 0 the rapidio controller cannot initiate a castout operation. 1 the rapidio controller can initiate a castout operation. 5 f flush operation. (return globally-shared cache line to memory.) set for the MPC8540. 0 the rapidio controller cannot initiate a flush operation. 1 the rapidio controller can initiate a flush operation. 6 ior i/o read operation. (read a non-cachable copy of a globally-shared cache line.) set for the MPC8540. 0 the rapidio controller cannot initiate an i/o read operation. 1 the rapidio controller can initiate an i/o read operation. 7 iki ikill operation. cleared for the MPC8540. 0 the rapidio controller cannot initiate an ikill operation. 1 the rapidio controller can initiate an ikill operation. 8 tie tlbie operation. cleared for the MPC8540. 0 the rapidio controller cannot initiate a tlbie operation. 1 the rapidio controller can initiate a tlbie operation. 9 ties tlbsync operation. cleared for the MPC8540. 0 the rapidio controller cannot initiate a tlbsync operation. 1 the rapidio controller can initiate a tlbsync operation. 10?15 ? reserved 16 nr nread operation. (read non-sharable memory.) set for the MPC8540. 0 the rapidio controller cannot initiate an nread operation. 1 the rapidio controller can initiate an nread operation. 17 nw nwrite operation. (write non-sharable memory.) set for the MPC8540. 0 the rapidio controller cannot initiate an nwrite operation. 1 the rapidio controller can initiate an nwrite operation. 18 sw swrite operation. (write non-sharable memory.) set for the MPC8540. 0 the rapidio controller cannot initiate an swrite operation. 1 the rapidio controller can initiate an swrite operation.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-19 17.3.1.8 destination operations capability register (docar) the docar, shown in figure 17-10 , describes rapidio i/o operations that this device can service. see the parallel rapidio interconnect specification for additional details. 19 nwr nwrite_r operation. (write non-sharable memory.) set for the MPC8540. 0 the rapidio controller cannot initiate an nwrite_r operation. 1 the rapidio controller can initiate an nwrite_r operation. 20 m message operation. (write to port.) set for the MPC8540. 0 the rapidio controller cannot initiate a message operation. 1 the rapidio controller can initiate a message operation. 21 d doorbell operation. (generate and interrupt.) set for the MPC8540. 0 the rapidio controller cannot initiate a doorbell operation. 1 the rapidio controller can initiate a doorbell operation. 22 ? reserved 23 ats atomic test and swap operation. cleared for the MPC8540. 0 the rapidio controller can initiate an atomic test and swap operation. 1 the rapidio controller cannot initiate an atomic test and swap operation. 24 ai atomic_inc operation. set for the MPC8540. 0 the rapidio controller cannot initiate an atomic_inc operation. 1 the rapidio controller can initiate an atomic_inc operation. 25 ad atomic_dec operation. set for the MPC8540. 0 the rapidio controller cannot initiate an atomic_dec operation. 1 the rapidio controller can initiate an atomic_dec operation. 26 as atomic_set operation. set for the MPC8540. 0 the rapidio controller cannot initiate an atomic_set operation. 1 the rapidio controller can initiate an atomic_set operation. 27 ac atomic_clr operation. set for the MPC8540. 0 the rapidio controller cannot initiate an atomic_clr operation. 1 the rapidio controller can initiate an atomic_clr operation. 28 ? reserved 29 pw port-write operation. cleared for the MPC8540. 0 the rapidio controller cannot initiate a port-write operation. 1 the rapidio controller can initiate a port-write operation. 30?31 ? reserved table 17-13. socar field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-20 freescale semiconductor rapidio interface table 17-14 describes the fields of the docar. 012345678910 15 r ir ro dci c f ior iki tie ties 0 0 0 0 0 0 w reset 0000_0110_0000_0000 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 nr nw sw nwr m d 0 ats ai ad as ac 0 pw 0 0 w reset 1111_1100_1111_0100 offset 0xc_001c figure 17-10. destination operations capability register (docar) table 17-14. docar field descriptions bits name description 0 r read operation. cleared for the MPC8540. 0 the rapidio controller cannot service a read operation. 1 the rapidio controller can service a read operation. 1 ir iread operation. cleared for the MPC8540. 0 the rapidio controller cannot service an iread operation. 1 the rapidio controller can service an iread operation. 2 ro read to own operation. cleared for the MPC8540. 0 the rapidio controller cannot service a read to own operation. 1 the rapidio controller can service a read to own operation. 3 dci dkill operation. cleared for the MPC8540. 0 the rapidio controller cannot service a dkill operation. 1 the rapidio controller can service a dkill operation. 4 c castout operation. cleared for the MPC8540. 0 the rapidio controller cannot service a castout operation. 1 the rapidio controller can service a castout operation. 5 f flush operation. (return globally-shared cache line to memory.) set for the MPC8540. 0 the rapidio controller cannot service a flush operation. 1 the rapidio controller can service a flush operation. 6 ior i/o read operation. (read a non-cachable copy of a globally-shared cache line.) set for the MPC8540. 0 the rapidio controller cannot service an i/o read operation. 1 the rapidio controller can service an i/o read operation. 7 iki ikill operation. cleared for the MPC8540. 0 the rapidio controller cannot service an ikill operation. 1 the rapidio controller can service an ikill operation. 8 tie tlbie operation. cleared for the MPC8540. 0 the rapidio controller cannot service a tlbie operation. 1 the rapidio controller can service a tlbie operation.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-21 9 ties tlbsync operation. cleared for the MPC8540. 0 the rapidio controller cannot service a tlbsync operation. 1 the rapidio controller can service a tlbsync operation. 10?15 ? reserved 16 nr nread operation. (read non-sharable memory.) set for the MPC8540. 0 the rapidio controller cannot service an nread operation. 1 the rapidio controller can service an nread operation. 17 nw nwrite operation. (write non-sharable memory.) set for the MPC8540. 0 the rapidio controller cannot service an nwrite operation. 1 the rapidio controller can service an nwrite operation. 18 sw swrite operation. (write non-sharable memory.) set for the MPC8540. 0 the rapidio controller cannot service an swrite operation. 1 the rapidio controller can service an swrite operation. 19 nwr nwrite_r operation. (write non-sharable memory.) set for the MPC8540. 0 the rapidio controller cannot service an nwrite_r operation. 1 the rapidio controller can service an nwrite_r operation. 20 m message operation. (write to port.) set for the MPC8540. 0 the rapidio controller cannot service a message operation. 1 the rapidio controller can service a message operation. 21 d doorbell operation. (generate and interrupt.) set for the MPC8540. 0 the rapidio controller cannot service a doorbell operation. 1 the rapidio controller can service a doorbell operation. 22 ? reserved 23 ats atomic test and swap operation. cleared for the MPC8540. 0 the rapidio controller can service an atomic test and swap operation. 1 the rapidio controller cannot service an atomic test and swap operation. 24 ai atomic_inc operation. set for the MPC8540. 0 the rapidio controller cannot service an atomic_inc operation. 1 the rapidio controller can service an atomic_inc operation. 25 ad atomic_dec operation. set for the MPC8540. 0 the rapidio controller cannot service an atomic_dec operation. 1 the rapidio controller can service an atomic_dec operation. 26 as atomic_set operation. set for the MPC8540. 0 the rapidio controller cannot service an atomic_set operation. 1 the rapidio controller can service an atomic_set operation. 27 ac atomic_clr operation. set for the MPC8540. 0 the rapidio controller cannot service an atomic_clr operation. 1 the rapidio controller can service an atomic_clr operation. 28 ? reserved 29 pw port-write operation. set for the MPC8540. 0 the rapidio controller cannot service a port-write operation. 1 the rapidio controller can service a port-write operation. 30?31 ? reserved table 17-14. docar field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-22 freescale semiconductor rapidio interface 17.3.1.9 mailbox command and status register (msr) the msr, shown in figure 17-11 , reflects the status of the rapidio mailbox controller on this device. note that the rapidio controller only supports mailbox 0. table 17-15 describes the fields of the msr. 17.3.1.10 port-write and doorbell command and status register (pwdcsr) the pwdcsr, shown in figure 17-12 , reflects the status of the rapidio doorbell and port-write hardware on this device. additional details can be found in the parallel rapidio interconnect specification in the sections titled ?doorbell csr? and ?write port csr.? 01 2 34 5 6 31 r a fu em b 0 err 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xc_0040 figure 17-11. mailbox status register (msr) table 17-15. msr field definitions bits name description 0 a available 0 mailbox 0 is not ready to accept messages. all incoming message transactions return error responses. 1 mailbox 0 is initialized and ready to accept messages. 1fufull 0 mailbox 0 is not full. 1 mailbox 0 is full. new messages are retried. 2emempty 0 mailbox 0 contains outstanding messages. 1 mailbox 0 contains no outstanding messages. 3bbusy 0 mailbox 0 is not busy processing a message. 1 mailbox 0 is busy processing a message. new message operations return retry responses. 4?reserved 5errerror 0 mailbox 0 has not received an illegal message operation. 1 mailbox 0 received an illegal message operation. all incoming message transactions return error responses. 6?31 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-23 table 17-16 describes the fields of the pwdcsr. : 0 1 2 3 4 5 6 23 24 25 26 2728293031 r a fu em b fa err 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 pa pfu pem pb 0 pe 0 0 w reset 0000_0000_0000_0000_0000_0000_0010_0000 offset 0xc_0044 figure 17-12. port-write and doorbell command and status register (pwdcsr) table 17-16. pwdcsr field descriptions bits name description 0 a available 0 doorbell unit is not ready to accept doorbell messages. all incoming doorbell transactions return error responses. 1 doorbell unit is ready to accept doorbell messages 1fufull 0 doorbell unit is not full 1 doorbell unit is full. new doorbell messages are retried. 2emempty 0 doorbell unit has outstanding doorbell messages 1 doorbell unit has no outstanding doorbell messages 3bbusy 0 doorbell unit is not busy processing a doorbell message 1 doorbell unit is busy processing a doorbell message. incoming transactions are retried. 4 fa failure. (defined by the rapidio specification but not implemented in the MPC8540.) 0 doorbell unit has not encountered an internal error 1 doorbell unit has encountered an internal error 5errerror 0 doorbell unit has not encountered an error condition 1 doorbell unit encountered an error condition. incoming doorbell transactions return error responses. 6?23 ? reserved 24 pa port-write unit available 0 port-write unit is not available. all incoming port-write packets are discarded. 1 port-write unit is initialized and ready to accept a port-write packet 25 pfu port-write unit full 0 port-write unit is not full 1 port-write unit is full. all incoming port-write packets are discarded. 26 pem port-write unit empty 0 port-write unit contains outstanding port-write data 1 port-write unit contains no outstanding port-write data 27 pb port-write unit busy 0 port-write unit is not busy 1 port-write unit is busy processing a port-write packet. incoming port-write packets are discarded. 28 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-24 freescale semiconductor rapidio interface 17.3.1.11 processing element logic layer control command and status register (pellccsr) the pellccsr, shown in figure 17-13 , is a read-only register. additional details of this register can be found in the parallel rapidio interconnect specification . table 17-17 describes the fields of the pellccsr. 17.3.1.12 local configuration space base address 1 command and status register (lcsba1csr) the local configuration space base address 1 command and status register (lcsba1csr), shown in figure 17-14 , contains the 14 msbs of the double-word address, which represents the base address for the device?s register space. 29 pe port-write unit error 0 received port-write packet contains no errors, for example, data is of legal size (64 bytes or less) 1 received port-write packet contains fatal errors, for example, data is of illegal size (greater than 64 bytes). all incoming port-write transactions are discarded. 30?31 ? reserved 0 28 29 31 r 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 eac w reset 0000_0000_0000_0000_0000_0000_0000_0001 offset 0xc_004c figure 17-13. processing element logic layer control command and status register (pellccsr) table 17-17. pellccsr field descriptions bits name description 0?28 ? reserved 29?31 eac extended addressing control. the rapidio controller supports 34-bit addresses (read-only). table 17-16. pwdcsr field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-25 table 17-18 describes the fields of the lcsba1csr. 17.3.1.13 base device id command and status register (bdidcsr) figure 17-15 shows the bdidscr. table 17-19 describes the fields of the bdidcsr. 0 1 14 15 31 r0 lcsba 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xc_005c figure 17-14. local configuration space base address 1 command and status register (lcsba1csr) table 17-18. lcsba1csr field descriptions bits name description 0?reserved 1?14 lcsba local configuration space base address. these bits correspond to the 14 most-significant bits of the 34-bit rapidio address space. 15?31 ? reserved 0781516 31 r 0 0 0 0 0 0 0 0 bdid 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w reset 0000_0000_(value from configuration pins)_0000_0000_0000_0000 offset 0xc_0060 figure 17-15. base device id command and status register (bdidcsr) table 17-19. bdidcsr field descriptions bits name description 0?7 ? reserved 8?15 bdid base device id (rapidio device id). value read from reset configuration pins. for more information on the rapidio device id, see section 4.4.3.11, ?rapidio device id.? 16?31 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-26 freescale semiconductor rapidio interface 17.3.1.14 host base device id lock command and status register (hbdidlcsr) the host base device id lock csr, shown in figure 17-16 , contains the base device id value for the processing element in the system that is responsible for initializing this processing element. hbdid is a write-once/resettable field that provides a lock function. after hbdid is written, subsequent writes to the field are ignored, except when the written value matches the value contained in the field. in this case, the register is reinitialized to 0xffff. after hbdid is written, a processing element must then read the host base device id lock csr to verify that it owns the lock before attempting to initialize this processing element. table 17-20 describes the fields of the hbdidlcsr. 17.3.1.15 component tag command and status register (ctcsr) the ctcsr contains a component tag value for the rapidio block and can be assigned by software when the device is initialized. figure 17-17 shows the ctcsr. 01516 31 r 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 hbdid w reset 0000_0000_0000_0000_1111_ 1111_1111_1111 offset 0xc_0068 figure 17-16. host base device id lock command and status register (hbdidlcsr) table 17-20. hbdidlcsr field descriptions bits name description 0?15 ? reserved 16?31 hbdid host base device id. this is the base device id for the processing element that is initializing this processing element. when unlocked, this field is write-able and locks immediately after being written. when locked, this field is only write-able when written with the value it already contains, at which point it becomes unlocked. 0 31 r ct w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xc_006c figure 17-17. component tag command and status register (ctcsr)
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-27 table 17-21 describes the field of the ctcsr. 17.3.1.16 8/16 lp-lvds port maintenance block header 0 command and status register (pmbh0csr) the port maintenance block header 0 command and status register, shown in figure 17-18 , contains the extended features pointer to the next extended features block and the extended features id that identifies this as the generic end point port maintenance block header. table 17-22 describes the fields of the pmbh0csr. 17.3.1.17 port link time-out control command and status register (pltoccsr) the pltoccsr, shown in figure 17-19 , contains the time-out timer value used to monitor link events, for example, between sending a packet and receiving the corresponding acknowledge. alternately, it can contain the value of the timer time-out between sending a link-request and receiving the corresponding link-response. the reset value is the maximum time-out interval and represents between three and five seconds. table 17-21. ctcsr field descriptions bits name description 0?31 ct component tag. identifying component tag for the rapidio block. 01516 31 r ef_ptr ef_id w reset 0000_0000_0000_0000_0000_0000_0000_0010 offset 0xc_0100 figure 17-18. 8/16 lp-lvds port maintenance block header 0 command and status register (pmbh0csr) table 17-22. pmbh0csr field descriptions bits name description 0?15 ef_ptr extended features pointer. points to the next extended features block. 0x0000 for the MPC8540. 16?31 ef_id extended features id. identifies this as the generic end point port maintenance block header. 0x0002 for the MPC8540.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-28 freescale semiconductor rapidio interface table 17-23 describes the fields of the pltoccsr. 17.3.1.18 port response time-out control command and status register (prtoccsr) prtoccsr, shown in figure 17-20 , contains the time-out timer value used to monitor port events, for instance, between sending a request packet and receiving the corresponding response packet. table 17-24 describes the fields of the prtoccsr. 0 23 24 31 r tv 0 0 0 0 0 0 0 0 w reset 1111_1111_1111_1111_1111_111 1_0000_0000 offset 0xc_0120 figure 17-19. port link time-out control command and status register (pltoccsr) table 17-23. pltoccsr field descriptions bits name description 0?23 tv time-out value. this value is expressed in platform clock cycles. 24?31 ? reserved 0 23 24 31 r tv 0 0 0 0 0 0 0 0 w reset 1111_1111_1111_1111_1111_111 1_0000_0000 offset 0xc_0124 figure 17-20. port response time-out control command and status register (prtoccsr) table 17-24. prtoccsr field descriptions bits name description 0?23 tv time-out value. this value is expressed in platform clock cycles. 24?31 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-29 17.3.1.19 port general control command and status register (pgccsr) the pgccsr, shown in figure 17-21 , reflects the state of the rapidio port. table 17-25 describes the fields of the pgccsr. 17.3.1.20 port link maintenance request command and status register (plmreqcsr) a write to the plmreqcsr, shown in figure 17-22 , generates a link-request control symbol on the rapidio port interface. see the parallel rapidio interconnect specification for descriptions of the reset command, input-status command and send-training commands. 0123 31 r h m d 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w reset (value from configuration pins)_0000_0000_0000_0000_0000_0000_0000 offset 0xc_013c figure 17-21. port general control command and status register (pgccsr) table 17-25. pgccsr field descriptions bits name description 0 h a host device is a device that is responsible for system exploration, initialization, and maintenance. agent (or slave) devices are initialized by host devices. initialized from the host/agent configuration pin; if host is sampled, h is set as host. 0 agent device 1 host device 1 m master enable bit. controls whether or not a device is allowed to issue requests into the system. if the master enable is not set, the device may only respond to requests. initialized from the host/agent configuration pin. out of reset, if configured as a host (pgccsr[h] is set), m and d are also set. if configured as an agent (pgccsr[h] is cleared), m and d are initialized by the host of the system. 0 device is not enabled to issue requests into the system 1 device is enabled to issue requests into the system 2 d discovery enable bit. this device has been located by the processing element responsible for system configuration. initialized from the host/agent configuration pin. out of reset, if configured as a host (pgccsr[h] is set), bits m and d are also set. if configured as an agent (pgccsr[h] is cleared), bits m and d are initialized by the host of the system. 0 device has not been discovered by system host 1 device has been discovered by system host 3?31 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-30 freescale semiconductor rapidio interface table 17-26 describes the fields of the plmreqcsr. 17.3.1.21 port link maintenance response command and status register (plmrespcsr) a read from the plmrespcsr, shown in figure 17-23 , returns the status received in a link-response control symbol. table 17-27 describes the fields of the plmrespcsr. 0 28 29 31 r 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 c w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xc_0140 figure 17-22. port link maintenance request command and status register (plmreqcsr) table 17-26. plmreqcsr field descriptions bits name description 0?28 ? reserved 29?31 c command. this is the command to be sent in the link-request control symbol. see table 17-85 for command symbol formats. 01 24 25 27 28 31 r rv 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 as ls w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xc_0144 figure 17-23. port link maintenance response command and status register (plmrespcsr) table 17-27. plmrespcsr field descriptions bits name description 0 rv response valid (clear on read) 0 if the link-request caused a link-response, the link-response has not yet been received. if the link-request did not cause a link-response, the link-request has not yet been transmitted. 1 if the link-request caused a link-response, the link-response has been received and the status fields are valid. if the link-request did not cause a link-response, the link-request has been transmitted. 1?24 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-31 17.3.1.22 port local ackid status command and status register (plascsr) a read from the plascsr returns the local ackid status for both the outbound and inbound rapidio ports. figure 17-24 shows the plascsr. table 17-28 describes the fields of the plascsr. 17.3.1.23 port error and status command and status register (pescsr) the pescsr contains port error and status information. figure 17-25 shows the pescsr. 25?27 as ackid status. this is the ackid status field from the link-response control symbol. 28?31 ls link status. this is the link status field from the link-response control symbol. 04578 1516 2324282931 r 0 0 0 0 0 ia 0 0 0 0 0 0 0 0 outa 0 0 0 0 0 oba w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xc_0148 figure 17-24. port local ackid status command and status register (plascsr) table 17-28. plascsr field descriptions bits name description 0?4 ? reserved 5?7 ia input port next expected ackid value 8?15 ? reserved 16?23 outa outstanding unacknowledged ackids. a set bit indicates that the corresponding ackid value is used in a packet to an attached device but a corresponding acknowledge control symbol has not been received (read-only field). 24?28 ? reserved 29?31 oba outbound ackid. output port next transmitted ackid value. software writing this value can force re-transmission of outstanding unacknowledged packets ti manually implement error recovery. oba can only be written by software when the rapidio port is enabled. table 17-27. plmrespcsr field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-32 freescale semiconductor rapidio interface table 17-29 describes the fields of the pescsr. 0 10111213141516 2021222324 2728293031 r 0 0 0 0 0 0 0 0 0 0 0 ore or ors oee oes 0 0 0 0 0 irs iee ies 0 0 0 0 pp pe po pu w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xc_0158 figure 17-25. port error and status command and status register (pescsr) table 17-29. pescsr field descriptions bits name description 0?10 ? reserved 11 ore output port retry condition 0 output port operating normally 1 output port encountered a retry condition. set when ors is set. (bit reset, write-one-to-clear) 12 or output port retry (read-only field). (bit reset, write-one-to-clear) 0 output port received a packet-accepted or packet-not-accepted control symbol 1 output port received a packet retry and cannot make forward progress. set when ors is set 13 ors output port retry stop (read-only field) 0 output port operating normally 1 output port is stopped due to a retry 14 oee output port error encounter. (bit reset, write-one-to-clear) 0 output port operating normally 1 output port encountered an error. set when oes is set 15 oes output port error stop (read-only field) 0 output port operating normally 1 output port is stopped due to a transmission error 16?20 ? reserved 21 irs input port retry stop (read-only field) 0 input port operating normally 1 input port is stopped due to a retry condition 22 iee input port error encounter. (bit reset, write-one-to-clear) 0 input port operating normally 1 input port encountered a transmission error. set when ies is set 23 ies input port error stop (read-only field) 0 input port operating normally 1 input port is stopped due to a transmission error 24?27 ? reserved 28 pp input clock toggling (read-only field) note: set shortly after reset, due to asynchronous interface crossing and clock detection delay 0 input clock pin is not toggling 1 input clock pin is toggling. (there is a device attached.)
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-33 17.3.1.24 port control command and status register (pccsr) the pccsr contains bits used for port control. figure 17-26 shows the pccsr. table 17-30 describes the fields of the pccsr. 29 pe input port error. (bit reset, write-one-to-clear) 0 input port operating properly 1 input port encountered an unrecoverable error or output port failed error recover 30 po port initialization (read-only) 0 input or output port not initialized 1 input and output ports are initialized and can communicate with the adjacent device. 31 pu port training mode (read-only) note: set shortly after reset due to asynchronous interface crossing delay 0 input and output ports initialized 1 input and output ports are not initialized and are in training mode 0123456789 31 r opw ope opd 0 ipw ipe ipd 0 ecd 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w reset 0100_0100_0000_0000_0000_0000_0000_0000 offset 0xc_015c figure 17-26. port control command and status register (pccsr) table 17-30. pccsr field descriptions bits name description 0 opw operating width of the output port (read-only field) 0 port operating in 8-bit mode 1reserved 1 ope output port transmit enable. must equal the value of pccsr[ipe] for the rapidio controller to function properly. 0 port is stopped and not enabled to issue any packets except to respond to maintenance packets 1 port is enabled to issue any packets 2 opd output port drivers disable 0 input receiver and/or output driver are enabled 1 both the input receivers and output drivers are disabled. 3?reserved 4 ipw operating width of the input port (read-only field) 0 port operating in 8-bit mode 1reserved table 17-29. pescsr field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-34 freescale semiconductor rapidio interface 17.3.2 implementation registers following are the rapidio implementation registers. these are registers specific to this particular rapidio implementation and, therefore, do not appear in the parallel rapidio interconnect specification . 17.3.2.1 general registers 17.3.2.1.1 configuration register (cr) the cr contains configuration information regarding the behavior of the rapidio controller. figure 17-27 shows the cr. 5 ipe input port receive enable. must equal the value of pccsr[ope] for the rapidio controller to function properly 0 port is stopped and only enabled to receive maintenance requests packets. other requests return packet-not-accepted control symbols with ?general error? cause to force an error condition to be signalled by the sending device 1 port is enabled to issue any packets 6 ipd input port receivers disable 0 input receiver and/or output driver are enabled 1 both the input receivers and output drivers are disabled. 7?reserved 8 ecd error checking disable. disables all rapidio transmission error checking 0 error checking and recovery is enabled. 1 error checking and recovery is disabled. device behavior while error checking is disabled and an error condition occurs is undefined. 9?31 ? reserved 0 30 31 r 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 aa w reset 0000_0000_0000_0000_0000_0000_0000_0001 offset 0xd_0000 figure 17-27. configuration register (cr) table 17-30. pccsr field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-35 table 17-31 describes the fields of the cr. 17.3.2.1.2 port configuration register (pcr) the pcr contains configuration information regarding port behavior of the rapidio controller. figure 17-28 shows the pcr. figure 17-28. port configuration register (pcr) table 17-32 describes the fields of the pcr. 17.3.2.1.3 port error injection register (peir) rapidio error injection registers, shown in figure 17-29 , offer a simple way to inject errors into an outbound packet or a control symbol. the error injection register for the target port is loaded with control information for injecting an error in a packet stream or control symbol. after the register is written, the hardware starts to count up to the programmed number of words and, upon reaching that number, an error is injected in the specified byte using the byte mask. the error is table 17-31. cr field descriptions bits name description 0?30 ? reserved 31 aa accept all. note: must initially be cleared by the user as part of initialization 0 detect an error upon receiving a packet with a target id not equal to its own 1 all packets are accepted without checking the target id. 0 26 27 28 31 r 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 cce 0 0 0 0 w reset 0000_0000_0000_0000_0000_0000_0001_0000 offset 0xd_0010 table 17-32. pcr field descriptions bits name description 0?26 ? reserved 27 cce crc checking enable. note that a read that attempts to access an unmapped target causes the assertion of core_fault_in , which causes the core to generate a machine check interrupt, unless it is disabled (by clearing hid1[rfxe]). if rfxe is zero and this error occurs, pcr[cce] must be set to ensure that an interrupt is generated. for more information, see section 6.10.2, ?hardware implementation-dependent register 1 (hid1).? 0 no crc is checked on received packets. 1 crc is checked on received packets. 28?31 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-36 freescale semiconductor rapidio interface injected once and the enable bit is cleared if error injection is enabled and se is not set. the error is injected continuously if both en and se are set. it stops if software clears the enable bit. after setting the enable bit, software can monitor the injection of the error by polling the register and observing the enable bit being cleared. figure 17-29. port error injection register (peir) table 17-33 describes the fields of the peir. 17.3.2.2 atmu registers although the parallel rapidio interconnect specification allows for 48- and 64-bit addresses, the MPC8540 implementation only allows for 34-bit rapidio addresses. atmu window misses use the window 0 register set by default. overlapping window hits result in the use of the lowest number window register set hit. for both inbound and outbound translation, the smallest window size is 4 kbytes and the largest window size is 4 gbytes. see section 17.7, ?atmu (address translation and mapping unit),? for more information. 0 7 8 1516 2324252627 28 29 30 31 r bm 0 0 0 0 0 0 0 0 wc bc 0 0 em se ss en w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0014 table 17-33. peir field descriptions bits name description 0?7 bm byte mask. indicates on which bit of the byte to inject error 8?15 ? reserved 16?23 wc word count. number of words to count before injecting error 24?25 bc byte count. byte within the specified word count on which to inject error 26?27 ? reserved 28 em error mirror. setting em when bc is 00 causes the error to be mirrored to 10 and when bc is 01, the error is mirrored to 11. this gives better flexibility for error injection. for example, an eop symbol can be converted to a stomp symbol using this bit. setting em when bc is 10 or 11 causes an illegal condition. 29 se software enable. if se and en are set, an error continues to be injected until en is cleared by software. 30 ss symbol select. packet or control symbol selection 0 inject error in a packet. 1 inject error in a control symbol. 31 en enabled to start counting and inject error at the specified word count, byte within the word, and bit within the byte. hardware injects error and clears this bit.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-37 17.3.2.2.1 rapidio outbound window translation address registers 0?8 (rowtar n ) the rapidio outbound window translation address registers (rowtars) select the starting addresses in the external address space for window hits within the outbound translation windows. the new translated address is created by concatenating the transaction offset to this translation address. the target id is formed from the top eight bits of the translated address. this register takes on one of two formats, determined by the rdtyp and wrtyp fields in the corresponding attributes register (rowar n ), one for standard operations and one for maintenance operations. see section 17.7.1, ?outbound atmu translation,? for more information. figure 17-30 shows the rowtars as used in standard operations. figure 17-30. rapidio outbound window tran slation address registers 0?8 for standard transactions ( rowtar n ) table 17-34 describes the fields of the rowtars for standard operations. 0 1 2 9 10 11 12 31 r0 0 trgtid trexad trad w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0c00, 0xd_0c20, 0xd_0c40, 0xd_0c60, 0x d_0c80, 0xd_0ca0, 0xd_0cc0, 0xd_0ce0, 0xd_0d00 table 17-34. rowtar n standard field descriptions bits name description 0?1 ? reserved 2?9 trgtid target id for rapidio packet 10?11 trexad translation extended address of outbound window the translation extended address correspond to bits 0?1 of the 34-bit rapidio address. 12?31 trad translation address of outbound window system address that represents the starting point of the outbound translated address. the translation address must be aligned based on the size field. the translation address corresponds to bits 2?21 of the 34-bit rapidio address.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-38 freescale semiconductor rapidio interface figure 17-31 shows the rowtars for maintenance transactions. figure 17-31. rapidio outbound window translation address registers 0?8 for maintenance transactions ( rowtar n ) table 17-35 describes rowtars fields for maintenance transactions. for maintenance transactions, the hop count is formed from rowtar[12?19]. similarly, the upper 12 bits of the maintenance offset is formed from rowtar[20?31]. the rest of the maintenance offset is formed from the untranslated address. 17.3.2.2.2 rapidio outbound window base address registers 1?8 (rowbar n ) the rapidio outbound window translation address registers (rowbar n ), shown in figure 17-32 , select the base address for the windows that are translated to an alternate system address space. addresses for outbound transactions are compared to these windows. if such a transaction does not fall within one of these spaces the transaction is forwarded through the window 0 register set. since window 0 is the default window, and default translation does not require a base address register, rowbar0 is not implemented. figure 17-32. rapidio outbound window base address registers 1?8 (rowbar n ) 0 1 2 9 10 11 12 19 20 31 r0 0 trgtid 00 hop_count cfg_offset w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0c00, 0xd_0c20, 0xd_0c40, 0xd_0c60, 0x d_0c80, 0xd_0ca0, 0xd_0cc0, 0xd_0ce0, 0xd_0d00 table 17-35. rowtar n maintenance field descriptions bits name description 0?1 ? reserved 2?9 trgtid target id for rapidio packet 10?11 ? reserved 12?19 hop_count hop count of maintenance transaction 20?31 cfg_offset upper 12 bits of maintenance offset. the lower 9 bits of the 21-bit rapidio maintenance offset are formed from the untranslated address. 01112 31 r000000000000 badd w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0c028, 0xd_0c48, 0x d_0c68, 0xd_0c88, 0xd_0ca8, 0xd_0cc8, 0xd_0ceb, 0xd_0d08
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-39 table 17-36 describes the fields of the rowbars. 17.3.2.2.3 rapidio outbound window attributes registers 0?8 (rowar n ) the rapidio outbound window attributes registers (rowars) define the window size to translate and other attributes for the translation. the largest window size allowed is 4 gbytes. figure 17-33 and figure 17-34 show the rowars. figure 17-33. rapidio outbound window attributes register 0 (rowar0) figure 17-34. rapidio outbound window attributes registers 1?8 (rowar n ) table 17-37 describes the fields of the rowars. table 17-36. rowbar n field descriptions bits name description 0?11 ? reserved 12?31 badd base address of outbound window. source address that is the starting point for the outbound translation window. the window must be aligned based on the size selected in the window size bits. this corresponds to bits 0?19 of a 32-bit address. 0 1 3 4 5 6 7 11 12 15 16 19 20 25 26 31 ren 0 0 0 tflolv pci 00000 rdtyp wrtyp 000000 size w reset 1000_0000_0000_0100_0100_0000_0001_ 1111 offset 0xd_0c10 0 1 3 4 5 6 7 1112 1516 1920 2526 31 r en 000 tflolv pci 00 0 00 rdtyp wrtyp 000000 size w reset 0000_0000_0000_0100_0100_0000_0001_ 1111 offset 0xd_0c30, 0xd_0c50, 0xd_0c70, 0xd_0c 90, 0xd_0cb0, 0xd_0cd0, 0xd_0cf0, 0xd_0d10 table 17-37. rowar n field descriptions bits name description 0 en window address translation enable. note that for rowar0 this bit is read-only and hardwired to 1. 0 address translation disabled 1 address translation enabled 1?3 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-40 freescale semiconductor rapidio interface 17.3.2.2.4 rapidio inbound window translation address registers 0?4 (riwtar n ) the rapidio inbound window translation address registers (riwtars), shown in figure 17-35 , select the starting addresses in the internal address space for window hits within the inbound translation windows. the new translated address is created by concatenating the transaction offset to this translation address. see section 17.7.2, ?inbound atmu translation,? for more information. 4?5 tflolv transaction flow level priority of transaction 00 lowest priority transaction request flow 01 next highest priority transaction request flow 10 highest priority level transaction request flow 11 reserved 6 pci follow pci transaction ordering rules 0 do not follow pci transaction ordering rules. 1 follow pci transaction ordering rules (elevate write priority one level over reads). 7?11 ? reserved 12?15 rdtyp read transaction type. transaction type to run on rapidio interface if access is a read. see section 17.7.1.2, ?outbound special transactions and requirements,? for more information on maintenance transactions. 0000?0001reserved 0010 i/o read home 0011 reserved 0100 nread 0101?0110reserved 0111 maintenance read 1000?1011reserved 1100 atomic_inc 1101 atomic_dec 1110 atomic_set 1111 atomic_clr 16?19 wrtyp write transaction type. transaction type to run on rapidio interface if access is a write. see section 17.7.1.2, ?outbound special transactions and requirements,? for more information on maintenance and doorbell transactions. 0000 reserved 0001 flush with data 0010 doorbell 0011 swrite 0100 nwrite 0101 nwrite_r 0110 reserved 0111 maintenance write 1000? 1111reserved 20?25 ? reserved 26?31 size outbound window size. outbound window size n which is the encoded 2 n+1 -byte window size. the smallest window size is 4 kbytes; the largest is 4 gbytes. 00_0000?00_1010 reserved 00_1011 4 kbytes 00_1100 8 kbytes ... 01_1111 4 gbytes 10_0000?11_ 1111 reserved table 17-37. rowar n field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-41 figure 17-35. rapidio inbound window translation address registers 0?4 (riwtar n ) table 17-38 describes the fields of the riwtars. 17.3.2.2.5 rapidio inbound window base address registers 1?4 (riwbar n ) rapidio inbound window translation address registers (riwbars), shown in figure 17-36 , select the base address for windows that are translated to an alternate system address space. addresses for inbound transactions are compared to these windows. if such a transaction does not fall in the lcsba1csr window or one of these spaces, the transaction is forwarded through the window 0 register set. since window 0 is the default and default translation does not require a base address register, riwbar0 is not implemented. figure 17-36. rapidio inbound window base address registers 1?4 (riwbar n ) 01112 31 r0000000 00000 trad w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0de0, 0xd_0dc0, 0xd_0da0, 0xd_0d80, 0xd_0d60 table 17-38. riwtar n field descriptions bits name description 0?11 ? reserved 12?31 trad translation address of inbound window. system address that represents the starting point of the inbound translated address. the translation address must be aligned based on the size field. this corresponds to bits 0?19 of the 32-bit address. 09101112 31 r0000000000 bexad badd w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0dc8, 0xd_0da8, 0xd_0d88, 0xd_0d68
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-42 freescale semiconductor rapidio interface table 17-39 describes the fields of the riwbars. 17.3.2.2.6 rapidio inbound window attributes registers 0?4 (riwar n ) the rapidio inbound window attributes registers (riwars) define the window size to translate and other attributes for the translation. the largest window size allowed is 4 gbytes. figure 17-38 and figure 17-37 show the riwars. figure 17-37. rapidio inbound window attributes register 0 (riwar0) figure 17-38. rapidio inbound window attributes registers 1?4 (riwar n ) table 17-40 describes the fields of the riwars. table 17-39. riwbar n field descriptions bits name description 0?9 ? reserved 10?11 bexad base extended address of inbound window. field represents bits 0?1 of a 34-bit address. 12?31 badd base address of inbound window. source address that is the starting point for the inbound translation window. the window must be aligned based on the size selected in the window size bits. this corresponds to bits 2?21 of a 34-bit address. 0 1 7 8 11 12 15 16 19 20 25 26 31 ren0000000 tgint rdtyp wrtyp 000000 size w reset 1000_0000_0000_0100_0100_0000_0001_ 1111 offset 0xd_0df0 0 1 7 8 11 12 15 16 19 20 25 26 31 r en 0000000 tgint rdtyp wrtyp 000000 size w reset 0000_0000_0000_0100_0100_0000_0001_ 1111 offset 0xd_0dd0, 0xd_0db0, 0xd_0d90, 0xd_0d70 table 17-40. riwar n field descriptions bits name description 0 en window address translation enable. note that for riwar0 the enable bit is read only and hardwired to 1. 0 address translation disabled 1 address translation enabled 1?7 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-43 17.3.2.3 error management registers rapidio error management registers allow configuration of rapidio error detection, capture, and reporting. bits in the port notification/fatal error detect register (pnfedr) report which port notification or error was detected, subject to individual detection enable bit settings in the port notification/fatal error detect disable register (pnfedir). upon detecting a port notification or 8?11 tgint target interface 0000 pci/pci-x 0001?1110 reserved 1111 local memory ( ddr sdram, local bus controller (lbc), l2 cache/sram) note: if tgint is set to an i/o port (for example, pci/pci-x) rather than local memory space, attributes for the external i/o transaction are assigned in an outbound atmu of that i/o controller. 12?15 rdtyp read transaction type. transaction type to run if access is a read. the field description depends on the target of the transaction (to i/o interface or to local memory). following are the transaction type settings for reads from the pci/pci-x interface: 0000?0011 reserved 0100 read 0101?1111 reserved the following are the transaction type settings for reads from local memory: 0000?0011 reserved 0100 received read; do not snoop processor core (e500) 0101 received read; snoop processor core (e500) 0110 reserved 0111 received read; unlock l2 cache line 1000?1111 reserved 16?19 wrtyp write transaction type. transaction type to run if access is a write. the field description depends on the target of the transaction (to i/o interface or to local memory). following are the transaction type settings for writes to the pci/pci-x interface: 0000?0011 reserved 0100 write 0101?1111 reserved following are the transaction type settings for writes to local memory: 0000?0011 reserved 0100 received write; don?t snoop processor core (e500) 0101 received write; snoop processor core (e500) 0110 received write; allocate l2 cache line 0111 received write; allocate and lock l2 cache line 1000?1111 reserved 20?25 ? reserved 26?31 size inbound window size. inbound window size n which is the encoded 2 n+1 bytes window size. the smallest window size is 4 kbytes. the largest window size is 4 gbytes. 00_0000?00_1010 reserved 00_1011 4 kbytes 00_1100 8 kbytes ... 01_1111 4 gbytes 10_0000?11_ 1111 reserved table 17-40. riwar n field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-44 freescale semiconductor rapidio interface error, an interrupt is generated subject to the interrupt enable bit settings in the port notification/fatal error interrupt enable register (pnfeier); the port error capture status register (pecsr) indicates whether a valid packet was captured when the port notification or fatal error occurred. if a packet is captured (pecsr[v] is set), packet information may be found in the error packet capture registers (epcr n ). the packet format type, as captured in epcr0[pft], determines the format of the remaining packet data captured in epcr1 and epcr2. bits in the port recoverable error detect register (predr) report which recoverable errors have been detected. the port error recovery threshold register (pertr) and the port retry threshold register (prtr) allow software to assign and monitor the recovery and retry thresholds, which are referenced by hardware before reporting a recovery error (pnfedr[ete]) or a retry error (pnfedr[rte]). 17.3.2.3.1 port notification/fatal error detect register (pnfedr) the pnfedr, shown in figure 17-39 , reflects individual port notifications and fatal errors that the rapidio controller has detected. each bit is cleared when a 1 is written to it. figure 17-39. port notification/fatal error detect register (pnfedr) table 17-41 describes the fields of the pnfedr. 0123 56789101112131415 r mfe iaxe oaxe 0 0 0 ite mse ntie se dse mle ete rte rere lte w reset 0000_0000_0000_0000 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 r rste nae irfe urde ure urse iwre irsfe irte brre bwre ursse urese ursde mere mdfe w reset 0000_0000_0000_0000 offset 0xd_0e00 table 17-41. pnfedr field descriptions bits name description 0 mfe multiple fatal errors. (bit reset, write-one-to-clear) 0 multiple fatal rapidio errors of the same type were not detected. 1 multiple fatal rapidio errors of the same type were detected. 1 iaxe inbound atmu window crossing error. (bit reset, write-one-to-clear) 0 no inbound window crossing error 1 this error indicates that an inbound transaction either crosses the boundary of its atmu window or crosses into a higher priority atmu window.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-45 2 oaxe outbound atmu window crossing error. (bit reset, write-one-to-clear) 0 no outbound window crossing error 1 this error indicates that an outbound transaction either crosses the boundary of its atmu window or crosses into a higher priority atmu window. 3?5 ? reserved 6 ite illegal transaction target error. (bit reset, write-one-to-clear) 0 no illegal transaction detected 1 received a packet whose target id does not match the rapidio controller deviceid determined at por while accept_all mode is disabled 7 mse message size error. (bit reset, write-one-to-clear) 0 no message size error detected 1 received message packet data payload is not of the size specified in the ssize field (with the exception of the last packet which may be less) 8 ntie missing idle after training. (bit reset, write oneto clear) 0 idle received after a requested training sequence 1 idle not received after a requested training sequence completes 9 se message segment error. (bit reset, write-one-to-clear) 0 no message segment error. 1 received a message packet with the segment field greater than the message length field (msgseg > msglen) 10 dse duplicate message segment. (bit reset, write-one-to-clear) 0 no duplicate message segment received 1 received a duplicate message segment from rapidio 11 mle message length error. (bit reset, write-one-to-clear) 0 no message length error detected 1 received a message packet with the same mailbox, letter, and source id as the current outstanding (not completed) message, but with a different message length. 12 ete error recovery threshold error. (bit reset, write-one-to-clear) 0 no error recovery threshold error detected 1 error recovery threshold count (defined in pertr[rctt]) exceeded 13 rte retry threshold error. (bit reset, write-one-to-clear) 0 no retry threshold error detected 1 consecutive ack retry control symbols received threshold count (defined in prtr[rtt]) exceeded 14 rere received request error response. (bit reset, write-one-to-clear) 0 no error response received 1 received a response of type error for anything other than a message 15 lte link response time-out. (bit reset, write-one-to-clear) 0 no link response time-out 1 a link response is not received within the time-out interval, as defined by pltoccsr[tv]. 16 rste packet response time-out. (bit reset, write-one-to-clear) 0 no packet response time-out 1 a packet response is not received within the time-out interval, as defined by prtoccsr[tv]. 17 nae nonsensical ackid. (bit reset, write-one-to-clear) 0 ackid ok 1 unrecognized ackid received with link response table 17-41. pnfedr field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-46 freescale semiconductor rapidio interface 18 irfe illegal request fields 0 request packet fields ok 1 illegal combinations of fields in the request packet. (bit reset, write-one-to-clear) 19 urde unexpected request data 0 request data ok 1 read type with a data payload. (bit reset, write-one-to-clear). 20 ure unsupported request 0 packet format type ok 1 unsupported packet format type or transport type. (bit reset, write-one-to-clear) 21 urse unexpected request size 0 packet data size ok 1 packet data is not expected size with respect to the packet size bits (it reset, write-one-to-clear) 22 iwre illegal write request 0 write request ok 1 write type with no data payload. (bit reset, write-one-to-clear) 23 irsfe illegal response fields 0 response packet ok 1 illegal combinations of fields in the response packet. (bit reset, write-one-to-clear) 24 irte illegal response type 0 response type ok 1 illegal response for a given request type. (bit reset, write-one-to-clear) 25 brre bad read response 0 read response ok 1 read data response with no data payload. (bit reset, write-one-to-clear) 26 bwre bad write response 0 write response ok 1 write response with a data payload. (bit reset, write-one-to-clear) 27 ursse unexpected response data size 0 response packet size ok 1 response packet data is not expected size. (bit reset, write-one-to-clear) 28 urese unsolicited response without data 0 no response without data condition 1 a response without data is received if there exists no outstanding request matching that tid. (bit reset, write-one-to-clear). 29 ursde unsolicited response with data 0 no unsolicited response with data condition 1 a response with data is received if there exists no outstanding request matching that tid. (bit reset, write-one-to-clear) 30 mere message error response 0 no message error response 1 received a response of type error for an outbound message packet. (bit reset, write-one-to-clear) 31 mdfe message descriptor fetch error 0 no message descriptor fetch error 1 a message descriptor fetch from local memory results in an error. (bit reset, write-one-to-clear) table 17-41. pnfedr field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-47 17.3.2.3.2 port notification/fatal error detect disable register (pnfedir) the pnfedir individually disables the detection of each port notification or fatal error defined in the pnfedr. figure 17-40 shows the pnfedir. figure 17-40. port notification/fatal error detect disable register (pnfedir) table 17-42 describes the fields of the pnfedir. 012 3 5 6 7 8 9 10 11 12 13 1415 r 0 iaxd oaxd 0 0 0 itd msd ntid sd dsd bmd etd rtd rerd ltd w reset 0000_0000_0000_0000 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 r rstd nad irfd urdd urd ursd iwrd irsfd irtd brrd bwrd urssd uresd ursdd merd mdfd w reset 0000_0000_0000_0000 offset 0xd_0e04 table 17-42. pnfedir field descriptions bits name description 0?reserved 1 iaxd inbound atmu window crossing error detection disable 0 error detection enabled 1 error detection disabled 2 oaxd outbound atmu window crossing error detection disable 0 error detection enabled 1 error detection disabled 3?5 ? reserved 6 itd illegal transaction target error detection disable 0 error detection enabled 1 error detection disabled 7 msd message size error detection disable 0 error detection enabled 1 error detection disabled 8 ntid missing idle after training error detection disable 0 error detection enabled 1 error detection disabled 9 sd message segment error detection disable 0 error detection enabled 1 error disabled
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-48 freescale semiconductor rapidio interface 10 dsd duplicate message segment error detection disable 0 error detection enabled 1 error detection disabled 11 bmd message length error detection disable 0 error detection enabled 1 error detection disabled 12 etd error recovery threshold error detection disable 0 error detection enabled 1 error detection disabled 13 rtd retry threshold error detection disable 0 error detection enabled 1 error detection disabled 14 rerd received error response error detection disable 0 error detection enabled 1 error detection disabled 15 ltd link response time-out error detection disable 0 error detection enabled 1 error detection disabled 16 rstd packet response time-out error detection disable 0 error detection enabled 1 error detection disabled 17 nad nonsensical ackid error detection disable 0 error detection enabled 1 error detection disabled 18 irfd illegal request fields error detection disable 0 error detection enabled 1 error detection disabled 19 urdd unexpected request data error detection disable 0 error detection enabled 1 error detection disabled 20 urd unsupported request error detection disable 0 error detection enabled 1 error detection disabled 21 ursd unexpected request size error detection disable 0 error detection enabled 1 error detection disabled 22 iwrd illegal write request error detection disable 0 error detection enabled 1 error detection disabled 23 irsfd illegal response fields error detection disable 0 error detection enabled 1 error detection disabled 24 irtd illegal response type error detection disable 0 error detection enabled 1 error detection disabled table 17-42. pnfedir field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-49 17.3.2.3.3 port notification/fatal error interrupt enable register (pnfeier) the pnfeier, shown in figure 17-41 , individually enables each detected port notification or fatal error to generate an interrupt to the programmable interrupt controller (pic). figure 17-41. port notification/fatal error interrupt enable register (pnfeier) 25 brrd bad read response error detection disable 0 error detection enabled 1 error detection disabled 26 bwrd bad write response error detection disable 0 error detection enabled 1 error detection disabled 27 urssd unexpected response data size error detection disable 0 error detection enabled 1 error detection disabled 28 uresd unsolicited response without data error detection disable 0 error detection enabled 1 error detection disabled 29 ursdd unsolicited response with data error detection disable 0 error detection enabled 1 error detection disabled 30 merd message error response error detection disable 0 error detection enabled 1 error detection disabled 31 mdfd message descriptor fetch error detection disable 0 error detection enabled 1 error detection disabled 0123 567891011 12 131415 r 0 iaxie oaxie 0 0 0 itie msie ntiie sie dsie bmie etie rtie rerie ltie w reset 0000_0000_0000_0000 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 r rstie naie irfie urdie urie ursie iwrie irsfie irtie brrie bwrie urssie uresie ursdie merie mdfie w reset 0000_0000_0000_0000 offset 0xd_0e08 table 17-42. pnfedir field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-50 freescale semiconductor rapidio interface table 17-43 describes the fields of the pnfeier. table 17-43. pnfeier field descriptions bits name description 0?reserved 1 iaxie inbound atmu window crossing error interrupt enable 0 interrupt enabled 1 interrupt disabled 2 oaxie outbound atmu window crossing error interrupt enable 0 interrupt enabled 1 interrupt disabled 3?5 ? reserved 6 itie illegal transaction target error interrupt enable 0 interrupt enabled 1 interrupt disabled 7 msie message size error interrupt enable 0 interrupt enabled 1 interrupt disabled 8 ntiie missing idle after training interrupt enable 0 interrupt enabled 1 interrupt disabled 9 sie message segment error interrupt enable 0 interrupt enabled 1 interrupt disabled 10 dsie duplicate message segment error interrupt enable 0 interrupt enabled 1 interrupt disabled 11 bmie message length error interrupt enable 0 interrupt enabled 1 interrupt disabled 12 etie error recovery threshold error interrupt enable 0 interrupt enabled 1 interrupt disabled 13 rtie retry threshold error interrupt enable 0 interrupt enabled 1 interrupt disabled 14 rerie received error response error interrupt enable 0 interrupt enabled 1 interrupt disabled 15 ltie link response time-out error interrupt enable 0 interrupt enabled 1 interrupt disabled 16 rstie packet response time-out error interrupt enable 0 interrupt enabled 1 interrupt disabled
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-51 17 naie nonsensical ackid error interrupt enable 0 interrupt enabled 1 interrupt disabled 18 irfie illegal request fields error interrupt enable 0 interrupt enabled 1 interrupt disabled 19 urdie unexpected request data error interrupt enable 0 interrupt enabled 1 interrupt disabled 20 urie unsupported request error interrupt enable 0 interrupt enabled 1 interrupt disabled 21 ursie unexpected request size error interrupt enable 0 interrupt enabled 1 interrupt disabled 22 iwrie illegal write request error interrupt enable 0 interrupt enabled 1 interrupt disabled 23 irsfie illegal response fields error interrupt enable 0 interrupt enabled 1 interrupt disabled 24 irtie illegal response type error interrupt enable 0 interrupt enabled 1 interrupt disabled 25 brrie bad read response error interrupt enable 0 interrupt enabled 1 interrupt disabled 26 bwrie bad write response error interrupt enable 0 interrupt enabled 1 interrupt disabled 27 urssie unexpected response data size error interrupt enable 0 interrupt enabled 1 interrupt disabled 28 uresie unsolicited response without data error interrupt enable 0 interrupt enabled 1 interrupt disabled 29 ursdie unsolicited response with data error interrupt enable 0 interrupt enabled 1 interrupt disabled 30 merie message error response error interrupt enable 0 interrupt enabled 1 interrupt disabled 31 mdfie message descriptor fetch error interrupt enable 0 interrupt enabled 1 interrupt disabled table 17-43. pnfeier field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-52 freescale semiconductor rapidio interface 17.3.2.3.4 port error capture status register (pecsr) the pecsr, shown in figure 17-42 , indicates whether a valid packet has been captured when a port notification or fatal error has occurred. hardware sets pecsr[v] and software is expected to clear it after processing the error to capture future error packets. figure 17-42. port error capture status register (pecsr) table 17-44 describes the fields of the pecsr. 17.3.2.3.5 error packet capture register 0 (epcr0) the epcr0, shown in figure 17-43 , captures the first 32 bits of an inbound packet that caused a port notification or fatal error. the format of the first 32 bits of an inbound packet are the same for all packet format types. figure 17-43. error packet capture register 0 (epcr0) 0 30 31 r 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 v w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0e0c table 17-44. pecsr field descriptions bits name description 0?30 ? reserved 31 v packet register information valid 0 packet capture registers do not contain valid information. 1 packet capture registers contain valid information. 0 1 3 4 5 6 7 8 9 101112 1516 2324 31 r s a r ?s r r p tt pft did sid w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0e10
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-53 table 17-45 describes the fields of the epcr0. 17.3.2.3.6 error packet capture register 1 (epcr1) epcr1 captures a portion of an inbound packet that caused a port notification or a fatal error. the format of the epcr1 contents vary subject to the packet format type as captured in epcr0[pft]. the various content formats of epcr1 are described in section 17.3.2.3.7, ?epcr1?type 1 packet format,? through section 17.3.2.3.15, ?epcr1?type 13 packet format.? 17.3.2.3.7 epcr1?type 1 packet format figure 17-44 describes epcr1 for a type 1 packet format (epcr0[pft] = 1). figure 17-44. error packet capture register 1 (epcr1)?type 1 packet format table 17-45. epcr0 field descriptions bits name description 0 s s-bit of the packet 1?3 a ackid field of a packet 4 r these bits correspond to bits 4?7 of a packet header. in the packet definition bit 4 is a reserved packet field, bit 5 is s-complement, and bits 6 and 7 are reserved packet fields. (bits 4, 6 and 7 are reserved packet fields, not reserved register fields.) 5 ? s 6?7 r 8?9 p priority field of a packet 10?11 tt transport type field of a packet 12?15 pft packet format type field of a packet 16?23 did destination id field of a packet 24?31 sid source id field of a packet 03478 1516 2324 31 r trans rdsz stid secid sectid w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0e14
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-54 freescale semiconductor rapidio interface table 17-46 describes the epcr1 fields for a type 1 packet format (epcr0[pft] = 1). 17.3.2.3.8 epcr1?type 2 packet format figure 17-45 describes the epcr1 for a type 2 packet format (epcr0[pft] = 2). figure 17-45. error packet capture register 1 (epcr1)?type 2 packet format table 17-47 describes the epcr1 fields for a type 2 packet format (epcr0[pft] = 2). 17.3.2.3.9 epcr1?type 5 packet format figure 17-46 describes the epcr1 for a type 5 packet format (epcr0[pft] = 5). figure 17-46. error packet capture register 1 (epcr1)?type 5 packet format table 17-46. epcr1 type 1 field descriptions bits name description 0?3 trans transaction field of a packet 4?7 rdsz read size 8?15 stid source transaction id 16?23 secid secondary source id 24?31 sectid secondary transaction id 03478 1516 31 r trans rdsz stid 0000000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0e14 table 17-47. epcr1 type 2 field descriptions bits name description 0?3 trans transaction field of a packet 4?7 rdsz read size 8?15 stid source transaction id 16?31 ? reserved 03478 1516 31 r trans wrsz stid 0000000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0e14
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-55 table 17-48 describes the epcr1 fields for a type 5 packet format (epcr0[pft] = 5). 17.3.2.3.10epcr1?type 6 packet format figure 17-47 shows the epcr1 for a type 6 packet format (epcr0[pft] = 6). figure 17-47. error packet capture register 1 (epcr1)?type 6 packet format table 17-49 describes the field of the epcr1 for a type 6 packet format (epcr0[pft] = 6). 17.3.2.3.11 epcr1?type 8 request packet format figure 17-48 shows epcr1 for a type 8 request packet format (epcr0[pft] = 8 and epcr1[trans] = 0 or 1). figure 17-48. error packet capture register 1 (epcr1)?type 8 request packet format table 17-48. epcr1 type 5 field descriptions bits name description 0?3 trans transaction field of a packet 4?7 wrsz write size 8?15 stid source transaction id 16?31 ? reserved 0 31 r00000000000000000000000000 000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0e14 table 17-49. epcr1 type 6 field descriptions bits name description 0?31 ? reserved 034 78 1516 31 r trans rdsz/wrsz stid 0000000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0e14
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-56 freescale semiconductor rapidio interface table 17-50 describes epcr1 fields for a type 8 request packet format (epcr0[pft] = 8 and epcr1[trans] = 0 or 1). 17.3.2.3.12epcr1?type 8 response packet format figure 17-49 describes the epcr1 for a type 8 response packet format (epcr0[pft] = 8 and epcr1[trans] = 2 or 3). figure 17-49. error packet capture register 1 (epcr1)?type 8 response packet format table 17-51 describes the fields of the epcr1 for a type 8 response packet format (epcr0[pft] = 8 and epcr1[trans] = 2 or 3). 17.3.2.3.13epcr1?type 10 packet format figure 17-50 describes the epcr1 for a type 10 packet format (epcr0[pft] = 10). table 17-50. epcr1 type 8 request field descriptions bits name description 0?3 trans transaction field of a packet 4?7 rdsz/wtsz read or write size depending on whether it is a maintenance read or write request 8?15 stid source transaction id 16?31 ? reserved 03478 1516 31 r trans stat stid 0000000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0e14 table 17-51. epcr1 type 8 response field descriptions bits name description 0?3 trans transaction field of a packet 4?7 stat status field of a packet 8?15 stid source transaction id 16?31 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-57 figure 17-50. error packet capture register 1 (epcr1)?type 10 packet format table 17-52 describes epcr1 fields for a type 10 packet format (epcr0[pft] = 10). 17.3.2.3.14epcr1?type 11 packet format figure 17-51 describes the epcr1 for a type 11 packet format (epcr0[pft] = 11). figure 17-51. error packet capture register 1 (epcr1)?type 11 packet format table 17-53 describes epcr1 fields for a type 11 packet format (epcr0[pft] = 11). 0781516 31 r00000000 stid 0000000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0e14 table 17-52. epcr1 type 10 field descriptions bits name description 0?7 ? reserved 8?15 stid source transaction id 16?31 ? reserved 0 3 4 7 8 9 10 11 12 15 16 31 r mslen ssz let mbox msseg 0000000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0e14 table 17-53. epcr1 type 11 field descriptions bits name description 0?3 mslen message length field of a packet 4?7 ssz segment size field of a packet 8?9 let letter field of a packet 10?11 mbox mailbox field of a packet 12?15 msseg message segment field of a packet 16?31 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-58 freescale semiconductor rapidio interface 17.3.2.3.15epcr1?type 13 packet format figure 17-52 describes the epcr1 for a type 13 packet format (epcr0[pft] = 13). figure 17-52. error packet capture register 1 (epcr1)?type 13 packet format table 17-54 describes epcr1 fields for a type 13 packet format (epcr0[pft] = 13). 17.3.2.3.16error packet capture register 2 (epcr2) this register captures another portion of an inbound packet that caused a port notification or a fatal error. the format of the contents of this register are vary subject to the packet format type as captured in epcr0[pft]. the various content formats of this register are described in section 17.3.2.3.17, ?epcr2?type 1, 2, or 5 packet format,? through section 17.3.2.3.22, ?epcr2?type 11 or 13 packet format.? 17.3.2.3.17epcr2?type 1, 2, or 5 packet format figure 17-53 shows epcr2 for a type 1, 2, or 5 packet format (epcr0[pft] = 1, 2, or 5). figure 17-53. error packet capture register 2 (epcr2)?type 1, 2, or 5 packet format 03478 1516 31 r trans stat stid 0000000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0e14 table 17-54. epcr1 type 13 field descriptions bits name description 0?3 trans transaction field of a packet 4?7 stat status field of a packet 8?15 stid source transaction id 16?31 ? reserved 0 28 29 30 31 r pad wdptr xamsbs w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0e18
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-59 table 17-55 shows epcr2 for a type 1, 2, or 5 packet format (epcr0[pft] = 1, 2, or 5). 17.3.2.3.18epcr2?type 6 packet format figure 17-54 describes the epcr2 for a type 6 packet format (epcr0[pft] = 6). figure 17-54. error packet capture register 2 (epcr2)?type 6 packet format table 17-56 describes the epcr2 fields for a type 6 packet format (epcr0[pft] = 6). 17.3.2.3.19epcr2?type 8 request packet format figure 17-55 shows epcr2 for a type 8 request packet format (epcr0[pft] = 8 and epcr1[trans] = 0 or 1). figure 17-55. error packet capture register 2 (epcr2)?type 8 request packet format table 17-55. epcr2 type 1, 2, or 5 field descriptions bits name description 0?28 pad address[2:30] field of a packet 29 wdptr word pointer field of a packet, which is used in conjunction with the data size field 30?31 xamsbs address[0:1] field of a packet 0 28 29 30 31 r pad 0 xamsbs w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0e18 table 17-56. epcr2 type 6 field descriptions bits name description 0?28 pad address[2:30] field of a packet 29 ? reserved 30?31 xamsbs address[0:1] field of a packet 078 28 29 30 31 r hpcnt mntof wdptr xamsbs w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0e18
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-60 freescale semiconductor rapidio interface table 17-57 describes the fields of the epcr2 for a type 8 request packet format (epcr0[pft] = 8 and epcr1[trans] = 0 or 1). 17.3.2.3.20epcr2?type 8 response packet format figure 17-56 shows epcr2 for a type 8 response packet format (epcr0[pft] = 8 and epcr1[trans] = 2 or 3). figure 17-56. error packet capture register 2 (epcr2)?type 8 response packet format table 17-58 describes epcr2 for a type 8 response packet format (epcr0[pft] = 8 and epcr1[trans] = 2 or 3). 17.3.2.3.21epcr2?type 10 packet format figure 17-57 describes the epcr2 for a type 10 packet format (epcr0[pft] = 10). figure 17-57. error packet capture register 2 (epcr2)?type 10 packet format table 17-57. epcr2 type 8 request field descriptions bits name description 0?7 hpcnt hop count field of a packet 8?28 mntof maintenance offset field of a packet 29 wdptr wdptr field of a packet 30?31 xamsbs address[0:1] field of a packet 078 31 r hpcnt 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0e18 table 17-58. epcr2 type 8 response field descriptions bits name description 0?7 hpcnt hop count field of a packet 8?31 ? reserved 0151631 r info 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0e18
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-61 table 17-59 describes epcr2 for a type 10 packet format (epcr0[pft] = 10). 17.3.2.3.22epcr2?type 11 or 13 packet format figure 17-58 shows epcr2 for a type 11 or 13 packet format (epcr0[pft] = 11 or 13). figure 17-58. error packet capture register 2 (epcr2)?type 11 or 13 packet format table 17-60 describes epcr2 for a type 11 or 13 packet format (epcr0[pft] = 11 or 13). 17.3.2.3.23port recoverable error detect register (predr) the predr, described in figure 17-59 , indicates the recoverable errors detected on rapidio. figure 17-59. port recoverable error detect register (predr) table 17-59. epcr2 type 10 field descriptions bits name description 0?15 info information field of a packet 16?31 ? reserved 0 31 r000000000000000 00000000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_0e18 table 17-60. epcr2 type 11 or 13 field description bits name description 0?31 ? reserved 0 1 6 7 8 9 10 11 12 13 14 15 r mre 0 0 0 0 0 0 ete ise icce iaose iuae ibce ie256e inaie inaua w reset 0000_0000_0000_0000 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 r inacc inaps inabc inase inage ure uae abre ute use ule uee lre fae ftee ate w reset 0000_0000_0000_0000 offset 0xd_0e20
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-62 freescale semiconductor rapidio interface table 17-61 describes the fields of the predr. table 17-61. predr field descriptions bits name description 0 mre multiple recoverable errors. (bit reset, write-one-to-clear) 0 multiple recoverable rapidio errors of the same type were not detected. 1 multiple recoverable rapidio errors of the same type were detected. 1?6 ? reserved 7 ete embedded training. (bit reset, write-one-to-clear) 0 no requested training pattern 1 requested training pattern is embedded in a packet 8 ise inbound s-bit error. (bit reset, write-one-to-clear) 0 no inbound s-bit error 1 received a packet/control symbol with an s-bit parity error 9 icce inbound corrupt control symbol. (bit reset, write-one-to-clear) 0 no inbound corrupt control symbol 1 received a control symbol in which true does not match complement counterpart 10 iaose inbound out-of-sequence ack symbol. (bit reset, write-one-to-clear) 0 no inbound out-of-sequence ack symbol 1 received an ack control symbol with an unexpected ackid 11 iuae inbound packet with unexpected ackid. (bit reset, write-one-to-clear) 0 no inbound packet with unexpected ackid 1 received packet with unexpected ackid value?out-of-sequence ackid 12 ibce inbound packet with bad crc. (bit reset, write-one-to-clear) 0 no inbound packet with bad crc 1 received packet with a bad crc value 13 ie256e inbound packet exceeds 256 bytes. (bit reset, write-one-to-clear) 0 the data payload of an inbound packet does not exceed 256 bytes. 1 the data payload of an inbound packet exceeds 256 bytes. 14 inaie packet-not-accepted; encountered internal error. (bit reset, write-one-to-clear) 0 no packet-not-accepted; internal error encountered 1 received ack control symbol with packet-not-accepted of type ?encountered internal error? 15 inaua packet-not-accepted; unexpected ackid on packet. (bit reset, write-one-to-clear) 0 no packet-not-accepted; unexpected ackid on packet condition 1 received ack control symbol with packet-not-accepted of type ?unexpected ackid? 16 inacc packet-not-accepted; corrupt control symbol. (bit reset, write-one-to-clear) 0 no packet-not-accepted; corrupt control symbol condition 1 received ack control symbol with packet-not-accepted of type ?corrupt control symbol? 17 inaps packet-not-accepted; input port stopped. (bit reset, write-one-to-clear) 0 no packet-not-accepted; input port stopped condition 1 received ack control symbol with packet-not-accepted of type ?input port stopped? 18 inabc packet-not-accepted; bad crc. (bit reset, write-one-to-clear) 0 no packet-not-accepted; bad crc condition 1 received ack control symbol with packet-not-accepted of type ?bad crc?
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-63 19 inase packet-not-accepted; s-bit parity error. (bit reset, write-one-to-clear) 0 no packet-not-accepted; s-bit parity error condition 1 received ack control symbol with packet-not-accepted of type ?s-bit parity error? 20 inage packet-not-accepted; general error. (bit reset, write-one-to-clear) 0 no packet-not-accepted; general error condition 1 received ack control symbol with packet-not-accepted of type ?general error? 21 ure unexpected restart-from-retry symbol. (bit reset, write-one-to-clear) 0 no unexpected restart-from-retry symbol 1 received a restart-from-retry control symbol while in the ok state 22 uae unsolicited ack symbol. (bit reset, write-one-to-clear) 0 no unsolicited ack symbol encountered 1 received an ack control symbol while no packets are posted on the outstanding ack history queue 23 abre ack before restart-from-retry. (bit reset, write-one-to-clear) 0 no ack before restart-from-retry 1 received an ack control symbol after receiving an ack retry and before sending a restart-from-retry 24 ute unexpected training symbol. (bit reset, write-one-to-clear) 0 no unexpected training symbol 1 received a training symbol while in the ok state 25 use unexpected stomp symbol. (bit reset, write-one-to-clear) 0 no unexpected stomp symbol 1 received a stomp control symbol while there is no packet being received 26 ule unexpected link response symbol. (bit reset, write-one-to-clear) 0 no unexpected link response symbol 1 received a link response control symbol while there is no outstanding request 27 uee unexpected eop symbol. (bit reset, write-one-to-clear) 0 no unexpected eop symbol 1 received an eop control symbol while there is no packet being received 28 lre link request error. (bit reset, write-one-to-clear) 0 no link request error 1 received a link request control symbol before the previous link request has been serviced 29 fae frame toggle alignment. (bit reset, write-one-to-clear) 0 no frame toggle alignment problem 1 received frame signal toggles at a non 32-bit boundary 30 ftee frame toggle edge. (bit reset, write-one-to-clear) 0 no frame toggle edge problem 1 received frame signal toggles on the negative edge of the clock 31 ate ack time-out. (bit reset, write-one-to-clear) 0 no ack time-out condition 1 an ack control symbol is not received within the specified time-out interval. table 17-61. predr field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-64 freescale semiconductor rapidio interface 17.3.2.3.24port error recovery threshold register (pertr) figure 17-60 shows the pertr. figure 17-60. port error recovery threshold register (pertr) table 17-62 describes the fields of the pertr. 17.3.2.3.25port retry threshold register (prtr) figure 17-61 shows the prtr. figure 17-61. port retry threshold register (prtr) 0 7 8 1516 2324 31 r 0 0 0 0 0 0 0 0 rctt 0 0 0 0 0 0 0 0 rcc w reset 0000_0000_ 1111_1111 _0000_0000_0000_0000 offset 0xd_0e28 table 17-62. pertr field descriptions bits name description 0?7 ? reserved 8?15 rctt recovery threshold trigger. these bits provide the threshold value for the number of successful transmission error recoveries before reporting an error condition. 16?23 ? reserved 24?31 rcc recovery counter. maintains a count of the number of times the port has successfully recovered from a transmission error. an error is reported (pnfedr[ete] is set) if this value equals the value contained in the recovery threshold trigger field and if reporting is enabled (pnfedir[etd] is cleared). 0781516232431 r 0 0 0 0 0 0 0 0 rtt 0 0 0 0 0 0 0 0 rc w reset 0000_0000_ 1111_1111 _0000_0000_0000_0000 offset 0xd_0e2c
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-65 table 17-63 describes the fields of the prtr. 17.3.3 rapidio message unit registers this section describes rapidio outbound and inbound message registers, doorbell registers and port-write registers. refer to section 17.8, ?rapidio message unit,? for additional information about how these registers affect the message unit. 17.3.3.1 rapidio outbound message registers the registers in this section control rapidio outbound messages. the following sections provide descriptions of these registers. additional information may be found in the parallel rapidio interconnect specification . 17.3.3.1.1 outbound mode register (omr) the outbound mode register (omr) allows software to start a message operation and to control various message operation characteristics. figure 17-62 shows the omr. figure 17-62. outbound mode register (omr) table 17-63. prtr field descriptions bits name description 0?7 ? reserved 8?15 rtt retry threshold trigger. these bits provide the threshold value for the number of consecutive ack retries received for an outbound packet before reporting an error condition. 16?23 ? reserved 24?31 rc retry counter. maintains a count of the number of consecutive times the port has received an ack retry for an outbound packet. an error is reported (pnfedr[rte] is set) if this value equals the value contained in the retry threshold trigger field and if reporting is enabled (pnfedir[rtd] is cleared). 0 101112151619202122232425262728293031 r0000000000 0 des_sen 0000 cirq_siz 00 qoie qfie 0 qeie eie 00 mutm mui mus w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_1000
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-66 freescale semiconductor rapidio interface table 17-64 describes the fields of the omr. table 17-64. omr field descriptions bits name description 0?10 ? reserved 11 des_sen descriptor snoop enable 0 snooping of processor core disabled 1 snooping of the processor core when reading descriptors from memory enabled 12?15 ? reserved 16?19 cirq_siz circular descriptor queue size. determines the number of descriptors that can be placed in the circular queue without overflow. 0000 2 0001 4 0010 8 0011 16 0100 32 0101 64 0110 128 (4-kbyte page boundary) 0111 256 1000 512 1001 1024 1010 2048 1011?1111 reserved 20?21 ? reserved 22 qoie queue overflow interrupt enable. only applicable to chaining mode 0 no qo interrupt generated 1 generates an interrupt upon detection of a queue overflow (that is, the enqueue and dequeue pointers are no longer equal after being incremented by software and the queue was full) 23 qfie queue full interrupt enable. only applicable to chaining mode. 0 no qf interrupt generated 1 generates an interrupt when the queue transitions to full (that is, the enqueue and dequeue pointers are equal after being incremented by software) 24 ? reserved 25 qeie queue empty interrupt enable. only applicable to chaining mode 0 no qe interrupt generated 1 generates an interrupt at the completion of all outstanding message operations (that is, the enqueue and dequeue pointers are equal after an increment by the message unit controller) 26 eie error interrupt enable 0 no interrupt is generated if a programming or transfer error is detected. 1 generates an interrupt if a programming or transfer error is detected 27?28 ? reserved 29 mutm message unit transfer mode 0 message unit is configured to be in chaining mode 1 puts the message unit into direct mode. this means that software is responsible for placing all the required parameters into necessary registers to start the message transmission.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-67 17.3.3.1.2 outbound status register (osr) the outbound status register (osr), shown in figure 17-63 , reports various message unit conditions during and after a message operation. writing a 1 to a writable condition bit in osr clears it. figure 17-63. outbound status register (osr) table 17-65 describes the fields of the osr. 30 mui message unit increment. software sets mui after writing a descriptor to memory. hardware then increments the odqepar and clears this bit.always reads as 0 if mus is set 31 mus message unit start  direct mode: a 0 to 1 transition while the message unit is not busy (osr[mub] = 0) starts the message unit. a 1 to 0 transition has no effect.  chaining mode: a 0 to 1 transition while the message unit is not busy (osr[mub] = 0) initializes the message unit in chaining mode and causes the outbound descriptor queue dequeue pointer address to be stored as the base address of the circular descriptor queue. if mus is set, the message unit starts each time the enqueue and dequeue pointers are not equal and an overflow of the circular descriptor queue has not been detected. a 1 to 0 transition while the message unit is busy halts the message unit after the current descriptor is processed. the message unit must be re-initialized after this halt condition. 0101112 232425262728293031 r0 000000000 0qf00000000000 0 te 0 qoi qfi 0mub eomi qei w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_1004 table 17-65. osr field descriptions bits name description 0?10 ? reserved 11 qf queue full (read-only) 0 queue not full 1 the queue has become full. 12?23 ? reserved 24 te transaction error 0 no transaction error 1 there was an error condition during the message operation. the message unit has received a response error and halts. an interrupt is generated if omr[iei] is set (bit reset, write-one-to-clear, resuming message unit operation) 25 ? reserved table 17-64. omr field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-68 freescale semiconductor rapidio interface 17.3.3.1.3 outbound descriptor queue dequeue pointer address register (odqdpar) the outbound descriptor queue dequeue pointer address register (odqdpar), shown in figure 17-64 , contains the address of the first descriptor in memory to be processed. software must initialize this register to point to the first descriptor in memory. after processing this descriptor, the message unit controller increments the outbound descriptor queue dequeue pointer address (odqdpar[dqdpa] to point to the next descriptor. if the outbound descriptor queue enqueue pointer and the outbound descriptor queue dequeue pointer are not equal (indicating that the queue is not empty), the message unit controller reads the next descriptor from memory for processing. if the pointers are equal after the dequeue pointer has been incremented, the queue is empty and the message unit halts until the enqueue pointer is incremented by software. incrementing the pointer indicates that a new descriptor has been added to the queue and is ready for processing. if the queue becomes empty and omr[qeie] is set, osr[qei] is set and an interrupt is generated. 26 qoi queue overflow interrupt. only applicable to chaining mode. (bit reset, write-one-to-clear) 0 no overflow interrupt condition 1 queue overflow is detected and omr[qoie] is set. an interrupt is generated in this case 27 qfi queue full interrupt. only applicable to chaining mode. (bit reset, write-one-to-clear) 0 no queue full interrupt 1 the queue became full and omr[qfie] is set. an interrupt is generated in this case. 28 ? reserved 29 mub message unit busy (read-only) 0 message unit not busy. cleared when the message unit is no longer busy 1 a message operation is currently in progress. 30 eomi end-of-message interrupt. (bit reset, write-one-to-clear) 0 no end-of-message interrupt condition 1 after finishing this message operation, if odatr[eomie] is set, eomi is set and an interrupt is generated 31 qei queue empty interrupt. only applicable to chaining mode. (bit reset, write-one-to-clear) 0 no queue empty interrupt condition 1 when the last message operation in the outbound descriptor queue is finished, if omr[qeie] is set, then this bit is set and an interrupt is generated. otherwise, no interrupt is generated. table 17-65. osr field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-69 figure 17-64. outbound descriptor queue dequeue pointer address register (odqdpar) table 17-66 describes the fields of the odqdpar. 17.3.3.1.4 outbound unit source address register (osar) the outbound unit source address register (osar), shown in figure 17-65 , indicates the address from which the message unit controller is to read data. software must ensure that this is a valid local memory address. the address must be aligned to a double-word boundary, so the 3 lsbs are reserved. figure 17-65. outbound unit source address registers (osar) table 17-67 describes the fields of the osar. 0 26 27 31 r dqdpa 00000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_100c table 17-66. odqdpar field descriptions bits name description 0?26 dqdpa descriptor queue dequeue pointer address. contains the address of the first descriptor in memory to process. the descriptor must be aligned to a 32-byte boundary. 27?31 ? reserved 0 28 29 30 31 r sad snen 00 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_1014 table 17-67. osar field descriptions bits name description 0?28 sad source address. this is the source address of the message operation. 29 snen snoop enable 0 snooping of the processor core disabled 1 snooping of the processor core for data reads from local memory enabled 30?31 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-70 freescale semiconductor rapidio interface 17.3.3.1.5 outbound destination port register (odpr) the destination port register (odpr), shown in figure 17-66 , indicates the port to which the message unit controller is to send data. software must ensure that this is a valid port in the receiving device. figure 17-66. outbound destination port registers (odpr) table 17-68 describes the fields of the odpr. 17.3.3.1.6 outbound destination attributes register (odatr) the outbound destination attributes register (odatr) contains the transaction attributes to be used for the message operation. figure 17-67 shows the odatr. figure 17-67. outbound destination attributes register (odatr) table 17-69 describes the fields of the odatr. 0 29 30 31 r000000000000000000000000000000 mailbox w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_1018 table 17-68. odpr field descriptions bits name description 0?29 ? reserved 30?31 mailbox value for mbox field in message packet 01 2 3 4 5 6 1112 1516 2122 293031 r00 eomie 0 dtflowlvl 00000 0 dwritettype 000000 dtgtroute 00 w reset 0000_0000_0000_0110_0000_0000_0000_0000 offset 0xd_101c table 17-69. odatr field descriptions bits name description 0?reserved 1 ? reserved, hardwired to 0. 2 eomie end-of-message interrupt enable 0 end-of-message interrupt disabled 1 generates an interrupt upon completion of the current message operation.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-71 17.3.3.1.7 outbound double-word count register (odcr) the outbound double-word count register (odcr), shown in figure 17-68 , contains the number of double words for the message operation. the maximum message operation size is 4 kbytes and the minimum is 8 bytes. figure 17-68. outbound double-word count register (odcr) table 17-70 describes the fields of the odcr. 3?reserved 4?5 dtflowlvl transaction flow priority level 00 lowest priority transaction flow 01 next highest priority transaction flow 10 highest priority transaction flow 11 reserved 6?11 ? reserved 12?15 dwritettype hardwired to 0110 (message) 16?21 ? reserved 22?29 dtgtroute destination target route. contains the target route field of the transaction (device id of the target) 30?31 ? reserved 0 18 19 28 29 31 r0000000000000000000 dcr 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_1020 table 17-70. odcr field descriptions bits name description 0?18 ? reserved 19?28 dcr double-word count register. contains the number of double words for the message operation 00 0000 0000reserved 00 0000 00018 bytes 00 0000 001016 bytes 00 0000 010032 bytes 00 0000 100064 bytes 00 0001 0000128 bytes 00 0010 0000256 bytes 00 0100 0000512 bytes 00 1000 00001024 bytes 01 0000 00002048 bytes 10 0000 00004096 bytes all other values yield undefined behavior. 29?31 ? reserved table 17-69. odatr field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-72 freescale semiconductor rapidio interface 17.3.3.1.8 outbound descriptor queue enqueue pointer address register (odqepar) the outbound descriptor queue enqueue pointer address register (odqepar), shown in figure 17-69 , contains the address for the next descriptor in memory to be added to the queue. software must initialize this register to match the outbound descriptor queue dequeue pointer address. if a message is ready to be sent, software writes a descriptor to the next location in the queue (indicated by the address in odqepar), and then should set omr[mui]. the message unit then increments odqepar to point to the next descriptor location in memory and clears omr[mui]. this can result in a number of actions:  if the enqueue and dequeue pointers match, the queue is now full. if omr[qfie] is set, then osr[qfi] is set, and an interrupt is generated.  if the enqueue and dequeue pointer no longer match after the enqueue pointer has been incremented and the queue is full, then the queue overflows, and the message unit stops. if omr[qoie] is set, osr[qoi] is set and an interrupt is generated.  if the enqueue and dequeue pointer are the same before reading the register and no overflow condition is detected, the message unit controller starts (if enabled). figure 17-69. outbound descriptor queue enqueue pointer register (odqepar) table 17-71 describes the fields of the odqepar. 17.3.3.2 rapidio inbound message registers registers in this section describe the rapidio inbound message registers. 17.3.3.2.1 inbound mode register (imr) the inbound mode register (imr) allows software to enable the mailbox controller and to control various message operation characteristics. figure 17-70 shows the imr. 0 26 27 31 r dqepa 00000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_1028 table 17-71. odqepar field descriptions bits name description 0?26 dqepa descriptor queue enqueue pointer address. contains the address of the last descriptor in memory to process. the descriptor must be aligned to a 32-byte boundary. 27?31 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-73 figure 17-70. inbound mode register (imr) table 17-72 describes the fields of the imr. 0 10 11 12 1516 1920 22 23 24 25 26 27 29 30 31 r00000000000 sen frm_siz cirq_siz 000 qfie 0 miqie eie 000 mi me w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_1060 table 17-72. imr field descriptions bits name description 0?10 ? reserved 11 sen snoop enable 0 snooping of the processor core while writing messages into memory disabled 1 snooping of the processor core while writing messages into memory enabled 12?15 frm_siz message frame size. determines the maximum message size that can be accepted by this mailbox without error. this parameter combined with cirq_siz determine the maximum contiguous memory space allocated to the mailbox. 0000?0001 reserved 0010 8 bytes 0011 16 bytes 0100 32 bytes 0101 64 bytes 0110 128 bytes 0111 256 bytes 1000 512 bytes 1001 1024 bytes 1010 2048 bytes 1011 4096 bytes 1100? 1111 reserved 16?19 cirq_siz circular frame queue size. determines the number of message frames that can be placed in the circular queue without overflow. this parameter combined with frm_siz determines the maximum contiguous memory space allocated to the mailbox. 0000 2 0001 4 0010 8 0011 16 0100 32 0101 64 0110 128 (4 kbyte page boundary) 0111 256 1000 512 1001 1024 1010 2048 1011?1111 reserved 20?22 ? reserved 23 qfie queue full interrupt enable 0 no qfi interrupt is generated 1 generates an interrupt when the queue is full (that is, the enqueue and dequeue pointers are equal after the dequeue pointer was incremented by the mailbox controller) 24 ? reserved 25 miqie message in queue interrupt enable 0 no miq interrupt is generated 1 generates an interrupt when the queue transitions to not empty (that is, the enqueue and dequeue pointers are no longer equal after an increment by the mailbox controller)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-74 freescale semiconductor rapidio interface 17.3.3.2.2 inbound status register (isr) the inbound status register (isr), shown in figure 17-71 , reports mailbox conditions during and after a message operation. writing a 1 to a writable condition bit in isr clears it. figure 17-71. inbound status register (isr) table 17-73 describes the fields of the isr. 26 eie error interrupt enable 0 no interrupt is generated if a programming or transfer error is detected. 1 generates an interrupt if a programming or transfer error is detected 27?29 ? reserved 30 mi mailbox increment. software sets mi after processing an inbound message. when software sets this bit, hardware increments the ifqdpar and clears this bit. always reads as 0 while me is set 31 me mailbox enable 0 mailbox disabled 1 the mailbox has been initialized and can service incoming message operations. 0 101112 141516 2324252627282930 31 r0000000000 0 qf 000miq0 000000 0 te 00 qfi 0mb0 miqi w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_1064 table 17-73. isr field descriptions bits name description 0?10 ? reserved 11 qf queue full (read only) 0 queue is not full 1 if the queue becomes full, this bit is set. hardware clears this bit when software empties one or more entries. 12?14 ? reserved 15 miq message-in-queue (read only) 0 no message in queue 1 if the queue goes from empty to not empty, this bit is set. hardware clears this bit when software has emptied the queue. 16?23 ? reserved table 17-72. imr field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-75 17.3.3.2.3 inbound frame queue dequeue pointer address register (ifqdpar) the inbound frame queue dequeue pointer address register (ifqdpar), shown in figure 17-72 , contains the address for the first message in memory to be processed. software must initialize this register to the first frame location in memory. when a message has been processed, software sets imr[mi]. the mailbox controller then increments ifqdpar to point to the next frame in memory and clears mi. if the inbound frame queue enqueue pointer and the inbound frame queue dequeue pointer are not equal (indicating that the queue is not empty), software can read the next message frame from memory for processing. if the enqueue and dequeue pointers are equal after being incremented by software, the queue is empty and all outstanding messages have been processed. figure 17-72. inbound frame queue dequeue pointer address registers (ifqdpar) 24 te transaction error 0 no transaction error 1 set when there is an error condition during the message operation. an interrupt is generated if imr[iei] is set. (bit reset, write-one-to-clear) 25?26 ? reserved 27 qfi queue full interrupt. (bit reset, write-one-to-clear) 0 no queue full interrupt condition 1 if the queue becomes full and imr[qfie] is set, this bit is set and an interrupt is generated. 28 ? reserved 29 mb mailbox busy (read only) 0 cleared as a result of receiving an error or the completion of a message operation 1 when set indicates that a message operation is currently in progress. 30 ? reserved 31 miqi message-in-queue interrupt. (bit reset, write-one-to-clear) 0 no message-in-queue interrupt condition 1 if the queue goes from empty to not empty and imr[miqie] is set, this bit is set and an interrupt is generated. 0 28 29 31 r fqdpa 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_106c table 17-73. isr field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-76 freescale semiconductor rapidio interface table 17-74 describes the fields of the ifqdpar. 17.3.3.2.4 inbound frame queue enqueue pointer address register (ifqepar) the inbound frame queue enqueue pointer address register (ifqepar), shown in figure 17-73 , contains the address for the next message frame in memory to be added to the queue. software must initialize this register to match the frame queue dequeue pointer address. when the mailbox controller receives a message, it writes the message data to the next location in the queue (indicated by the address in ifqepar) and then increments ifqepar to point to the next frame location in memory. this can result in the following:  if the enqueue and dequeue pointers match, the queue is now full and the mailbox controller does not accept more incoming messages, returning retry responses to the sending devices until the queue is no longer full. if imr[qfie] is set, then isr[qfi] is set and an interrupt is generated.  if the enqueue and dequeue pointer were the same before the register was read, the queue has transitioned from empty to not empty. if imr[miqie] is set, isr[miqi] is set and an interrupt is generated. figure 17-73. inbound frame queue enqueue pointer address registers (ifqepar) table 17-75 describes the fields of the ifqepar. table 17-74. ifqdpar field descriptions bits name description 0?28 fqdpa frame queue dequeue pointer address. contains the address of the first message in memory to process 29?31 ? reserved 0 28 29 31 r fqepa 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_1074 table 17-75. ifqepar field descriptions bits name description 0?28 fqepa frame queue enqueue pointer address. contains the address of the next message frame to be added to the queue. 29?31 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-77 17.3.3.3 rapidio doorbell registers these registers control the rapidio doorbell unit. the following sections provide descriptions of these registers. 17.3.3.3.1 doorbell mode register (dmr) the doorbell mode register (dmr) allows software to enable the doorbell controller to control various doorbell operation characteristics. figure 17-74 shows the dmr. figure 17-74. doorbell mode register (dmr) table 17-76 describes the fields of the dmr. 0 10 11 12 1516 1920 22 23 24 25 26 27282930 31 r 0 000000000 0 sen 0000 cirq_siz 000 qfie 0 diqie eie 000 di de w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_1460 table 17-76. dmr field descriptions bits name description 0?10 ? reserved 11 sen snoop enable 0 snooping of the processor core while writing doorbell information into memory disabled 1 snooping of the processor core while writing doorbell information into memory enabled 12?15 ? reserved 16?19 cirq_siz circular doorbell queue size. determines the number of doorbell entries that can be place in the circular queue. cirq_siz*8 bytes determine the maximum contiguous memory space allocated to the doorbell unit. 0000 2 0001 4 0010 8 0011 16 0100 32 0101 64 0110 128 0111 256 1000 512 (4-kbyte page boundary) 1001 1024 1010 2048 1011?1111 reserved 20?22 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-78 freescale semiconductor rapidio interface 17.3.3.3.2 doorbell status register (dsr) the doorbell status register (dsr) reports various doorbell conditions after a doorbell operation. writing a 1 to the corresponding set bit clears it. figure 17-75 shows the dsr. figure 17-75. doorbell status register (dsr) table 17-77 describes the fields of the dsr. 23 qfie queue full interrupt enable 0 no qfi interrupt generated 1 generates an interrupt when the queue is full (that is, the enqueue and dequeue pointers are equal after the dequeue pointer was incremented by the doorbell controller) 24 ? reserved 25 diqie doorbell in queue interrupt enable 0 no diq interrupt generated 1 generates an interrupt when the queue transitions to not empty (that is, the enqueue and dequeue pointers are no longer equal after an increment by the doorbell controller) 26 eie error interrupt enable 0 no interrupt is generated if a programming or transfer error is detected. 1 generates an interrupt if a programming or transfer error is detected 27?29 ? reserved 30 di doorbell increment. software sets di after processing an inbound doorbell. when software sets di, hardware increments the dqdpar and clears di. always reads as 0 while de is set 31 de doorbell enable 0 doorbell disabled 1 the doorbell has been initialized and can service incoming doorbell operations. 0 101112 14 1516 2324252627282930 31 r00000000000qf0 0 0diq00000000 te 00 qfi 0db0 diqi w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_1464 table 17-77. dsr field descriptions bits name description 0?10 ? reserved 11 qf queue full (read only) 0 queue is not full 1 if the queue becomes full, this bit is set. hardware clears this bit when software empties one or more entry. table 17-76. dmr field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-79 17.3.3.3.3 doorbell queue/dequeue pointer address register (dqdpar) the doorbell queue dequeue pointer address register (dqdpar), shown in figure 17-76 , contains the double-word address for the first doorbell in memory to be processed. software must initialize this register to the first doorbell entry location in memory. when a current doorbell has been processed, software sets dmr[di]. the doorbell hardware then increments the dqdpar to point to the next doorbell in memory and clear dmr[di]. if the doorbell queue enqueue pointer and the doorbell queue dequeue pointer are not equal (indicating that the queue is not empty), software can read the next doorbell from memory for processing. if the enqueue and dequeue pointers are equal after being incremented by software, the queue is empty and all outstanding doorbells have been processed. 12?14 ? reserved 15 diq doorbell-in-queue (read only) 0 no doorbell-in-queue conditions 1 if the queue goes from empty to not empty, this bit is set. hardware clears this bit when software has emptied the queue. 16?23 ? reserved 24 te transaction error 0 there was no error condition during the doorbell operation. 1 there was an error condition during the doorbell operation. an interrupt is generated if dmr[iei] is set.(bit reset, write-one-to-clear) 25?26 ? reserved 27 qfi queue full interrupt 0 no queue full interrupt condition 1 the queue became full and the queue fill interrupt is enabled (imr[qfie] = 1). an interrupt is generated. (bit reset, write-one-to-clear). 28 ? reserved 29 db doorbell busy (read only) 0 cleared as a result of receiving an error or the completion of a doorbell operation 1 indicates that a doorbell operation is currently in progress 30 ? reserved 31 diqi doorbell-in-queue interrupt 0 no doorbell-in-queue interrupt condition 1 the queue went from empty to not empty and omr[diqie] is set. an interrupt is generated. (bit reset, write-one-to-clear) table 17-77. dsr field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-80 freescale semiconductor rapidio interface figure 17-76. doorbell queue dequeue pointer address registers (dqdpar) table 17-78 describes the fields of the dqdpar. 17.3.3.3.4 doorbell queue enqueue pointer address register (dqepar) the doorbell queue enqueue pointer address register (dqepar), shown in figure 17-77 , contains the double-word address for the next doorbell entry in memory to be added to the queue. software must initialize dqepar to match the doorbell queue dequeue pointer address. when the doorbell controller receives a packet, it writes the doorbell information to the next location in the queue (indicated by the address in dqepar) and then increments dqepar to point to the next doorbell location. this can result in the following:  if the enqueue and dequeue pointers match, then the queue is now full and the doorbell controller does not accept any more incoming doorbell packets, returning retry responses to the sending devices until the queue is no longer full. if dmr[qfie] is set, then dsr[qfi] is set and an interrupt is generated.  if the enqueue and dequeue pointer were the same before reading the register, the queue has transitioned from empty to not empty. if drm[miqie] is set, dsr[miqi] is set and an interrupt is generated. figure 17-77. doorbell queue enqueue pointer address register (dqepar) 0 28 29 31 r dqdpa 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_146c table 17-78. dqdpar field descriptions bits name description 0?28 dqdpa doorbell queue dequeue pointer address. contains the double-word address of the first doorbell in memory to process. 29?31 ? reserved 0 28 29 31 r dqepa 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_1474
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-81 table 17-79 describes the fields of the dqepar. 17.3.3.4 rapidio port-write registers these registers control the rapidio port-write unit. the following sections describe these registers. additional information may be found in the parallel rapidio interconnect specification . 17.3.3.4.1 port-write mode register (pwmr) the port-write mode register (pwmr) allows software to enable the port-write controller and to control various port-write operation characteristics. figure 17-78 shows the pwmr. figure 17-78. port-write mode register (pwmr) table 17-80 describes the fields of the pwmr. table 17-79. dqepar field descriptions bits name description 0?28 dqepa doorbell queue enqueue pointer address. contains the double-word address of the next doorbell location to be added to the queue 29?31 ? reserved 0 101112 22 23 24252627 2930 31 r 0 0 0 0 0 0 0 0 0 0 0 sen 0 0 0 0 0 0 0 0 0 0 0 qfie 0 0 eie 0 0 0 cq pwe w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_14e0 table 17-80. pwmr field descriptions bits name description 0?10 ? reserved 11 sen snoop enable 0 snooping the processor core while writing port-write data payload into memory disabled 1 snooping the processor core while writing port-write data payload into memory enabled 12?22 ? reserved 23 qfie queue full interrupt enable 0 no qfi interrupt generated 1 generates an interrupt when the queue becomes full (that is, the controller has written a port-write data payload into memory) 24?25 ? reserved 26 eie error interrupt enable 0 no interrupt is generated if a programming or transfer error is detected. 1 generates an interrupt if a programming or transfer error is detected
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-82 freescale semiconductor rapidio interface 17.3.3.4.2 port-write status register (pwsr) the port-write status register (pwsr), shown in figure 17-79 , reports various port-write conditions after a port-write operation. writing a 1 to a corresponding set bit clears the bit. figure 17-79. port-write status register (pwsr) table 17-81 describes the fields of the pwsr. 27?29 ? reserved 30 cq clear queue. set by software after processing an inbound port-write operation. hardware clears the previous port-write operation from the port-write queue and clears cc. always reads as 0 if pwe = 1. 31 pwe port-write enable 0 port-writes are disabled. 1 the port-write controller has been initialized and can service an incoming port-write operation. 0 101112 23242526 27 28 29 3031 r00000000000 qf 000000000000 te 00 qfi 0pwb0 0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_14e4 table 17-81. pwsr field descriptions bits name description 0?10 ? reserved 11 qf queue full (read only) 0 the queue is not full. 1 the queue became full. 12?23 ? reserved 24 te transaction error 0 no transaction error occurred 1 there was an error condition (the port-write transaction is greater than 64 bytes) during the port-write operation. an interrupt is generated if pwmr[iei] is set. (bit reset, write-one-to-clear) 25?26 ? reserved 27 qfi queue full interrupt. (bit reset, write-one-to-clear) 0 must be cleared by software after a port-write is serviced to re-enable the port-write controller 1 the queue became full and pwmr[qfie] is set. an interrupt is generated. 28 ? reserved table 17-80. pwmr field descriptions (continued) bits name description
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-83 17.3.3.4.3 port-write queue base address register (pwqbar) the port-write queue base address register (pwqbar), shown in figure 17-80 , contains the 64-byte cache line address for the port-write data payload. pwqbar must be initialized by software. figure 17-80. port-write queue base address register (pwqbar) table 17-82 describes the fields of the pwqbar. 17.4 functional description the following sections provide summaries of rapidio transactions, packets and control symbols. additional information may be found in the parallel rapidio interconnect specification . 17.4.1 rapidio transaction, packet, and control symbol summary table 17-83 summarizes the rapidio transaction types supported by the rapidio controller. the table lists the packet format type, the rapidio transaction, the transaction programming model, the processor operations that may cause the rapidio transaction, possible responses for the transactions, and comments that note rapidio-specific details associated with the transaction, or response. transactions that are not supported by the rapidio implementation are noted in the comments section of table 17-83 . 29 pwb port-write busy (read only) 0 cleared as a result of receiving an error or upon the completion of a port-write operation 1 indicates that a port-write operation is currently in progress 30?31 ? reserved 0 25 26 31 r pwqba 0 0 0 0 0 0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xd_14ec table 17-82. pwqbar field descriptions bits name description 0?25 pwqba port-write queue base address. contains the cache line address of the port-write data payload. 26?31 ? reserved table 17-81. pwsr field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-84 freescale semiconductor rapidio interface table 17-83. rapidio transaction summary packet format rapidio transaction programming model possible processor operations possible rapidio responses comments 2 non- intervention request class i/o read home gsm i = 1, m = 1 loads, and instruction fetches where the target of the request is a remote address space. m = 0 read type operations may also map to i/o read home. done, (data_only + done_interv) retry, error none 2 non- intervention request class nread io m = 0 read type operations where the target of the request is a remote address space done, error none atomic io m = 0 read type mapped operation done, error atomic transactions should map in the atmu to the ddr memory controller, or the behavior is boundedly undefined. 5 write class flush (with data) gsm m = 1, w = 1 or i = 1, store. m = 0 store type operation may also map to flush. done, retry, error none atomic swap io n/a n/a the rapidio controller does not support atomic swap transactions. nwrite io m = 0 store type operation n/a none nwrite_r io m = 0 store type operation done, error none 6 streaming write class swrite io m = 0 store type operation n/a none 8 maintenance class maintenance read all m = 0 read type operation done, error although possible, maintenance reads from memory locations outside of the rapidio architectural memory space (0xc_0000? 0xc_fffc) return unreliable data. maintenance write all m = 0 write type operation done, error none 10 doorbell class doorbell message passing m = 0 write type operation done, retry, error none
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-85 table 17-84 summarizes packet formats. the following definitions and figure 17-81 accompany the table.  pmf?physical maintenance field; prefixed to each packet format (see figure 17-81 )  type ?packet type (1, 2, 5, 6, 8, 10, 11, 13)  tarid ?target_id: the receiver?s id within its domain  srctid? packet transaction id  ttype?transaction type to be performed by the recipient  rdsize?read data size requested  wrsize?write data size requested  srcid?source_id: the packet sender?s id within its domain  addr?address for the requested operation  msb?most-significant byte  lsb ?least-significant byte  hopcnt?hop_count selects the distance into the switch network to access  config_offset?double-word offset into the car/csr register file  info?doorbell information field; provided and used by software only  msglen?total number of packets comprising the message  msgseg?portion of the message supplied by the packet  ssize?standard message packet data size  mbox?recipient mailbox number at the target device  letter?identifies message within the mailbox  status?packet response status field  tarinfo?target_info used for messages only. field length is 8 bits: letter (2) + mbox (2) + msgseg (4)  w?word pointer; used in the decoding of the transaction size 11 message class message message passing m = 0 write type operation done, retry, error none 13 response class response all n/a depends on the request table 17-83. rapidio transaction summary (continued) packet format rapidio transaction programming model possible processor operations possible rapidio responses comments
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-86 freescale semiconductor rapidio interface figure 17-81. physical maintenance field (pmf) definition table 17-84. rapidio packet format summary (tt = 0b00) type packet format 2 (0010) request to home: ttype:0010 (i/o read home); 0100 (nread); 1100 (atomic_inc); 1101 (atomic_dec); 1110 (atomic_set); 1111 (atomic_clr) 5 (0101) write class: ttype:0001 (flush); 0010?0011 (reserved); 0100 (nwrite); 0101 (nwrite_r); 0110?0111 (reserved); s=0 ackid 0100 prio 13 42 2 tt=00 type tarid srcid ttype rdsize srctid address 4448 88 address w 2 1 29 12 pmf type tarid srcid ttype srctid address 448 msb for dw0 --> lsb for dwn 88 4 wrsize w address 29 1 2 pmf 12
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-87 6 (0110) streaming-write class: 8 (1000) maintenance class request: ttype: 0000 (read); 0001 (write): 0100 (port-write) maintenance class response: ttype: 0010 (read response); 0011 (write response) status: 0000 (done); 0111 (error); 10 (1010) doorbell class: table 17-84. rapidio packet format summary (tt = 0b00) (continued) type packet format type tarid srcid 4 msb for dw0 --> lsb for dw n address 8829 address 2 1 pmf 12 type tarid srcid ttype rdsize srctid 4448 8 msb for dw0 --> lsb for dwn hopcnt config_offset 88 21 w 2 1 pmf 12 pmf type tarid srcid ttype status 44 8 msb for dw0 --> lsb for dwn tartid 88 4 24 hopcnt 8 12 pmf type tarid srcid srctid 4 8 888 info 16 12
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-88 freescale semiconductor rapidio interface table 17-85 summarizes the defined control symbols. implementation details for this particular rapidio controller are noted in the comments section of the table. 11 (1011) message class: 13 (1101) response class: status: 0000 (done); 0001 (data only); 0011 (retry); 0101 (done intervention); 0110 (reserved); 0111 (error); 1000?1011 (reserved); 1100? 1111 (user) ttype: 0000 (request resp); 0001 (message resp); 1000 (request resp with data) table 17-85. control symbol formats symbol type symbol format comments 0 (000) packet accepted: the rapidio controller sets buf_status to 0xf when it generates a packet accepted control symbol. 1 (001) packet retry: none 2 (010) packet not accepted: cause 000 encountered internal error 001 received unexpected ackid on packet 010 uncorrectable error on control symbol 011 input port has been stopped 100 received bad crc on packet 111 general error table 17-84. rapidio packet format summary (tt = 0b00) (continued) type packet format pmf type tarid srcid msglen 442 msb for dw0 --> lsb for dwn ssize 4 letter mbox 2 msgseg 4 88 12 pmf type tarid srcid ttype 4 msb for dw0 --> lsb for dwn status 4 4 tartid 8 88 12 s=1 tgtackid 00000 buf_status 000 3 1543 s=1 tgtackid 0000 001 3 1543 00000 s=1 tgtackid cause 010 3 1533 1 1 00000
rapidio functionality MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-89 17.5 rapidio functionality this section describes rapidio general device functionality, common transport layer functionality, and logical layer functionality. 17.5.1 general functionality lists the general device functionality lists are applicable to devices of all classes, including switch devices without end points. the following tables list the functions that the rapidio controller supports. 4 (100) packet control: sub_type (contents) 000 idle (the rapidio controller sets to 1111) 001 stomp (unused) 010 eop (the rapidio controller sets to 1111) 011 restart from retry (unused) 100 throttle (number of aligned pacing idles) 101 tod-sync (number of max sized packets) 5 (101) link request: the rapidio controller sets buf_status to 0xf when it generates a link request command. 000 send training 010 override width 011 reset 100 input status note that the rapidio controller causes a checkstop if a software-initiated send training link request command collides with an inbound send training link request which is immediately followed by an inbound training pattern. 6 (110) link response: ack status 000 expecting ackid 0 001 expecting ackid 1 .... 111 expecting ackid 7 link status 0000 un-initialized 0001 initializing 0010 error 0011 stopped 0100 retry-stopped 0101 error-stopped 1000 valid, ackid 0 .... 111 valid, ackid 7 table 17-85. control symbol formats (continued) symbol type symbol format comments s=1 sub_type contents 100 3 1543 00000 s=1 cmd buf_status 100 3 1543 00000 s=1 ack_stat link_stat 100 3 1543 00000
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-90 freescale semiconductor rapidio interface table 17-86 lists general requirements for a rapidio-compliant device. table 17-86. general device functionality list item no. item functionality meets reqs? 1 all device generated packets adhere to the bit streams defined in the appropriate logical, transport, and physical layer specifications. y 2 all device-generated control symbols adhere to the bit streams defined in the physical layer specification. y 3 device assigns reserved packet fields to logic 0s y 4 device does not use reserved packet formats y 5 reserved packet field contents are ignored. y 6 device never assigns reserved encodings for packet fields y 7 implementation-defined packet fields are ignored unless the function is understood by the receiving device. y 8 received reserved packet field encodings are ignored if it is not necessary for the field to be defined for the requested transaction. y 9 reads to reserved car bits return logic 0s. y 10 writes to reserved car bits are ignored. y 11 reads to implementation-defined car bits return the implementation defined value. y 12 writes to implementation-defined car bits are ignored. y 13 reads to reserved cars do not cause an error. y 14 reads to reserved cars return logic 0s when read. y 15 writes to reserved cars do not cause an error. y 16 writes to reserved cars are ignored. y 17 reads to reserved csrs and extended features register bits return logic 0s. y 18 writes to reserved csrs and extended features register bits are ignored. y 19 reads to implementation-defined csr and extended features register bits return the implementation defined value. y 20 writes to implementation-defined csr and extended features register bits are determined by the implementation. y 21 reads to reserved csrs and extended features registers do not cause an error. y 22 reads to reserved csrs and extended features registers return logic 0s when read. y 23 writes to reserved csrs and extended features registers do not cause an error. y 24 writes to reserved csrs and extended features registers are ignored. y 25 reads and writes to implementation-defined registers and register bits are implementation-defined. y
rapidio functionality MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-91 17.5.1.1 8/16 lp-lvds layer functionality lists the physical layer 8/16 lp-lvds (low-power, low-voltage differential signaling) layer functionality is subdivided into individual lists. table 17-87 lists requirements for basic 8/16 lp-lvds physical layer functionality for the device. note that for device id-related functions, the device id for the rapidio controller is set by power-on reset signals as described in section 4.4.3.11, ?rapidio device id.? table 17-87. general device 8/16 lp-lvds physical layer basic functionality list item no. item functionality meets reqs? 1 clk signal(s) rising edge is on the 32-bit boundary y 2 clk signal(s) toggle every clock (true free running clock). y 3 rio_tframe/rio_rframe signal only toggles on the 32-bit boundary y 4 rio_tframe/rio_rframe signal only toggles to mark the first byte of a control symbol or the first byte of a new packet y 5 rio_rframe/rio_tframe signal is associated with rio_rclk/rio_tclk y 6 device meets target ac specifications y 7 device follows the link initialization and training procedure y 7a action: device responds to link-request/send-training control symbol with 256 training patterns followed by at least one idle control symbol y 7b detail: device port is enabled to transmit or receive packets only after device is both sending and receiving idle control symbols y 7c detail: training pattern is not embedded in a packet or used to terminate a packet y 8 training symbol is correct for port width y 9 16-bit ports can function as 8-bit ports y 10 control symbols are 16 bits followed by an inverted 16-bit copy. y 11 undefined control symbols are treated as idle control symbols. y 12 device responds to a throttle control symbol with a pacing idle control symbol within the specified 60 data ticks time y 13 device follows native rapidio ordering rules at flow level 1 y 13a. detail: read packets are transmitted at priority level 1. y 13b. detail: write packets are transmitted at priority level 1. y 13c. detail: response packets are transmitted at priority level 1, 2, or 3. y 13d. detail: packets of the same priority level cannot pass each other. y 13e. detail: packets of higher priority may pass packets of a lower priority level. y
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-92 freescale semiconductor rapidio interface 14 all registers in the 8/16 lp-lvds physical layer specification extended features data structure can be read and written. y 14a. detail: port maintenance block header 0 csr; reset value is implementation-dependent (read only) y 14b. detail port maintenance block header 0 csr has the proper extended features block id y 14c. detail: port link time-out control csr; reset value is 0xffff_ffff y 14d. detail: port response time-out control csr; reset value is 0xffff_ffff (end point devices only) y 14e. detail: port general control csr; reset value is implementation dependent y 14f. detail: port 0 error and status csr; reset value is 0x0000_0001 y 14g. detail: port 0 control csr; reset value is implementation dependent y 15 device follows system initialization and exploration inter-operability procedure y 15a. action: end point agent device that contains a boot rom is initially assigned base device id = 0xfe at power-on reset y 15b. action: end point agent device without a boot rom is initially assigned base device id = 0xff at power-on reset y 15c. action: system host device is initially assigned a non-reserved base device id at power-on reset (end point device only) y 15d. action: host device sets pgccsr[d] at power-on reset (end point device only) y 15e. action: agent device resets pgccsr[d] at power-on reset (end point device only) y 15f. action: host device sets the master enable bit (pgccsr[m]) at power-on reset (end point device only) y 15g. action: agent device resets the master enable bit (pgccsr[m]) at power-on reset (end point device only) y 15h. action: end point device responds to all received maintenance request packets y 15i. action: device with switch functionality defaults route information to allow boot rom access by system host y 15j. action: switch device sends maintenance responses that it generates to the port that the maintenance request was received on y table 17-87. general device 8/16 lp-lvds physical layer basic functionality list (continued) item no. item functionality meets reqs?
rapidio functionality MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-93 table 17-88 lists requirements for link maintenance functionality and the compliance of the rapidio controller. table 17-89 lists requirements for the device while transmitting a packet (a general device is required to generate response packets) and the compliance of the rapidio controller. table 17-88. general device 8/16 lp-lvds physical layer link maintenance list item no. item functionality meets reqs? 1 link-request/input-status control symbol causes a link-response control symbol y 2 link-response control symbol link_status field indicates input port status y 2a. detail: uninitialized means disabled y 2b. detail: initializing means following the training sequence. y 2c. detail: error means unrecoverable problem encountered; no packets are accepted. y 2d. detail: retry-stopped means that input port is stopped due to a retry; no packets are accepted until receiving a restart-from-retry or a restart-from-error control symbol. y 2e. detail: error-stopped means that input port is stopped due to a transmission error; no packets are accepted until receiving a restart-from-error control symbol. y 2f. detail: stopped means that input is stopped for some other (not retry or transmission error) reason; no packets are accepted. y 2g. detail: ok means that the input port is operating and can communicate with the connected device. y 3 link-request/send-training control symbol causes 256 training patterns to be sent y 4 link-request/reset control symbol causes the device to reset after four requests y 5 link-request/input-status, link-response control symbol pair forces completion of all preceding activity y 5a. detail: all preceding packets have generated acknowledge control symbol if applicable. y 5b. detail: returned link_status correctly indicates next expected ackid y 6 device does not issue more than one outstanding link-request control symbol (except in case of time-out) y 6a. detail: device holds off another link-request control symbol until expected link-response control symbol is received y table 17-89. general device 8/16 lp-lvds physical layer p acket transmission list item no. item functionality meets reqs? 1 device cannot issue more than 8 unacknowledged packets y 2 ackids are always issued sequentially unless a retry or error causes the device to back up. y 3 start with ackid = 0 after reset. y 4 physical layer 3 reserved bits are cleared. y
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-94 freescale semiconductor rapidio interface table 17-90 lists the requirements for the device to receive a packet. 5 a response packet for a request packet never transmitted before the acknowledge control symbol for the request packet. y 6 embedded crc properly inserted y 7 packets that are not aligned to the 32-bit boundary are padded into alignment with 16 bits of logic 0. y 8 crc values are correctly calculated. y 9 switch devices preserve error coverage internally. y 10 packets are completed normally with a new packet or eop control symbol. y 11 packets are canceled using stomp, restart-from-retry, or link-request control symbols. y 12 stomp and restart-from-retry control symbols have the cause field set to all logic 0s. y 13 device receiving packet-retry control symbol follows the defined retry behavior. y 13a. action: moves from the port ok state to the output retry-stopped state when a packet-retry control symbol is received y 13b. action: completes transmission of current packet if applicable; don?t transmit new packets y 13c. action: sends a restart-from-retry control symbol to the receiving device y 13d. action: moves from the output retry-stopped state to the port ok state upon completion of the output port internal retry recovery procedure y 13e. action: begins retransmitting packets from the returned expected ackid value y 13f. detail: retried packet is eventually re-transmitted (end point devices only; not true for cut-through switch devices) y table 17-90. general device 8/16 lp-lvds physical layer p acket reception list item no. item functionality meets reqs? 1 ackids are only accepted sequentially. y 2 starts with ackid = 0 after reset y 3 every packet causes an acknowledge control symbol with the corresponding ackid field. y 4 device sends acknowledge control symbols in same order as packets are received (ackids are issued sequentially) y 5 device does not send a packet-accepted control symbol before the entire packet has been received and is error free (if error checking is enabled) y 6 physical layer 3 reserved bits are ignored. y 7 packets can be completed normally with a new packet or eop control symbol. y 8 the cause field in stomp and restart-from-retry control symbols is ignored. y table 17-89. general device 8/16 lp-lvds physical layer p acket transmission list (continued) item no. item functionality meets reqs?
rapidio functionality MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-95 recoverable errors are typically transmission errors or physical layer protocol violation errors, and the recovery algorithm can be used to maintain communications on the link without losing any data. a compliant device must recover from a single error. recovery from multiple errors is not required. the device is always the target for error detection. 9 device can accept embedded control symbols y 9a. detail: packet-accepted control symbol y 9b. detail: packet-retry control symbol y 9c. detail: packet-not-accepted control symbol y 9d. detail: idle control symbol y 9e. detail: throttle control symbol y 9f. detail: tod-sync control symbol y 9g. detail: link-response control symbol y 10 tod-sync control symbol is treated as idle control symbol if tod-sync control symbol is not supported y 11 packets can be canceled using stomp, restart-from-retry, or link-request control symbols. y 11a action: device sends packet-retry control symbol for canceled packet (exception: do not send packet-retry control symbol while already in input retry-stopped or input error-stopped states) y 12 device encountering a packet retry situation follows the defined retry behavior y 12a. detail: packet retry situation is an internal hazard or a canceled packet (exception: packet canceled with a link-request control symbol does not follow retry behavior) y 12b. action: moves from the port ok state to the input retry-stopped state upon detection of a packet retry situation y 12c. action: sends a packet-retry control symbol with the expected ackid value y 12d. detail: device silently discards packets while in the input retry-stopped state y 12e. detail: device detects control symbol errors while in input retry-stopped state y 12f. action: moves from the input retry-stopped state to the port ok state upon reception of a restart-from-retry or a restart-from-error (link-request/input-status) control symbol y 13 accepting an input packet of a priority is not contingent on successfully transmitting a packet of a less than or equal priority y 14 a generated packet-not-accepted control symbol uses a defined cause field encoding. y table 17-90. general device 8/16 lp-lvds physical layer p acket reception list (continued) item no. item functionality meets reqs?
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-96 freescale semiconductor rapidio interface table 17-91 lists recoverable errors at the physical layer. table 17-91. general device 8/16 lp-lvds physical layer recoverable errors list item no. item functionality meets reqs? 1 requested training pattern is embedded in a packet or used to terminate a packet y 1a. action: moves from the port ok state to the input error-stopped state y 1b. action: sends a packet-not-accepted control symbol to the sending device y 1c. action: device silently discards all packets until a restart-from-error (link-request/input-status) control symbol is encountered y 1d: action: moves from the input error-stopped state to the port ok state y 2 device encounters s-bit parity failure y 2a. action: moves from the port ok state to the input error-stopped state y 2b. action: sends a packet-not-accepted control symbol to the sending device y 2c. action: device silently discards all packets until a restart-from-error (link-request/input-status) control symbol is encountered y 2d: action: moves from the input error-stopped state to the port ok state y 3 device encounters incorrect crc for a packet y 3a. action: moves from the port ok state to the input error-stopped state y 3b. action: sends a packet-not-accepted control symbol to the sending device y 3c. action: device silently discards all packets until a restart-from-error (link-request/input-status) control symbol is encountered y 3d: action: moves from the input error-stopped state to the port ok state y 4 device encounters unexpected ackid value in a packet y 4a. action: moves from the port ok state to the input error-stopped state y 4b. action: sends a packet-not-accepted control symbol to the sending device y 4c. action: device silently discards all packets until a restart-from-error (link-request/input-status) control symbol is encountered y 4d: action: moves from the input error-stopped state to the port ok state y 5 device encounters a packet that exceeds the 256 byte maximum packet size limit y 5a. action: moves from the port ok state to the input error-stopped state y 5b. action: sends a packet-not-accepted control symbol to the sending device y 5c. action: device silently discards all packets until a restart-from-error (link-request/input-status) control symbol is encountered y 5d: action: moves from the input error-stopped state to the port ok state y
rapidio functionality MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-97 6 device encounters a corrupt control symbol y 6a. action: moves from the port ok state to the input error-stopped state y 6b. action: sends a packet-not-accepted control symbol to the sending device y 6c. action: device silently discards all packets until a restart-from-error (link-request/input-status) control symbol is encountered y 6d: action: moves from the input error-stopped state to the port ok state y 7 device detects protocol violations y 7a. detail: any acknowledge control symbol with an unexpected ackid value y 7b. detail: unsolicited acknowledge control symbol y 7c. detail: received packet-accepted control symbol before packet transmission has completed n 7d. detail: received link-request control symbol before sending link-response control symbol for previous link-response/input-status control symbol y 7e. detail: unexpected link-response control symbol y 7f. detail: unexpected restart-from-retry control symbol y 7g. detail: unexpected training pattern y 7h. detail: unexpected stomp control symbol y 7i. detail: unexpected eop control symbol y 8 device encounters a protocol violation. y 8a. action: moves from the port ok state to the output error-stopped state. y 8b.action: device stops transmitting new packets y 8c. action: device sends link-request/input-status (restart-from-error) control symbol if no link-request control symbol is already outstanding (must wait for previous one to complete) and waits for link-response control symbol y 8d. action: moves from the output error-stopped state to the port ok state y 8e. action: starts re-transmitting at the ackid value returned with the received link-response control symbol y 9 device encounters a packet-not-accepted control symbol y 9a. action: moves from the port ok state to the output error-stopped state y 9b.action: device stops transmitting new packets y 9c. action: device sends link-request/input-status (restart-from-error) control symbol if no link-request control symbol is already outstanding (must wait for previous one to complete) and waits for link-response control symbol y 9d. action: moves from the output error-stopped state to the port ok state y 9e. action: starts re-transmitting at the ackid value returned with the received link-response control symbol y table 17-91. general device 8/16 lp-lvds physical layer recoverable errors list (continued) item no. item functionality meets reqs?
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-98 freescale semiconductor rapidio interface relatively few nonrecoverable errors occur at the physical layer. behavior of the interface is not defined for these events. table 17-92 lists nonrecoverable errors at the physical layer. 17.5.2 common transport layer functionality lists the common transport layer functionality is subdivided into individual lists. table 17-93 lists the basic functionality for the device at the common transport layer and the compliance of the rapidio controller. 10 device encounters an acknowledge control symbol time-out y 10a. action: moves from the port ok state to the output error-stopped state y 10b. action: device stops transmitting new packets y 10c. action: device sends link-request/input-status (restart-from-error) control symbol if no link-request control symbol is already outstanding (must wait for previous one to complete) and waits for link-response control symbol y 10d. action: moves from the output error-stopped state to the port ok state y 10e. action: starts re-transmitting at the ackid value returned with the received link-response control symbol y 11 device encounters any transmission error during error recovery y table 17-92. general device 8/16 lp-lvds physical layer nonrecoverable errors list item no. item functionality meets reqs? 1 device does not respond to link-request/send-training control symbol with 256 training patterns followed by at least one idle control symbol y 2 late or no response to throttle request n 3 device is attempting error recovery and ackid received in link-response control symbol does not make sense (device cannot complete recovery) y 4 time-out between link-request control symbol and link-response control symbol y 5 device port transmits packets before device is both sending and receiving idle control symbols y 6 any transmission error encountered during error recovery y table 17-91. general device 8/16 lp-lvds physical layer recoverable errors list (continued) item no. item functionality meets reqs?
rapidio functionality MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-99 table 17-94 lists the functionality for this controller in transmitting a packet (a slave device is required to generate response packets). table 17-95 lists the functionality for this controller in receiving a packet. logical layer errors are generally not recoverable in hardware. they may be recoverable in software. the device is always the target of a packet for error detection. table 17-96 lists detectable errors. table 17-93. general device common transport layer basic functionality list item no. item functionality meets reqs? 1 all necessary csrs (command and status registers) exist and can be read. y 1a. detail: base device id csr; reset value is application and implementation dependent (end point devices only) y 1b. detail: host base device id lock csr; host_base_deviceid field reset value is 0xffff y 1c. detail: component tag csr; reset value is 0x0000_0000 y 2 writable csr fields can be written y table 17-94. general device common transport layer packet transmission list item no. item functionality meets reqs? 1 tt field is always logic 0s (small device id fields) y 2 end point-free switch responds to maintenance requests with the c_count = 0 when received, otherwise decrement hop_count and route to proper output port y 3 maintenance response packets are issued with the hop_count field set to 0xff y table 17-95. general device common transport layer packet reception list item no. item functionality meets reqs? 1 response packets are sent with the target and destination fields reversed from the corresponding request packet y table 17-96. general device common transport layer detectable errors list item no. item functionality meets reqs? 1 received reserved tt field encoding y
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-100 freescale semiconductor rapidio interface 17.5.3 logical layer functionality lists the logical layer functionality is subdivided into individual lists. table 17-97 lists the requirements for basic device functionality and the compliance of this controller. a class 1 device is always the target of a request transaction. table 17-97. general device logical layer basic functionality list item no. item functionality meets reqs? 1 the address field of a packet is a double-word (8 byte) aligned address. y 2 multiple double-word data payloads are linear starting at the specified address. y 3 multiple double-word data payloads are aligned to a double-word boundary. y 4 multiple double-word data payloads are not required to be aligned to the transfer size boundary. y 5 sub-double-word data payloads have a defined data payload, properly aligned and padded to a double-word boundary. y 6 response packets have the transaction id of the associated request packet. y 7 responses that are not expected to have a data payload must not have a data payload. y 8 responses may not contain a data payload if the response status is error. y 9 all necessary cars (capabilities registers) exist and can be read. y 9a. detail: device identity car; value is vendor- and implementation-dependent. y 9b. detail: device information car; value is vendor- and implementation-dependent y 9c. detail: assembly identity car; value is vendor- and implementation-dependent y 9d. detail: assembly information car; value is vendor- and implementation-dependent y 9e. detail: processing element features car; value is implementation-dependent; must indicate support for 34-bit address format packets y 9f. detail: switch port information car; value is implementation-dependent (switch devices only) y 9g. detail: source operations car; value is implementation-dependent (end point devices only) y 9h. detail: destination operations car; value is implementation-dependent (end point devices only). y 10 all necessary csrs (command and status registers) exist and can be read. y 10a. detail: processing element logical layer control csr: reset value of the extended addressing control field is 0b001 (end point devices only) y 11 writable csr fields can be written. y 12 all registers in the extended features data structure are double-word (8 byte) aligned (the three lsbs of the extended features pointers must be logic zeros). y 13 all extended features blocks lie within the extended features space in the register address map. y 14 extended features list is terminated with an extended features pointer value of logic zeros y
rapidio functionality MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-101 table 17-98 lists requirements for this controller when functioning as a transaction target. 17.5.3.1 logical layer source transaction support list general functionality does not require a device to initiate any operations. logical layer errors are generally not recoverable in hardware. they may be recoverable in software. the device is always the target of a packet for error detection. table 17-99 lists the errors detected by the rapidio controller. 17.5.3.2 logical layer extended functionality the rapidio controller supports i/o read and flush with data gsm transactions, and all i/o and message transactions as described by the parallel rapidio interconnect specification except for atomic test and swap and atomic swap transactions. table 17-98. general device logical layer target transaction support list item no. item functionality meets reqs? 1 maintenance read transaction y 1a. detail: maintenance read request may be for 4 bytes y 1b. detail: maintenance read request generates a maintenance read response y 1c. detail: maintenance read response data payload is 4 bytes y 2 maintenance write transaction y 2a. detail: maintenance write request may be for 4 bytes y 2b. detail: maintenance write request generates a maintenance write responses y 2c. detail: maintenance write response does not contain a data payload y table 17-99. general device logical layer detectable errors list item no. item functionality meets reqs? 1 maintenance write packet data payload exceeds size specified in wrsize field y 2 maintenance write packet data payload exceeds supported size y 3 received maintenance read packet has a data payload y 4 received maintenance write packet has no data payload y 5 received maintenance packet uses a reserved field encoding for a required field y 6 received maintenance packet uses illegal combinations of field encodings y
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-102 freescale semiconductor rapidio interface 17.6 rapidio errors rapidio errors are classified under three categories:  recoverable errors?the rapidio controller supports hardware error detection and recovery mechanism as specified in the parallel rapidio interconnect specification . the rapidio controller detects and attempts to recover from corrupt packet and control symbol errors and general protocol errors. in these cases, the appropriate bit is set in the rapidio recoverable error detect register. logging of information in capture registers may or may not take place. see table 17-100 for specifics regarding the rapidio controller.  notification errors?the rapidio controller detects many hardware nonrecoverable errors that are non-fatal such as exceeded threshold counts (as defined in pertr and prtr). upon detection of a notification error the appropriate bit is set in the port notification/fatal error detect register (pnfedr) and an interrupt is generated if enabled in the port notification/fatal error interrupt enable register (pnfeier). hardware continues to operate after notification errors.  fatal errors?the rapidio controller also detects a number of fatal errors that are hardware nonrecoverable, such as time-outs. upon detection of a fatal error, relevant information may be logged (pecsr[v] indicates successful capture) in the error packet capture registers (epcr n ) if the appropriate error detect is enabled (pnfedir). an interrupt is generated if the appropriate fatal error interrupt is enabled in the port notification/fatal error interrupt enable register (pnfeier). the rapidio hardware either goes into training mode, or remains in the ok state based on the error type. if the valid bit of the port error capture status register (pecsr[v]) is set, the information in error packet capture registers epcr0?epcr3 is valid: fatal errors caused by a bad link invoke training in an attempt to recover the link. if communication is not re-established, a reset is required to reconcile rapidio?s internal queues to resume normal operation. table 17-100 lists the recoverable errors detected by the rapidio implementation and the resulting actions taken. table 17-100. recoverable errors detected by rapidio controller error description action capture registers inbound corrupt control symbol received a control symbol in which true does not match complement counterpart sends ?packet_not_ accepted? ack with ?error on control symbol? cause no information logged in capture register(s) inbound packet/control symbol with s-bit parity error received a packet or a control symbol with an s-bit parity error sends ?packet_not_ accepted? ack with ?s-bit parity error? cause no information logged in capture register(s) inbound out-of-sequence ack symbol received an ack control symbol with an unexpected ackid starts link recovery process no information logged in capture register(s)
rapidio errors MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-103 inbound packet with unexpected ackid received packet with unexpected ackid value (out-of-sequence ackid) sends ?packet_not_ accepted? ack with ?received unexpected ackid with packet? cause no information logged in capture register(s) inbound packet with bad crc received packet with a bad crc value sends ?packet_not_ accepted? ack with ?bad crc? cause no information logged in capture register(s) embedded training requested training pattern is embedded in a packet sends ?packet_not_ accepted? ack with ?general error? cause no information logged in capture register(s) inbound packet exceeds 256 bytes received packet that exceeds the maximum allowed size by the parallel rapidio interconnect specification . this controller performs this function by detecting a data payload greater than 256 bytes. sends ?packet_not_ accepted? ack with ?general error? cause no information logged in capture register(s) packet-not-accepted: encountered internal error received ack control symbol with packet-not-accepted of type ?encountered internal error? starts link recovery process. no information logged in capture register(s) packet-not-accepted: unexpected ackid on packet received ack control symbol with packet-not-accepted of type ?unexpected ackid? starts link recovery process. no information logged in capture register(s) packet-not-accepted: corrupt control symbol received ack control symbol with packet-not-accepted of type ?corrupt control symbol? starts link recovery process. no information logged in capture register(s) packet-not-accepted: input port stopped received ack control symbol with packet-not-accepted of type ?input port stopped? starts link recovery process. no information logged in capture register(s) packet-not-accepted: bad crc received ack control symbol with packet-not-accepted of type ?bad crc? starts link recovery process. no information logged in capture register(s) packet-not-accepted: s-bit parity error received ack control symbol with packet-not-accepted of type ?s-bit parity error? starts link recovery process. no information logged in capture register(s) packet-not-accepted: general error received ack control symbol with packet-not-accepted of type ?general error?. this error type could be created because of header/data problems at the receiver. starts link recovery process. no information logged in capture register(s) unexpected restart-from-retry symbol received a restart-from-retry control symbol while in the ?ok? state starts link recovery process. no information logged in capture register(s) unsolicited ack symbol received an ack control symbol while no packets are outstanding on the ack history queue starts link recovery process no information logged in capture register(s) table 17-100. recoverable errors detected by rapidio controller (continued) error description action capture registers
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-104 freescale semiconductor rapidio interface table 17-101 lists the notification errors detected by the rapidio implementation and the resulting actions taken. ack before restart-from-retry received an ack control symbol after receiving an ack retry and before sending a restart-from-retry starts link recovery process no information logged in capture register(s) unexpected training symbol received a training symbol while in the ?ok state? starts link recovery process no information logged in capture register(s) unexpected stomp symbol received a stomp control symbol while there is no packet being received starts link recovery process no information logged in capture register(s) unexpected link response symbol received a link response control symbol while there is no outstanding request. starts link recovery process no information logged in capture register(s) unexpected eop symbol received an eop control symbol while there is no packet being received starts link recovery process no information logged in capture register(s) link request error received a link request control symbol before the previous link request has been serviced. starts link recovery process no information logged in capture register(s) frame toggle alignment received frame signal toggles at a non 32-bit boundary sends ?packet_not_accepted ? ack with ?general error? type no information logged in capture register(s) frame toggle edge received frame signal toggles on the negative edge of the clock sends ?packet_not_accepted ? ack with ?general error? type no information logged in capture register(s) ack time-out an ack control symbol is not received within the specified time-out interval. starts link recovery process no information logged in capture register(s) table 17-101. notification errors detected by rapidio controller error description action capture registers error recovery threshold error error recovery threshold count (defined in pertr[rctt]) exceeded generates interrupt if enabled (pnfeier[etie] is cleared) no information logged in capture register(s) retry threshold error consecutive ack retry threshold count (defined in prtr[rtt]) exceeded generates interrupt if enabled (pnfeier[rtie] is cleared) no information logged in capture register(s) received request error response received a response of type error for anything other than a message generates interrupt if enabled (pnfeier[rerie] is cleared) information logged in sysint capture registers. table 17-100. recoverable errors detected by rapidio controller (continued) error description action capture registers
rapidio errors MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-105 table 17-102 lists the fatal errors detected by the rapidio implementation and the resulting actions taken. table 17-102. fatal errors detected by rapidio controller error description action capture registers link response time-out a link response is not received within the specified time-out interval. generates interrupt if enabled (pnfeier[ltie] is cleared) no information logged in capture register(s) resume training on the interface. packet response time-out a packet response is not received within the specified time-out interval. generates interrupt if enabled (pnfeier[rstie] is cleared) no information logged in capture registers. missing idle after training idle not received after a requested training sequence completes generates interrupt if enabled (pnfeier[ntiiie] is cleared) no information logged in capture register(s) message segment error received a message packet with the segment field greater than the message length field (msgseg > msglen) generates interrupt if enabled (pnfeier[sie] is cleared) no information logged in capture register(s) duplicate message segment received a duplicate message segment from rapidio generates interrupt if enabled (pnfeier[dsie] is cleared) no information logged in capture register(s) message length error received a message packet from rapidio with a bad message length generates interrupt if enabled (pnfeier[bmie] is cleared) no information logged in capture register(s) nonsensical ackid ackid received with link response does not make sense generates interrupt if enabled (pnfeier[naie] is cleared) no information logged in capture register(s). resume training on the interface. hreset required to resume normal operation. illegal request fields illegal combinations of fields in the request packet. examples include: illegal transaction types, illegal sizes generates interrupt if enabled (pnfeier[irfie] is cleared) information logged in rapidio capture register(s) unexpected request data read type with a data payload generates interrupt if enabled (pnfeier[urdie] is cleared) information logged in rapidio capture register(s) unsupported request unsupported packet format type, or transport type (tt bits) generates interrupt if enabled (pnfeier[urie] is cleared) information logged in rapidio capture register(s) unexpected request size packet data is not expected size generates interrupt if enabled (pnfeier[ursie] is cleared) information logged in rapidio capture register(s) illegal write request write types with no data payload. generates interrupt if enabled (pnfeier[iwrie] is cleared) information logged in rapidio capture register(s) illegal response fields illegal combinations of fields in the response packet generates interrupt if enabled (pnfeier[irsfie] is cleared) information logged in rapidio capture register(s) illegal response type illegal response for a given request type generates interrupt if enabled (pnfeier[irtie] is cleared) information logged in rapidio capture register(s) bad read response read ?done? response with no data payload generates interrupt if enabled (pnfeier[brrie] is cleared) information logged in rapidio capture register(s) bad write response write response with a data payload generates interrupt if enabled (pnfeier[bwrie] is cleared) information logged in rapidio capture register(s) unexpected response data size response packet data is not expected size generates interrupt if enabled (pnfeier[urssie] is cleared) information logged in rapidio capture register(s)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-106 freescale semiconductor rapidio interface 17.7 atmu (address translation and mapping unit) outbound address translation refers to the translation of an address from the local address space to that of rapidio. in the same context, inbound address translation and mapping refers to the translation of an address from the external address space of rapidio to the local address space understood by the internal interfaces. although, the parallel rapidio interconnect specification allows for 48- and 64-bit addresses, this implementation only supports 34-bit rapidio addresses. outbound and inbound window misses use the window 0 register set by default. the size field in the attributes register of window 0 for both inbound and outbound translation is used to determine how much of the translation address is used when the default window is selected. overlapping window hits result in the use of the lowest number window register set hit. for both inbound and outbound translation, the smallest window size is 4 kbytes and the largest is 4 gbytes. 17.7.1 outbound atmu translation the nine outbound atmu windows (0?8) perform the mapping from the internal 32-bit address space to the 34-bit address space of rapidio. they also map attributes such as transaction type and priority level. window 0 is always enabled and is used as the default window if the address does not match one of the other eight windows. overlapping outbound window hits result in the use of the lowest number window register set hit. note that ocean read types can only map to unsolicited response without data a response without data is received while there is no corresponding request that matches that tid generates interrupt if enabled (pnfeier[uresie] is cleared) information logged in rapidio capture register(s) unsolicited response with data a response with data is received while there is no corresponding request that matches that tid generates interrupt if enabled (pnfeier[ursdie] is cleared) information logged in rapidio capture register(s) message error response received a response of type error for an outbound message packet generates interrupt if enabled (pnfeier[merie] is cleared) information logged in rapidio capture register(s) message descriptor fetch error a message descriptor fetch from local memory gets an error (for example, ecc). generates interrupt if enabled (pnfeier[mdfie] is cleared) no information logged in rapidio capture register(s) message size error received message packet data payload is not of the size specified in the ssize field (with the exception of the last packet which may be less) generates interrupt if enabled (pnfeier[msie] is cleared) information logged in rapidio capture register(s) illegal transaction target error received a packet whose target id does not match rapidio deviceid while accept_all mode is disabled generates interrupt if enabled (pnfeier[itie] is cleared) information logged in rapidio capture register(s) table 17-102. fatal errors detected by rapidio controller (continued) error description action capture registers
atmu (address translation and mapping unit) MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-107 rapidio read types and ocean write types can only map to rapidio write types including doorbells. 17.7.1.1 outbound atmu bypass mode note that some transactions may not require atmu translation because the address associated with the original transaction is already mapped to the appropriate address space. although the dma controller can initiate outbound rapidio transactions that may or may not bypass atmu translation, it is the only source of transactions that can bypass outbound atmu translation. the dma controller may bypass atmu translation for any outbound transaction that it supports. 17.7.1.2 outbound special transactions and requirements due to requirements of the parallel rapidio interconnect specification , i/o read home and flush with data transactions require special handling. outbound i/o read transactions cannot cross a 32-byte cache-line boundary and cannot be greater than 32 bytes in size because the rapidio interface requires wrapping around a 32-byte cache-line for i/o read home transactions. therefore, regardless of the size of the original request, the address for outbound i/o read transactions is double-word aligned, and the size is set to 32 bytes in order to fetch an entire cache-line. there is also a requirement for outbound requests originated by the pci controller. these transactions must map to an atmu window in which the rowar n specifies a transaction flow level of zero and has the pci bit set. this causes the outbound transaction to be sent through the rapidio interface with a priority of one because the transaction flow level is incremented when the pci bit is set. to comply with the parallel rapidio interconnect specification other transactions also have special requirements. outbound maintenance transactions, for example, may not exceed 64 bytes. also, outbound doorbells are generated through the atmu by using write transactions whose sizes are 2, 4 or 8 bytes and whose address is aligned to a doubleword boundary. a doorbell generated using a 2-byte write gets its info field from the data associated with the write transaction. a doorbell generated using a 4 or 8 byte write gets its info field from the most-significant 2 bytes of the data associated with the write transaction. outbound swrite transactions must be at least a double word, and atomic transactions may only request 1, 2, or 4 bytes. furthermore, atomic transactions must meed the rapidio alignment requirements as specified in the parallel rapidio interconnect specification . the parallel rapidio interconnect specification should be referenced for any additional requirements that are not listed in this section. 17.7.2 inbound atmu translation inbound atmu windows perform the address translation from the 34-bit external rapidio address space to the 32-bit internal address space. inbound atmu windows also attach attributes,
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-108 freescale semiconductor rapidio interface transaction type, and the target interface to the transaction. the rapidio controller has four inbound atmu windows plus the default window 0. the default window is always enabled. overlapping inbound window hits result in the use of the lowest number window register set hit. 17.7.2.1 inbound atmu lcsba1csr window there is an additional inbound window that is used for inbound translation. it is a special condition for external accesses to lcsba1csr (local configuration space base address register) address space. the purpose of the lcsba1csr window is to allow external devices to access the lcsba1csr address space without knowledge of the internal memory map. when a remote device attempts to access the lcsba1csr register set (address hitting lcsba1csr window), the lower 20 bits are used as the offset to access the specific register in the lcsba1csr address space. the lcsba1csr window has the highest priority for inbound translation. if the inbound transaction?s address does not hit the lcsba1csr window or any of the four inbound atmu windows (1?4), the translation attributes defined by the default window (window 0) are used. the lcsba1csr window does not have specific riwbar, riwtar or riwar registers. however, for the purposes of translation, bits 1?14 of the lcsba1csr correspond to bits 10?23 of riwbar n , and bits 12?23 of the ccsrbar correspond to bits 12?23 of riwtar n . the hard-coded attributes for this window as they correspond to the riwar register fields are: en = 0b1, tgint = 0b1111, rdtyp and wrtyp = 0b0100 and size = 0b010011. 17.7.2.2 inbound atmu bypass mode just as some outbound transactions may bypass outbound atmu translation, some inbound transactions may also bypass atmu translation because the address associated with the original transaction is already mapped to the appropriate address space. inbound messages, doorbells and port-writes go through a different form of address mapping and are not mapped through the atmu. these transactions have the stash and cache_lock attributes cleared. similarly, the no_snoop bit is set according to the corresponding programming model of the specific transaction type regardless of the value specified in the riwar of the selected atmu window. for more information about these transactions, see section 17.8.4.1, ?data message controller,? section 17.8.4.4, ?doorbell message controller,? and section 17.8.4.5, ?port-write controller structure.? 17.7.2.3 inbound special transactions and requirements just as with outbound translation, some inbound transactions require special handling to comply with the parallel rapidio interconnect specification . for example, inbound i/o read home and flush with data transactions require special handling. snooping is enabled for these transactions regardless of the no-snoop value specified in the riwar of the selected window. furthermore, these transactions should target local memory. targeting any other interface is a programming
rapidio message unit MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-109 error and results in undefined behavior. also, i/o read home transactions can request less data than the maximum of 32 bytes. inbound reads that target the pci controller should have a priority of zero as a special requirement. similarly, inbound writes targeting the pci interface must have a priority of one. inbound nwrite_r transactions that target the pci interface are not allowed. these requirements insure proper processing through the pci interface. inbound swrite transactions must not be smaller than a double-word, and atomic transactions may only request one, two or four bytes. furthermore, atomic transactions must meet the rapidio alignment requirements as specified in the parallel rapidio interconnect specification and must target the ddr memory controller. inbound atomic transactions targeting interfaces other than the ddr memory controller result in boundedly undefined behavior. also, all inbound maintenance transactions must have a size of four bytes. the parallel rapidio interconnect specification should be referenced for any additional requirements that are not listed in this section. 17.7.2.4 atmu boundary crossing errors during address translation and mapping, some transactions may generate an error condition and signal an interrupt. to prevent inbound and outbound transactions from corrupting local memory space, atmu boundary crossing errors are detected. an error is detected when an inbound or outbound transaction has a data payload that crosses its selected atmu window boundary. an error is also detected when the given transaction?s data payload crosses into the space of a higher-priority window. the settings of the port notification/fatal error register set described in section 17.3.2.3, ?error management registers,? determine if the error condition is detected and if pnfedr[axe] is set. the settings in this register set also determine if an interrupt is signalled upon detection of the error condition. 17.8 rapidio message unit this description is an extension of section 17.7.1, ?outbound atmu translation,? and section 17.7.2, ?inbound atmu translation.? it describes the operation of the data message and doorbell message controllers in the message unit. the message unit is compliant with the message passing logical specification in the parallel rapidio interconnect specification . 17.8.1 overview the rapidio message unit supports a message passing programming model for inter-processor and inter-device communication. this model enables a producer to send a message across the interconnect fabric to a consumer?s message hardware, called a mailbox. the receiving mailbox controller places the message in a queue located in main (ddr) memory. a message may consist
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-110 freescale semiconductor rapidio interface of one or more packets depending on the size of the message. when the entire message has been received, an interrupt (if enabled) is generated for the processor to process the message. messages can be queued for transmission in the producer?s memory and the message hardware processes them sequentially. messages can also be queued in the consumer?s memory while software processes them sequentially. software controls the depth of the circular message queue in the producer, or consumer. the message unit also supports another form of message called a doorbell message. doorbell messages do not have a data payload and are basically used for interrupting the processor. like data messages, doorbell messages can be queued in a consumer?s local memory while being processed by the processor core. when a doorbell is received, an interrupt (if enabled) is communicated to the processor. the most common use of the message passing model is in systems where a processing element can only access memory that is local to itself, and communication between processing elements is achieved through message passing and communication is address independent. there are two types of rapidio messages. a data message may consist of up to 16 packets and each packet may contain up to 256 bytes of data. a doorbell message contains a small amount of software-defined information embedded in the packet header and never has a data payload. message and doorbell controllers are controlled through run-time registers described in section 17.3.3.1, ?rapidio outbound message registers,? section 17.3.3.2, ?rapidio inbound message registers,? and section 17.3.3.3, ?rapidio doorbell registers.? 17.8.2 message unit features the message unit contains the following features:  one inbound data message structure (inbox)  one outbound data message structure (outbox)  support for chaining and direct modes in the outbox  support for up to 16 segments per message  support for up to 256 bytes per packet, and up to 4 kbytes of data per message  support for one inbound doorbell message structure  support for receiving messages into any mailbox, any letter  support for transmitting messages from any mailbox
rapidio message unit MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-111 17.8.3 message unit modes of operation the message unit operates in the following modes:  direct mode?software is expected to program all the necessary registers for sending an outbound message.  chaining mode?a transfer descriptor that describes the message information is fetched from local memory before a message is sent. 17.8.4 rapidio messaging description this section describes controller operations, formats, interrupts, and response conditions. 17.8.4.1 data message controller the rapidio controller supports a data message passing programming model for inter-processor and inter-device communication. this model enables a producer to send a data message across the interconnect fabric to a consumer?s message hardware, called a mailbox. the receiving mailbox controller places the message in a queue located in its memory. a data message may consist of one or more packets depending on the size of the message. when the entire message has been received, an interrupt is generated (if enabled) for the processor core to process the message. data messages can be queued for transmission in the producer?s memory and the message hardware processes them sequentially. messages can also be queued in the consumer?s memory while software processes them sequentially. software controls the depth of the circular queue in the producer, or consumer. the rapidio data message controller contains the following features:  one inbound mailbox (inbox) structure  one outbound mailbox (outbox) structure  support for one active letter in the inbox (letters are assigned and maintained by hardware)  support for up to one letter (0) in the outbox for message unit initiated messages  support for up to 16 segments (packets) per message  support for up to 256 bytes per segment (packet)  chaining and direct mode support for outbound messages the following sections describe the structure and operation of the outbox and inbox hardware in the data message controller. 17.8.4.2 outbox controller operation the outbox controller is responsible for sending messages stored in a circular queue in local memory. the outbox controller supports two modes of operation: direct and chaining mode. in
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-112 freescale semiconductor rapidio interface direct mode, software programs the necessary registers to point to the beginning of the message in memory. in chaining mode, software programs the necessary registers to point to the beginning of the first valid descriptor in memory. the hardware then reads the descriptor to load all the necessary registers to start the message transfer. 17.8.4.2.1 direct mode operation in direct mode, omr[mutm] is set and the outbox controller does not read descriptors from memory, but instead uses the current parameters programmed in the outbox registers to start the transfer. in direct mode, software is responsible for initializing all the parameters in all the necessary registers to start the message transmission. the message transfer is started when the outbox start bit, omr[mus], in the outbound mode register transitions from a 0 to 1 and the outbox is not already busy. software is expected to program all the appropriate registers before setting omr[mus]. the sequence of events to start and complete a transfer in direct mode is as follows:  poll the status register message unit busy bit, osr[mub], to make sure the message unit is not busy with a previously initiated message.  initialize the source address (osar), destination port (odpr), destination attributes (odatr) and double-word count (odcr) registers.  initialize the outbound mode register message unit transfer mode bit, omr[mutm] = 1, to indicate direct mode. other control parameters must also be initialized in the mode register.  clear, then set the mode register message unit start bit, omr[mus], to start the message transfer.  osr[mub] is set by the outbox controller to indicate that the message transfer is in progress.  osr[mub] is cleared by the outbox controller after the transfer is finished or if a transfer error occurs.  an end of message interrupt is generated if odatr[eomie] is set. 17.8.4.2.2 chaining mode operation in chaining mode, omr[mutm] = 0 in the outbound mode register, and message descriptors are built in local memory in a circular queue. two options are available to the programmer in chaining mode: normal mode and list mode. in normal mode, software can initialize the outbox controller registers and then build the descriptors in memory. odqepar is maintained and incremented by hardware, but the increment is controlled by software. software should build descriptors in memory using the enqueue pointer address and can have the hardware increment the enqueue pointer by writing omr[mui] to a value of 1. software can then read the value of the enqueue pointer to write the next descriptor in memory and then increment the enqueue pointer by writing
rapidio message unit MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-113 omr[mui] = 1 and repeat this process until the descriptor queue is full. hardware performs the enqueue pointer address calculation, queue fullness and queue wrap checks and software writes new descriptors using the computed enqueue pointer address. in list mode, software can build one or more descriptors in memory before initializing the outbox controller registers. software is responsible for maintaining and controlling odqepar. software is also responsible for keeping track of queue fullness and wrap conditions. omr[mui] is not used in this mode. the outbox message controller takes descriptors off the tail of the queue and processes them, incrementing odqdpar to point to the next descriptor in the queue and repeats this process until the enqueue and dequeue pointers are equal. figure 17-82 shows a sample structure of the outbox portion of the outbox message controller, a descriptor list queue, and the message data queue. in this example, the descriptor list queue has eight entries, four of which are currently valid. the processor core adds descriptors to the head of the queue and the outbox message controller takes them off from the tail. figure 17-82. outbound message queue structure the sequence of events to start and complete a transfer by adding descriptors after initializing the message unit in normal chaining mode is as follows:  initialize odqdpar and odqepar to the same value for proper operation.  initialize the outbound mode register message unit transfer mode bit, omr[mutm] = 0, to indicate chaining mode and set omr[mus] = 0 to disable the data message controller. other control parameters must also be initialized in the mode register.  set omr[mus], which enables the outbox controller and causes odqdpar to be saved as the base address of the circular queue. the enqueue pointer is incremented when omr[mui] is set by software. if the enqueue and dequeue pointers are not equal, the descriptor fetch begins immediately from the address pointed to by odqdpar. if they are outbound message data message data message data desc desc desc desc enqueue pointer dequeue pointer outbound message controller local memor y local memory packets to message data processor core enqueue and tail pointers rapidio interface descriptor list queue message data queue
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-114 freescale semiconductor rapidio interface equal, the outbox waits until the enqueue and dequeue pointers are not equal. omr[mui] is cleared by hardware after successfully incrementing the enqueue pointer.  osr[mub] is set by the message unit to indicate that the message transfer is in progress while the tail and enqueue pointers are not equal.  the above process continues until the dequeue pointer equals the enqueue pointer again.  osr[mub] is cleared by the message unit after finishing the transfer of the last descriptor segment, or if an error occurs during any of the transfers.  software can continue adding descriptors as needed for new transfers by setting omr[mui] as long as the circular queue in memory is not full while the message unit is busy. the sequence of events to start and complete the transfer of a list of message descriptors built in memory before initializing the message unit in list chaining mode is as follows:  poll the status register message unit busy bit, osr[mub], to make sure the outbox controller is not busy with a previously initiated message.  initialize odqdpar to point to the first descriptor in memory and odqepar and eodqepar to point to the circular queue entry in memory following the last descriptor in the list. the enqueue and dequeue pointers should not be the same.  initialize the outbound mode register message unit transfer mode bit, omr[mutm] = 0, to indicate chaining mode and set omr[mus] = 0 to disable the data message controller. other control parameters must also be initialized in the mode register.  set omr[mus], which enables the outbox controller. the descriptor fetch begins immediately from the address pointed to by odqdpar.  osr[mub] is set by the message unit to indicate that the message transfer is in progress.  omr[mui] is not used in this mode because software directly controls the enqueue pointer; therefore, new descriptors cannot be added when the message unit is busy as indicated by osr[mub] = 1.  osr[mub] is cleared by the message unit after finishing the transfer of the last descriptor segment, or if an error occurs during any of the transfers.  new descriptors can be added by just updating odqepar as long as the enqueue pointer address does not cause a wrap condition.  if adding new descriptors causes a wrap condition, software can build descriptors in memory but not update the enqueue pointer (odqepar) address registers until the message unit is idle as indicated by osr[mub] = 0. before updating the enqueue and dequeue pointers, software must disable the message unit by setting omr[mus] = 0. it can then update the enqueue (odqepar) and dequeue (odqdpar) pointer address registers before enabling the message unit by setting omr[mus] = 1 to start transferring the new list of descriptors.
rapidio message unit MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-115 software must guarantee that descriptors are not added to an already full queue. this can be accomplished in one of two ways:  when omr[qfie] is set, hardware tracks queue fullness in normal chaining mode and reports an interrupt if the queue becomes full. after the interrupt bit is set, it is the responsibility of the software to clear the interrupt condition by setting osr[qfi]. qfi is not cleared with the write if the queue is still full. when qfi is cleared, the queue is no longer full and a descriptor may be added to the queue.  when omr[qfie] is cleared or if operating in list chaining mode, osr[qfi] is not set by hardware on a queue full condition, and it is the responsibility of the software to calculate queue fullness before adding a new descriptor. software can detect queue fullness by comparing the enqueue (odqepar) and the dequeue pointer (odqdpar) and monitoring the queue busy bit (osr[mub]). the queue is full if the enqueue and dequeue pointers are equal and the queue busy bit is set. the following process adds a descriptor to the circular memory queue in normal mode:  ensure that the circular queue is not full by using either of the above methods.  write the descriptor to be enqueued to the 32 bytes pointed to by the enqueue pointer (odqepar).  write omr[mui] = 1 keeping the same values of all the other bits in the omr.  a new descriptor may be added by incrementing the enqueue pointer if the queue is not full. 17.8.4.2.3 switching between direct and chaining modes the message unit architecture allows switching from direct mode to chaining mode and vice-versa after all the required parameters have been initialized in the appropriate registers and when the message unit is not busy with a current transfer as indicated by osr[mub] being cleared. when switching from direct mode to chaining mode, if omr[mus] is cleared and then set, the message unit is re-initialized to chaining mode and the outbound descriptor queue dequeue pointer address is saved as the new base address of the circular queue in memory. if this is not desired, omr[mus] should stay set when switching from direct mode to chaining mode. when the enqueue and dequeue pointers are not equal, the message unit begins the new descriptor fetch while retaining the same circular queue parameters as the previous chaining mode transfer. when switching from chaining mode to direct mode, omr[mus] must be cleared and then set. this has no effect on the circular queue parameters thereby saving the queue state for the next chaining mode transfer. 17.8.4.2.4 descriptor format message descriptors contain information for the message unit controller to transfer data. software must ensure that each descriptor is aligned on a 32-byte boundary. for each descriptor in the
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-116 freescale semiconductor rapidio interface queue, the message unit controller starts a new message operation with the control parameters specified by the descriptor. table 17-103 describes the outbound message unit descriptor. figure 17-83 shows the queue dequeue pointer and an associated descriptor. the descriptor is only valid if the enqueue and dequeue pointers are not equal. figure 17-83. descriptor dequeue pointer and descriptor 17.8.4.2.5 outbox controller interrupts the outbox generates the following four interrupts, which can be individually enabled.  queue overflow interrupt. generated if the enqueue pointer passes the dequeue pointer and the queue is full and the interrupt is enabled. osr[qoi] is set if omr[qoie] is set.  queue full interrupt. generated if the enqueue pointer catches up to the dequeue pointer, the queue is not empty, and the interrupt is enabled. osr[qfi] is set if omr[qfie] is set. table 17-103. outbound message unit descriptor summary offset descriptor field description 0x00 reserved ? 0x04 source address source address of the message operation. after the message controller reads the descriptor from memory, this field is loaded into the source address register. 0x08 destination port destination port of the message operation. after the message controller reads the descriptor from memory, this field is loaded into the destination port register. 0x0c destination attributes transaction attributes of the message operation. after the message controller reads the descriptor from memory, this field is loaded into the destination attributes register. 0x10 reserved ? 0x14 reserved ? 0x18 double-word count number of double words for the message operation. after the message controller reads the descriptor from memory, this field is loaded into the double-word count register. 0x1c reserved ? descriptor dequeue pointer address register descriptor 31 0 0x00 0x08 0x18 0x10 0x04 destination port reserved double-word count reserved local memory offset 0x14 source address 0x0c reserved 3 1 0 0x1c destination attributes reserved
rapidio message unit MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-117  queue empty interrupt. generated if the dequeue pointer catches up to the enqueue pointer and the interrupt is enabled. osr[qei] is set if omr[qeie] is set.  end-of-message interrupt. generated after the completion of each message if enabled. osr[eomi] is set if odatr[eomie] is set. 17.8.4.2.6 special error case condition if a data message is in progress and the outbox encounters an error with one of the segments, it causes an error at the recipient by placing an illegal field in the packet to cause the error. this prevents the recipient from using data in the message. for example, if the outbox controller reads message data from its dram memory and gets an uncorrectable ecc error. this scheme prevents the recipient from hanging or using bad data. 17.8.4.3 inbox controller operation the inbox controller is responsible for receiving messages and placing them in a circular queue in local memory. although, it only supports one mailbox and one letter, the inbox controller can receive messages with any mailbox or letter number. furthermore, the inbox can receive segments of a message in any order. the address of where to write the message is computed as: base address + (msgseg * ssize in double words). unlike the outbox where the enqueue pointer is controlled by software and the dequeue pointer is controlled by hardware, the inbox controls the enqueue pointer and software controls the dequeue pointer. figure 17-84 shows a sample structure of the inbound mailbox message frames and the frame pointers. in this example, the frame queue has eight entries, three of which are currently valid. the mailbox controller adds frames to the head of the queue and the processor core takes them off from the tail. after processing a message, the processor core writes the inbox mode register mailbox increment bit (imr[mi]) to point to the next message frame in the queue. this process is repeated for each received message. figure 17-84. inbound mailbox structure message frame message frame message frame enqueue pointer dequeue pointer dequeue pointer processor core read inbound mailbox port local memory packets from rapidio interface frame queue
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-118 freescale semiconductor rapidio interface the sequence of events that takes place during the reception of a data message is as follows:  the inbox receives a message request from the rapidio port. if the inbox is enabled (imr[me] = 1) and it is not busy with another message (isr[mb] = 1), then the message is accepted.  the address is computed for each segment of the message (up to 16 segments/packets per message) using the value of the inbound frame queue enqueue pointer address registers and properly adjusted based on segment number.  data is stored in the circular queue in local memory at the computed address.  after the entire message is received, the enqueue pointer is incremented to point to the next message frame in local memory.  an interrupt is generated if enabled (imr[miqie] = 1). the interrupt is held until the dequeue pointer equals the enqueue pointer and the message queue is empty. that is, as long as messages exist in memory that have not been serviced and the interrupt is enabled, the interrupt remains asserted. 17.8.4.3.1 retry response conditions the following two conditions generate a logical layer retry (response retry):  inbox receives a message but is busy handling another message  local memory circular queue is full and a message is received 17.8.4.3.2 error response conditions several conditions generate a logical layer error response (response error) as follows:  inbox receives a message and it is not enabled  inbox is in an error state caused by a previous message  inbox receives a segment that exceeds the message length (msgseg > msglen)  inbox receives a message segment being processed with a bad message length  inbox receives a duplicate segment of a message being processed that was already received successfully 17.8.4.3.3 inbox controller interrupts the inbox generates the following interrupts, which can be individually enabled:  message-in-queue interrupt. this interrupt is generated each time the circular queue becomes not empty and the interrupt is enabled. isr[miqi] is set if imr[miqie] is set.  queue full interrupt. this interrupt is generated each time the circular queue becomes full and the interrupt is enabled. isr[qfi] is set if imr[qfie] is set.
rapidio message unit MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-119 17.8.4.3.4 data message controller limitations and restrictions this section describes some of the limitations and restrictions of the data message controller. this is intended to help software maximize the message passing performance and avoid programming errors. software must guarantee that the enqueue pointer is not pointing to an invalid descriptor in chaining mode if the enqueue and dequeue pointers are not equal. 17.8.4.4 doorbell message controller the rapidio protocol supports a doorbell message type that contains no data payload. even though the rapidio architecture references outbound and inbound doorbell message controllers, the rapidio controller supports only an inbound doorbell message queue. outbound doorbells are generated outside rapidio within the outbound atmu. inbound doorbell messages are handled by the doorbell message controller similar to how the data message controller handles inbound data messages. the doorbell controller receives the doorbell message and places it in a circular queue located in the local memory. figure 17-85 shows an example of the structure of the inbound doorbell queue and its pointers. the doorbell queue of the rapidio controller has eight entries, three of which are currently valid. the doorbell controller adds doorbell information to the head of the queue and the processor core removes it from the tail. the doorbell entry size is fixed at 64 bits because doorbell packets only pass a small amount of information, making the enqueue and dequeue pointers double-word addresses. figure 17-85. inbound doorbell queue and pointer structure doorbell entry doorbell entry doorbell entry enqueue pointer dequeue pointer dequeue pointer processor core read inbound doorbell controller local memory packets from rapidio interface
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-120 freescale semiconductor rapidio interface 17.8.4.4.1 inbound doorbell reception the following sequence of events occurs during reception of a doorbell message:  the inbox receives a doorbell message request from the rapidio port. if the inbox is enabled (dmr[de] = 1) and it is not busy with another doorbell message (dsr[db] = 1), then the doorbell message is accepted.  the 16-bit information field is stored in local memory using the value of dqdpar.  the enqueue pointer is incremented to point to the next doorbell queue entry in local memory.  an interrupt is generated if enabled (dmr[diqie] = 1). the interrupt is held until the dequeue pointer equals the enqueue pointer and the doorbell queue is empty. that is, as long as doorbell messages exist in memory that have not been serviced and the interrupt is enabled, the interrupt remains asserted. 17.8.4.4.2 doorbell queue entry format this section defines the format of the doorbell information written to memory by the doorbell controller. each doorbell entry in the queue has two 32-bit offsets, one for target information and one for source information. table 17-104 shows the target information. table 17-105 shows the source information. figure 17-86 shows the doorbell queue entry fields and their related offsets. figure 17-86. doorbell entry format table 17-104. target information definition bits name description 0?23 ? reserved 24?31 tid target id field from the received doorbell packet table 17-105. source information definition bits name description 0?7 ? reserved 8?15 sid source id field from the received doorbell packet 16?31 info information field from the received doorbell packet 0b000 0b100 target info local memory offset source info 31 0
rapidio message unit MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 17-121 17.8.4.4.3 retry response conditions there is one condition in which a doorbell message is logical layer retried (response retry):  doorbell request received and the doorbell circular queue is full 17.8.4.4.4 error response conditions several conditions cause a logical layer error response (response error):  doorbell controller is error state  doorbell controller is not enabled 17.8.4.4.5 doorbell controller interrupts the doorbell controller generates the following two different interrupts that can be individually enabled:  doorbell-in-queue interrupt. generated each time the circular queue becomes not empty and the interrupt is enabled. dsr[diqi] is set if dmr[diqie] is set  queue full interrupt. generated each time the circular queue becomes full and the interrupt is enabled. dsr[qfi] is set if dmr[qfie] is set 17.8.4.5 port-write controller structure the implementation of the port-write controller is very similar to the inbound message hardware. the port-write is intended as an error reporting mechanism from an end-point-free device to a control processor or other system host. figure 17-87 shows an example of the structure of the inbound queue and pointer. the port-write queue only contains one entry with a fixed size of 64 bytes and aligned to a cache line boundary. the port-write controller puts an incoming port-write data payload in the location indicated by the pointer and then sets its pwsr[qfi] if pwmr[qfie] is set. the processor core must explicitly clear pwsr[qfi] after servicing the port-write. while the full bit is set, or if it is busy handling a previous port-write, or the port-write controller is not enabled, the controller silently discards all incoming port-write packets.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 17-122 freescale semiconductor rapidio interface figure 17-87. inbound port-write structure upon successfully receiving a port-write transaction, if pwmr[qfie] is set, pwsr[qfi] is set and an interrupt is generated to the processor core. 17.9 initialization and application information the following steps outline the rapidio port initialization procedure: 1. configure the transmit clock select pins to select either the receive clock, externally provided transmit clock or the platform clock for the rapidio transmit clock domain. 2. initialize the host/agent field (using configuration pins) to put the end-point in host or agent mode over rapidio. 3. initialize the device id field (using configuration pins) to assign a device identifier at power-on reset. 4. the address translation and mapping unit (atmu) for rapidio must be initialized for rapidio accesses. 5. clear the cr[aa] bit to allow the logic to detect an error when it receives packets with a target id not equal to its own. 6. follow the system initialization and discovery mechanism described in the inter-operability portion of the parallel rapidio interconnect specification for configuring the rapidio system. port-write 64-byte entry pointer pointer processor core read inbound port-write port local memory port-write packets from rapidio interface port-write queue
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor iv-1 part iv global functions and debug part iv defines other global blocks of the MPC8540. the following chapters are included:  chapter 18, ?global utilities,? defines the global utilities of the MPC8540. these include power management, i/o device enabling, power-on reset (por) configuration monitoring, general-purpose i/o signal use, and multiplexing for the interrupt and local bus chip select signals  chapter 19, ?performance monitor,? describes the performance monitor of the MPC8540.  chapter 20, ?debug features and watchpoint facility,? describes the debug features and watchpoint monitor of the MPC8540.  chapter 21, ?10/100 fast ethernet controller,? includes information about using the dual-speed ethernet controller of the MPC8540 for debug purposes.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 iv-2 freescale semiconductor
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 18-1 chapter 18 global utilities this chapter describes the global utilities of the MPC8540. it provides signal descriptions, register descriptions, and a functional description of these utilities. 18.1 overview the global utilities block controls power management, i/o device enabling, power-on reset (por) configuration monitoring, general-purpose i/o signal configuration, alternate function selection for multiplexed signals, and clock control. 18.2 global utilities features this section provides an overview of global utilities features. 18.2.1 power management and block disables the following features affect the overall power consumption of the device:  dynamic power management mode  software-controlled power management (doze, nap, sleep)  externally controlled power management (doze, sleep)  static power management (i/o block disables) 18.2.2 accessing current por configuration settings the por configuration values of all device parameters sampled from pins at reset are available through memory-mapped registers in the global utilities block. 18.2.3 general-purpose i/o the pci and tsec2 data bus signals can be used as general-purpose i/o signals when not used for their primary function. memory-mapped registers in the global utilities block provide control and status for the use of these signals. a general purpose input register is loaded with the values of the local bus address/data pins at the negation of hreset .
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 18-2 freescale semiconductor global utilities 18.2.4 interrupt and local bus signal multiplexing irq[9:11] and lcs [5:7] serve multiple functions that can be selected by configuration registers in the global utilities block. 18.2.5 clock control the global utilities block also selects the internal clock signal driven on clk_out. 18.3 external signal descriptions the following subsections provide information about signals that serve as global utilities. 18.3.1 signals overview table 18-1 summarizes the external signals used by the global utilities block. 18.3.2 detailed signal descriptions table 18-2 describes signals in the global utilities block in detail. table 18-1. external signal summary signal name i/o description reference (section/page) asleep o signals that the device has reached a sleep state 18.5.1.5.3/18-24 ckstp_ in i checkstop input ? ckstp_out o checkstop output ? clk_out o clock out. selected by clkocr values 18.4.1.16/18-18 table 18-2. detailed signal descriptions signal i/o description asleep o asleep. see section 18.5.1.5.3, ?sleep mode.? after negation of hreset , asleep is asserted until the device completes its power-on reset sequence and reaches its ready state. state meaning asserted?indicates that the device is either still in its power-on reset sequence or has reached a sleep state after a power-down command is issued by software negated?the device is not in sleep mode. (it has either awakened from a power-down state or completed the por sequence.) timing assertion?may occur at any time; may be asserted asynchronously to the input clocks negation?negates synchronously with sysclk when leaving power-on sequence; otherwise negation is asynchronous
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 18-3 18.4 memory map/register definition table 18-3 summarizes the global utilities registers and their addresses. ckstp_in i checkstop in state meaning asserted?indicates that the e500 core must enter a hard stop condition. all e500 clocks are turned off. ckstp_out is asserted. the rest of MPC8540 device logic, including memory controllers, internal memories and registers, and i/o interfaces, remains functional. negated?indicates that normal operation should proceed timing assertion?may occur at any time; may be asserted asynchronously to the input clocks negation?must remain asserted until the MPC8540 is reset with assertion of hreset ckstp_out o checkstop out state meaning asserted?indicates that the e500 core of the MPC8540 is in a checkstop state. the rest of the MPC8540 logic remains functional. negated?indicates normal operation. after ckstp_out has been asserted, it is negated after the next negation (low-to-high transition) of hreset . timing assertion?may occur at any time; may be asserted asynchronously to the input clocks negation?must remain asserted until the device has been reset with a hard reset clk_out o clock out. reflects clock signal selected by clkocr (see section 18.4.1.16, ?clock out control register (clkocr)? ) state meaning asserted?if clkocr[enb] = 1, clock signal selected by clkocr[clk_sel] is driven high impedance?if clkocr[enb] = 0 timing assertion/negation?depends on the value of clkocr[clk_sel] table 18-3. global utilities block register summary offset register access reset section/page power-on reset configuration values 0xe_0000 porpllsr?por pll ratio status register r 0x00 nn _00 nn 18.4.1.1/18-4 0xe_0004 porbmsr?por boot mode status register r 0x nnnn _0000 18.4.1.2/18-5 0xe_0008 porimpscr?por i/o impedance status and control register r/w 0x000 n _007f 18.4.1.3/18-6 0xe_000c pordevsr?por i/o device status register r see ref. 18.4.1.4/18-7 0xe_0010 pordbgmsr?por debug mode status register r see ref. 18.4.1.5/18-9 0xe_0020 gpporcr?general-purpose por configuration register r see ref. 18.4.1.6/18-9 signal multiplexing and gpio controls 0xe_0030 gpiocr?gpio control register r/w 0x0000_0000 18.4.1.7/18-10 0xe_0040 gpoutdr?general-purpose output data register r/w 0x0000_0000 18.4.1.8/18-11 table 18-2. detailed signal descriptions (continued) signal i/o description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 18-4 freescale semiconductor global utilities 18.4.1 register descriptions this section describes the global utilities registers in detail. 18.4.1.1 por pll status register (porpllsr) porpllsr, shown in figure 18-1 , contains the settings for the pll ratios as set by the cfg_sys_pll[0:3] and cfg_core_pll[0:1] por configuration pins. see section 4.4.3.1, ?system pll ratio,? and section 4.4.3.2, ?e500 core pll ratio,? for more information. figure 18-1. por pll status register (porpllsr) 0xe_0050 gpindr?general-purpose input data register r 0x nnnn _0000 18.4.1.9/18-12 0xe_0060 pmuxcr?alternate function signal multiplex control r/w 0x0000_0000 18.4.1.9/18-12 device disables 0xe_0070 devdisr?device disable control r/w 0x0000_0000 18.4.1.11/18-13 power management registers 0xe_0080 powmgtcsr?power management status and control register r/w 0x0000_0000 18.4.1.12/18-15 interrupt reporting 0xe_0090 mcpsumr?machine check summary register read/clear 0x0000_0000 18.4.1.13/18-16 version registers 0xe_00a0 pvr?processor version register r e500 processor version 18.4.1.14/18-17 0xe_00a4 svr?system version register r MPC8540 system version 18.4.1.15/18-18 debug control 0xe_0e00 clkocr?clock out select register r/w 0x0000_0000 18.4.1.16/18-18 0xe_0e10 ddrdllcr?ddr dll control register r/w 0x0000_0000 18.4.1.17/18-19 0xe_0e20 lbdllcr?lbc dll control register r/w 0x0000_0000 18.4.1.18/18-20 0 9 10 15 16 25 26 30 31 r 0 0 0 0 0 0 0 0 0 0 e500_ratio 0 0 0 0 0 0 0 0 0 0 plat_ratio 0 w reset 0000_0000_00 nn _ nnnn_ 0000_0000_00 nn _ nnnn offset 0xe_0000 table 18-3. global utilities block register summary (continued) offset register access reset section/page
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 18-5 table 18-4 describes the bit settings of porpllsr. 18.4.1.2 por boot mode status register (porbmsr) the porbmsr, shown in figure 18-2 , reports setting of the por configuration pins that control the boot mode settings (described in section 4.4.3.3, ?boot rom location,? section 4.4.3.5, ?cpu boot configuration,? and section 4.4.3.6, ?boot sequencer configuration,? ) and the default settings of rapidio and pci host/agent modes (described in section 4.4.3.4, ?host/agent configuration? ). for information about how the rapidio interface is configured, see section 17.3.1.19, ?port general control command and status register (pgccsr).? for more information about the pci configurations, see section 16.3.2.19, ?pci bus function register (pbfr).? figure 18-5 describes the bit settings of the porbmsr. table 18-4. porpllsr field descriptions bits name description 0?9 ? reserved 10?15 e500_ratio clock ratio between the e500 core and the ccb clock. the 2 lsbs of this field correspond to the values on cfg_core_pll[0:1] at the negation of hreset . patterns not shown are reserved. 0001002:1 0001015:2 0001103:1 0001117:2 16?25 ? reserved 26?30 plat_ratio clock ratio between the ccb (platform) clock and sysclk. the 4 lsbs correspond to the values on cfg_sys_pll[0:3] at the negation of hreset . patterns not shown are reserved. 000102:1 000113:1 001004:1 001015:1 001106:1 010008:1 010019:1 0101010:1 0110012:1 1000016:1 31 ? reserved 0 1 4 5 7 8 9 10 11 12131415 16 31 rbcfg0000rom_loc0 0bscfg0 0 ha 0 00000000000000 0 w reset n 000_0 nn n_00 nn _00 nn_ 0000_0000_0000_0000 offset 0xe_0004 figure 18-2. por boot mode status register (porbmsr)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 18-6 freescale semiconductor global utilities 18.4.1.3 por i/o impedance status and control register (porimpscr) porimpscr, shown in figure 18-3 ,contains the current i/o driver impedances for local bus and pci interfaces. the i/o impedance of local bus signals (including the local bus clock) is controlled through this register. the i/o impedance of pci signals is controlled by por configuration pins (described in table 18-5. porbmsr field descriptions bits name description 0 bcfg cpu boot configuration 0 the cpu is prevented from booting until configuration by an external master is complete. 1 the cpu is allowed to start fetching boot code. 1?4 ? reserved 5?7 rom_loc location of boot rom: 000 pci/pci-x 001 ddr sdram 011 rapidio 101 local bus gpcm: 8-bit 110 local bus gpcm:16-bit 111 local bus gpcm: 32-bit 8?9 ? reserved 10?11 bscfg boot sequencer configuration 00 reserved 01 boot sequencer enabled with normal i 2 c addressing 10 boot sequencer enabled with extended i 2 c addressing 11 boot sequencer disabled 12?13 ? reserved 14?15 ha host/agent mode configuration. when the MPC8540 is an agent on an interface, it is prevented from mastering transactions on that interface until the external host configures the interface appropriately. 00 pci and rapidio agent mode 01 rapidio agent mode 10 pci/pci-x agent mode 11 host mode 16?31 ? reserved 0 141516 24 25 26 27 28 29 30 31 r00000000000000 0 pci_z 0 0000000 0 lale_z ladp_z la_cke_z lcs12_z lwe_z lgpl_z lclk_z w reset 0000_0000_0000_000 n_ 0000_0000_0111_ 1111 offset 0xe_0008 figure 18-3. por i/o impedance status and control register (porimpscr)
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 18-7 section 4.4.3.13, ?pci i/o impedance.? ) the MPC8540 integrated processor hardware specifications provides exact i/o impedances. table 18-6 describes porimpscr fields. 18.4.1.4 por device status register (pordevsr) shown in figure 18-4 , pordevsr reports other por settings for i/o devices as described in section 4.4.3.7, ?tsec width,? section 4.4.3.8, ?tsec1 protocol,? section 4.4.3.9, ?tsec2 protocol,? section 4.4.3.16, ?pci-x configuration,? section 4.4.3.14, ?pci arbiter configuration,? section 4.4.3.12, ?pci width configuration,? section 4.4.3.10, ?rapidio transmit clock source,? and section 4.4.3.11, ?rapidio device id.? table 18-6. porimpscr field descriptions bits name description 0?14 ? reserved 15 pci_z pci/pci-x i/o impedance 0 low impedance 1 high impedance 16?24 ? reserved 25 lale_z i/o impedance for local bus address latch enable 0 low impedance 1 high impedance 26 ladp_z i/o impedance for local bus address/data and data parity (lad[0:31] and ldp[0:7]) 0 low impedance 1 high impedance 27 la_cke_z i/o impedance for local bus address and clock enable (la[27:31] and lcke) 0 low impedance 1 high impedance 28 lcs12_z i/o impedance for two local bus chip selects (lcs[1] and lcs[2] only). note: other chip selects use a fixed high i/o impedance 0 low impedance 1 high impedance 29 lwe_z i/o impedance for local bus write enables (lwe[0:3]) 0 low impedance 1 high impedance 30 lgpl_z i/o impedance for local bus general-purpose lines (lgpl[0:5]) 0 low impedance 1 high impedance 31 lclk_z i/o impedance for local bus clocks (lclk[0:2]) 0 low impedance 1 high impedance
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 18-8 freescale semiconductor global utilities table 18-7 describes the bit settings of pordevsr. 01 56789 13 14 1516 21222324 282931 recw00000ecppci0000 0pci_arbpci32 0 0 000 0rioclk0 0000dev_id w reset n 000_00 nn _ n 000_00 nn_ 0000_00 nn _0000_0 nn n offset 0xe_000c figure 18-4. por device status register (pordevsr) table 18-7. pordevsr field descriptions bits name description 0 ecw gigabit ethernet controller width 0 reduced (rgmii, rtbi) 1 full (mii, gmii, tbi) 1?5 ? reserved 6-7 ecp gigabit ethernet controller protocol 00 both tsec blocks use a media independent interface protocols (mii/gmii/rgmii) 01 tsec1 uses mii, tsec2 uses tbi 10 tsec1 uses tbi, tsec2 uses mii 11 both tsec blocks use a ten bit interface protocol (tbi or rtbi) 8 pci pci/pci-x mode 0 pci-x mode 1 pci mode 9?13 ? reserved 14 pci_arb pci/pci-x arbiter enable 0 pci/pci-x arbiter is disabled 1 pci/pci-x arbiter is enabled 15 pci32 pci/pci-x interface width 0 64-bit 1 32-bit 16?21 ? reserved 22?23 rioclk rapidio transmit clock source 00 reserved 01 rapidio receive clock 10 rapidio transmit clock input 11 ccb clock (default) 24?28 ? reserved 29?31 dev_id rapidio device id [5:7]
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 18-9 18.4.1.5 por debug mode status register (pordbgmsr) pordbgmsr, shown in figure 18-5 , holds debug mode settings from the por configuration pins as described in section 4.4.3.17, ?memory debug configuration,? section 4.4.3.18, ?ddr debug configuration,? and section 4.4.3.15, ?pci debug configuration.? table 18-8 describes the bit settings of pordbgmsr. 18.4.1.6 general-purpose por configuration register (gpporcr) shown in figure 18-6 , gpporcr stores the value sampled from the local bus address/data signals, lad[0:31], during por, as described in section 4.4.3.21, ?general-purpose por configuration.? software can use this value to inform the operating system about initial system configuration. typical interpretations include circuit board type, board id number, or a list of available peripherals. 045 6 78 31 r 0 0 0 0 0 mem_sel ddr_dbg pci_dbg 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w reset 0000_0 nn n_0000_0000_0000_0000_0000_0000 offset 0xe_0010 figure 18-5. por debug mode status register (pordbgmsr) table 18-8. pordbgmsr field descriptions bits name description 0?4 ? reserved 5 mem_sel memory select. indicates which controller is driving msrcid[0:4] and mdval 0 local bus controller is driving debug information 1 ddr sdram controller is driving debug information 6 ddr_dbg ddr debug configuration 0 sourceid and data valid information is being driven on ecc pins of ddr sdram interface 1 normal mode. ecc information is being driven on ecc pins of ddr sdram interface 7 pci_dbg pci/pci-x debug configuration 0 pci/pci-x drives source id onto pci_ad[62:58]. 1 pci/pci-x drives address/data 62:58 onto pci_ad[62:58]. 8?31 ? reserved 0 31 r por_cfg_vec w reset 0x nnnn _ nnnn offset 0xe_0020 figure 18-6. por configuration register (gpporcr)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 18-10 freescale semiconductor global utilities table 18-9 describes the bit settings of gpporcr. 18.4.1.7 general-purpose i/o control register (gpiocr) shown in figure 18-7 , gpiocr contains the enable bits for each group of pins that may be used for general-purpose i/o. these bits have meaning only if the pins are not being used for their primary function. note that when these signals are enabled as general-purpose i/o signals, they are read and written through gpindr and gpoutdr described in section 18.4.1.9, ?general-purpose input data register (gpindr),? and section 18.4.1.8, ?general-purpose output data register (gpoutdr).? section 18.5.2, ?general-purpose i/o signals,? describes the use of general-purpose i/o signals. table 18-10 describes the bit settings of gpiocr. table 18-9. gpporcr field descriptions bits name description 0?31 por_cfg_vec general-purpose por configuration vector sampled from local bus address/data signals at the negation of hreset . note that if nothing is driven on these signals during reset, the value of this register is indeterminate. 0567813141516 31 r0 0 00 0 0 tx2out rx2in 000000 pciout pciin 00 00000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_0030 figure 18-7. general-purpose i/o control register (gpiocr) table 18-10. gpiocr field descriptions bits name description 0?5 ? reserved 6 tx2out tsec2_tx[0:7] output enable. used to enable tsec2_tx[0:7] for use as general-purpose output if the tsec2 interface is disabled 0 tsec2_tx[0:7] is not used as general-purpose output. 1 tsec2_tx[0:7] is used as general-purpose output. 7 rx2in tsec2_rx[0:7] input enable. used to enable tsec2_rx[0:7] for use as general-purpose input if the tsec2 interface is disabled 0 tsec2_rx[0:7] is not used as general-purpose input. 1 tsec2_rx[0:7] is used as general-purpose input. 8?13 ? reserved 14 pciout pci_ad[47:40] output enable. used to enable pci_ad[47:40] for use as general-purpose output if pci interface is in 32-bit mode or is disabled 0 pci_ad[47:40] is not used as general-purpose output. 1 pci_ad[47:40] is used as general-purpose output.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 18-11 18.4.1.8 general-purpose output data register (gpoutdr) gpoutdr, shown in figure 18-8 , contains the data driven as general-purpose output on tsec2_txd[0:7] and/or pci_ad[47:40] when either of these buses is configured as general-purpose i/o buses, as described in section 18.4.1.7, ?general-purpose i/o control register (gpiocr).? writes to gpoutdr affect only pins enabled as general-purpose outputs. reads return valid data only for bits corresponding to pins enabled as general-purpose outputs. gpoutdr may be accessed using single byte writes (using big-endian addressing) so that writes to one byte do not affect outputs controlled by others. table 18-11 describes the fields of gpoutdr. 15 pciin pci_ad[39:32] input enable. used to enable pci_ad[39:32] for use as general-purpose input if the pci interface is in 32-bit mode or is disabled 0 pci_ad[39:32] is not used as general-purpose input. 1 pci_ad[39:32] is used as general-purpose input. 16?31 ? reserved 0151631 r gpout 0000000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_0040 figure 18-8. general-purpose output data register (gpoutdr) table 18-11. gpoutdr field descriptions bits name description 0?15 gpout general-purpose output data. when the corresponding signals are configured to be general-purpose output signals, the values of the bits of gpout are driven onto those pins. gpoutdr[0:7] corresponds to tsec2_txd[0:7]. gpoutdr[8:15] corresponds to pci_ad[47:40] as follows: gpoutdr[8] ? pci_ad[47] gpoutdr[9] ? pci_ad[46] gpoutdr[10] ? pci_ad[45] gpoutdr[11] ? pci_ad[44] gpoutdr[12] ? pci_ad[43] gpoutdr[13] ? pci_ad[42] gpoutdr[14] ? pci_ad[41] gpoutdr[15] ? pci_ad[40] 16?31 ? reserved, should be cleared table 18-10. gpiocr field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 18-12 freescale semiconductor global utilities 18.4.1.9 general-purpose input data register (gpindr) gpindr, shown in figure 18-9 , contains the data currently sampled as general-purpose input on tsec2_rxd[0:7] and/or pci_ad[39:32] when either of these buses is configured as general-purpose i/o buses in gpiocr (see section 18.4.1.7, ?general-purpose i/o control register (gpiocr)? ). gpindr bits are updated only if the associated bits are configured as general-purpose input pins rather than their primary functions. table 18-11 describes the fields of gpindr. 18.4.1.10 alternate function signal multiplex control register (pmuxcr) shown in figure 18-10 , pmuxcr contains bits that enable dma channels 2 and 3 which exist as alternate functions on local bus chip select pins lcs [5:7], and interrupt input pins irq[9:11], respectively. specifically, dma request, acknowledge, and done signals comprise the secondary functions for the associated irq and local bus chip select signals. 0151631 r gpin 0000000000000000 w reset nnnn_nnnn_nnnn_nnnn _0000_0000_0000_0000 offset 0xe_0050 figure 18-9. general-purpose output data register (gpindr) table 18-12. gpindr field descriptions bits name description 0?15 gpin general-purpose input data. when the corresponding signals are configured to be general-purpose input signals, the values sampled on these signals are reflected in gpin. gpindr[0:7] corresponds to tsec2_rxd[0:7]. gpindr[8:15] corresponds to pci_ad[39:32] as follows: gpindr[8] ? pci_ad[39] gpindr[9] ? pci_ad[38] gpindr[10] ? pci_ad[37] gpindr[11] ? pci_ad[36] gpindr[12] ? pci_ad[35] gpindr[13] ? pci_ad[34] gpindr[14] ? pci_ad[33] gpindr[15] ? pci_ad[32] 16?31 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 18-13 table 18-13 describes the bit settings of pmuxcr. 18.4.1.11 device disable register (devdisr) devdisr, shown in figure 18-11 , contains disable bits for various MPC8540 functional blocks. 0 141516 3031 r0 0000000000000 0 dma2 0 0000000000000 0 dma3 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_0060 figure 18-10. alternate function pin multiplex control register (pmuxcr) table 18-13. pmuxcr field descriptions bits name description 0?14 ? reserved 15 dma2 enables dma channel 2 signals 0 dma channel 2 is disabled; the pins retain their primary function as local bus chip selects 1 dma channel 2 is enabled and lcs5 functions as dma_dreq2 lcs6 functions as dma_dack2 lcs7 functions as dma_ddone2 16?30 ? reserved 31 dma3 enables dma channel 3 signals 0 dma channel 3 is disabled; the pins retain their primary function as interrupt requests. 1 dma channel 3 is enabled and irq9 functions as dma_dreq3 irq10 functions as dma_dack3 irq11 functions as dma_ddone3 01 345 101112131415 r pci 000 lbc 000 0 0 0 l2 rio 00 ddr w reset 0000_0000_0000_0000 16 17 18 20 21 22 23 24 25 26 27 28 29 30 31 r e500 tb 0 0 0 dma 00 tsec1 tsec2 fec 00 i2c duart 0 w reset 0000_0000_0000_0000 offset 0xe_0070 figure 18-11. device disable register (devdisr)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 18-14 freescale semiconductor global utilities all functional blocks are enabled after reset; unneeded blocks can be disabled to reduce power consumption or allow their signals to be used as general-purpose i/o signals. see section 18.4.1.7, ?general-purpose i/o control register (gpiocr).? blocks disabled by devdisr must not be re-enabled without a hard reset. section 18.5.1.4, ?shutting down unused blocks,? has more information on the use of devdisr. table 18-14 describes devdisr fields. . table 18-14. devdisr field descriptions bits name description 0 pci pci/pci-x controller disable 0 pci/pci-x controller enable 1 pci_ad[63:32] may be used as general-purpose i/o 1?3 ? reserved 4 lbc local bus controller disable 0 local bus controller enable 1 local bus controller disable 5?10 ? reserved 11 l2 level-2 cache disable 0 l2 cache enable 1 l2 cache disable 12 rio rapidio controller disable 0 rapidio controller enable 1 rapidio controller disable, including rapidio messaging, doorbell, and port write controllers. 13?14 ? reserved 15 ddr ddr sdram controller disable 0 ddr sdram controller enable 1 ddr sdram controller disable 16 e500 e500 core disable 0 e500 core enable 1 e500 core disable. places the core in the core-stopped state in which it does not respond to interrupts. equivalent to nap mode. instruction fetching is stopped, snooping is disabled, and clocks are shut down to all functional units of the core except for the timer facilities. for more information, see section 18.5.1.4, ?shutting down unused blocks.? 17 tb time base (timer facilities) of the e500 core disable 0 timer facilities enabled 1 timer facilities disabled 18?20 ? reserved 21 dma dma controller disabled 0 dma controller enabled 1 dma controller disabled 22?23 ? reserved 24 tsec1 three-speed ethernet controller 1 disable 0 tsec1 enabled 1 tsec1 disabled
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 18-15 18.4.1.12 power management control and status register (powmgtcsr) shown in figure 18-12 , powmgtcsr contains bits for placing the MPC8540 into low power states and for controlling when it wakes up. it also contains power management status bits. see section 18.5.1.8.2, ?interrupts and power management controlled by powmgtcsr,? for more information. table 18-15 describes the bit settings of powmgtcsr. 25 tsec2 three-speed ethernet controller 2 disable 0 tsec2 enabled 1 tsec2 disabled. rxd and txd pins may be used for general-purpose i/o 26 fec fast ethernet controller (10/100 maintenance port) disable 0 fec enabled 1 fec disabled 27?28 ? reserved 29 i2c i 2 c controller disabled 0i 2 c controller enabled 1i 2 c controller disabled 30 duart dual uart controller disabled 0 duart enabled 1 duart disabled 31 ? reserved 012 1112131415 2728293031 r irq_msk ci_msk 000000000 0 doz 0 slp 0 0 0 0 0 0 0 0 0 0 0 0 0 dozing napping slping 0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_0080 figure 18-12. power management control and status register (powmgtcsr) table 18-15. powmgtcsr field descriptions bits name description 0 irq_msk interrupt input mask 0 interrupts cause the device to wake up from a low-power state. 1 interrupts are masked as a wake-up condition. the device remains in a low-power state despite the presence of an interrupt request. 1 ci_msk critical interrupt input mask 0 critical interrupts cause the device to wake up from a low power state. 1 critical interrupts are masked as a wake-up condition. the device remains in a low-power state despite the presence of a critical interrupt. table 18-14. devdisr field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 18-16 freescale semiconductor global utilities 18.4.1.13 machine check summary register (mcpsumr) shown in figure 18-13 , mcpsumr contains bits summarizing some of the sources of a pending machine check interrupt. all mcpsumr bits function as write-one-to-clear. note register fields designated as write-one-to-clear are cleared only by writing ones to them. writing zeros to them has no effect. note that other conditions can cause a machine check condition not summarized in mcpsumr. for example, uncorrectable read errors cause the assertion of core_fault_in , which may directly cause a machine check (if hid1[rfxe] = 1). if rfxe = 0, the assertion of core_fault_in does not directly cause a machine check interrupt, but must be handled by the block that generated the error. 2?11 ? reserved 12 doz doze mode 0 no request to put device in doze mode. note that this bit is automatically cleared on mcp, ude, sreset, core_tbint (from the core) and also int and cint if not masked. 1 device is to be placed in doze mode. instruction fetching is halted in the e500 core. note that this bit is logically ored with hid0[doze]. 13 ? reserved 14 slp sleep mode 0 no request to put device in sleep mode 1 device is to be placed in sleep mode. instruction fetching is halted, snooping of l1 caches is disabled, and most functional blocks are shut down in both the e500 core and the system logic. 15?27 ? reserved 28 dozing doze status 0 device is not in doze mode 1 the MPC8540 is in doze mode because powmgtcsr[doz] is set or because hid0[doze] and msr[we] (in the e500 core) are set. the core has halted instruction fetching, but all other functional blocks in the core and device are running. 29 napping nap status 0 device is not in nap mode. 1 the MPC8540 is in nap mode because hid0[nap] and msr[we] are set. the core has halted instruction fetching, snooping of the l1 caches is disabled, and all of the core?s functional units except the timer facilities are shut down. all functional blocks in the device are r unning. 30 slping sleep status 0 device is not attempting to reach sleep mode. 1 the device is attempting to sleep because powmgtcsr[slp] is set or because hid0[sleep] and msr[we] (in the e500 core) are set. most functional blocks in the core and device are shut down or are attempting to shut down. 31 ? reserved. should be cleared. table 18-15. powmgtcsr field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 18-17 for more information about rfxe, see section 6.10.2, ?hardware implementation-dependent register 1 (hid1).? figure 18-13. machine check summary register (mcpsumr) table 18-16 describes the bit settings of mcpsumr. 18.4.1.14 processor version register (pvr) shown in figure 18-14 , the pvr contains the e500 processor version number. it is a memory-mapped copy of the pvr in the e500 core (and is therefore accessible to external devices). see section 6.5.3, ?processor version register (pvr).? section 5.2, ?e500 processor and system version numbers,? lists the complete values for the MPC8540. 0 28 29 30 31 r000000000000000000 00000000000 wrs sreset mcp_in w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_0090 table 18-16. mcpsumr field descriptions bits name description 0?28 ? reserved 29 wrs watchdog timer machine check 0 machine check exception was not caused by watchdog timer 1 machine check was caused by a soft reset condition from the e500 watchdog timer as configured in the core?s tsr. specifically, tsr[wrs] = 01 and a watchdog reset condition occurred. 30 sreset soft reset machine check 0 machine check exception was not caused by sreset assertion 1 machine check exception was caused by the assertion of the sreset input signal 31 mcp_in mcp signal asserted 0 machine check exception was not caused by mcp assertion 1 machine check exception was caused by the assertion of the mcp input signal 0151631 r version revision w reset 0x8020_ nnnn offset 0xe_00a0 figure 18-14. processor version register (pvr)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 18-18 freescale semiconductor global utilities table 18-17 describes the fields of pvr. 18.4.1.15 system version register (svr) shown in figure 18-15 , the svr contains the system version number for the MPC8540 implementation. this value can also be read though the svr spr of the e500 core. see section 6.5.4, ?system version register (svr).? section 5.2, ?e500 processor and system version numbers,? lists the complete values for the MPC8540. table 18-18 describes the fields of svr. 18.4.1.16 clock out control register (clkocr) shown in figure 18-16 , the clkocr contains control bits that select the clock sources to be placed on the clock out (clk_out) signal. table 18-17. pvr field descriptions bits name description 0?15 version a 16-bit number that identifies the version of the processor. different version numbers indicate major differences between processors, such as which optional facilities and instructions are supported. 16?31 revision a 16-bit number that distinguishes between implementations of the version. different revision numbers indicate minor differences between processors having the same version number, such as clock rate and engineering change level. 0 31 r system version w reset 0x8030_ nnnn offset 0xe_00a4 figure 18-15. system version register (svr) table 18-18. svr field descriptions bits name description 0?31 sv system version for the MPC8540 system logic 01 29 30 31 r enb 00000000000000000000000000000 clk_sel w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_0e00 figure 18-16. clock out control register (clkocr)
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 18-19 table 18-19 describes the bit settings of clkocr. 18.4.1.17 ddr dll control register (ddrdllcr) the ddrdllcr, shown in figure 18-17 , contains bits that allow control and debug of the ddr sdram controller?s dll. the dll delay chain consists of 128 tap points. table 18-20 describes the bit settings of ddrdllcr. table 18-19. clkocr field descriptions bits name description 0 enb clock out enable 0 clk_out signal is tri-stated 1 clk_out signal is driven according to clkocr[clk_sel] 1?29 ? reserved 30?31 clk_sel clock out select 00 ccb (platform) clock 01 ccb (platform) clock divided by 2 10 sysclk (echoes sysclk input) 11 sysclk divided by 2 (demonstrates platform pll lock) 0 1 4 5 7 8 15 16 20 21 23 24 31 r ovrd 0000 course_adj tap_sel 0 0 0 0 0 course_set tap w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_0e10 figure 18-17. ddr dll control register (ddrdllcr) table 18-20. ddrdllcr field descriptions bits name description 0 ovrd override mode 0 override mode disabled 1 override of current delay chain tap point with the tapsel tap point enabled 1?4 ? reserved 5?7 course_adj course adjustment value to be used by the dll when in override mode (ovrd = 1). the course adjustment is the number of ccb (platform) clock cycles of delay to inject before the delay chain. when leaving override mode (ovrd cleared), this course adjustment point serves as the starting point for a dynamic search for a lock point. 8?15 tap_sel tap select value to be used by the dll when in override mode (ovrd = 1). selects the tap point within the delay chain. when leaving override mode (ovrd cleared) this tap point serves as the starting point for a dynamic search for a lock point. 16?20 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 18-20 freescale semiconductor global utilities 18.4.1.18 local bus dll control register (lbdllcr) shown in figure 18-18 , the lbdllcr contains control bits that allow debug of the local bus controller?s dll. the delay chain of the dll is made up of 128 tap points. table 18-21 describes the bit settings of lbdllcr. 21?23 course_set reports the current course delay setting found by the dynamic search algorithm that produced a lock. measured in ccb clock cycles 24?31 tap reports the tap value found by the dynamic search algorithm that produced a lock. measured in tap points 0 1 4 5 7 8 15 16 20 21 23 24 31 r ovrd 0000 course_adj tap_sel 0 0 0 0 0 course_set tap w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_0e20 figure 18-18. local bus dll control register (lbdllcr) table 18-21. lbdllcr field descriptions bits name description 0 ovrd override mode 0 override mode disabled 1 override of current delay chain tap point with the tapsel tap point enabled 1?4 ? reserved 5?7 course_adj course adjustment value to be used by the dll when in override mode (ovrd = 1). the course adjustment is the number of ccb clock cycles of delay to inject before the delay chain. when leaving override mode (ovrd cleared) this course adjust point serves as the starting point for a dynamic search for a lock point. 8?15 tap_sel tap select value to be used by the dll when in override mode (ovrd = 1). selects the tap point within the delay chain. when leaving override mode (ovrd cleared) this tap point serves as the starting point for a dynamic search for a lock point. 16?20 ? reserved 21?23 course_set reports the current course delay setting found by the dynamic search algorithm that produced a lock. measured in ccb clock cycles 24?31 tap reports the tap value found by the dynamic search algorithm that produced a lock. measured in tap points table 18-20. ddrdllcr field descriptions (continued) bits name description
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 18-21 18.5 functional description this section describes the global utilities from a functional perspective. 18.5.1 power management the MPC8540 has features to minimize power consumption at several levels. dynamic power management locally minimizes power consumption when a block is idle. software can also shut down clocks to individual blocks when they are not needed through a memory-mapped register (devdisr). additionally, software running on the e500 core can access the core?s sprs to put the device into doze, nap, or sleep power down state. finally, software can access a memory-mapped register (powmgtcr) in the global utilities block to put the device in the doze or sleep states. note that the software that writes to either devdisr or powmgtcr can be running either on the e500 core or on an external master that can write to the MPC8540 memory-mapped registers through the rapidio or pci interfaces. these features are described in further detail in this section. 18.5.1.1 relationship between core and device power management states the MPC8540 has three low-power states: doze, nap, and sleep. the mapping of core and device power management states is shown in figure 18-19 showing state transitions from the perspective of the e500 core. figure 18-19. e500 core power management state diagram core-halted core-stopped core_halt & ? core_stop core_stop ? core_halt core_halt ? core_stop core_stop & core_halt full on ? core_halt (doze) (nap) core-stopped ? core_tben (sleep) ? core_tben core_tben
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 18-22 freescale semiconductor global utilities for each operating state represented in the diagram, the core?s state is listed first, with the corresponding state of the MPC8540 shown beneath it in parenthesis. note that there are many other variables that control the state transitions between MPC8540 power management states. these additional variables are described in more detail in section 18.5.1.7, ?power-down sequence coordination.? table 18-22 lists basic characteristics of the low-power modes and the full on mode. 18.5.1.2 ckstp_in is not power management ckstp_in is not described here because it is not considered a power management signal, although asserting it does stop the core and a stopped core is technically in a low-power mode. ckstp_in is described in section 18.3.2, ?detailed signal descriptions.? 18.5.1.3 dynamic power management many blocks in the MPC8540 can dynamically turn off clocks within the block when sections of the block are idle. this feature is always enabled and occurs automatically. 18.5.1.4 shutting down unused blocks as described in section 18.4.1.11, ?device disable register (devdisr),? devdisr provides a way to shut down certain functional blocks within the MPC8540 when they are not needed in a particular system. devdisr can be written by the e500 core or by an external master. powering down a block in this way turns off all clocks to that block. devdisr was designed with the expectation that, once initialized by software, it would be modified only by a hard system reset (hreset ). it is recommended that this register be written only during system initialization. blocks disabled by devdisr must not be re-enabled without a hard reset. (setting devdisr[tb] disables the core?s timer facilities, and setting devdisr[e500] places the core in the core-stopped state in which it does not respond to table 18-22. MPC8540 power management modes?basic description mode description core responds to signal states snoop interrupts ready asleep full on all units operating normally yes yes asserted negated doze core stops dispatching new instructions (core is halted) yes yes negated negated nap core is stopped with clocks off except to time base should flush data cache before entering no yes negated negated sleep core is stopped with clocks off. clocks powered down to all blocks (including core time base) except to the interrupt controller (pic) unit no yes negated asserted
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 18-23 interrupts.) the results of re-enabling previously disabled blocks (by clearing the corresponding devdisr field) without a hard reset are boundedly undefined. note functional blocks disabled using devdisr cannot respond to configuration accesses. any access to configuration, control, and status registers of a disabled block is a programming error. 18.5.1.5 software-controlled power-down states e500 software can place the device in doze, nap, or sleep power-down states by writing to hid0 in the core. in addition, external masters can write to the memory-mapped powmgtcr in the MPC8540 to cause the device to enter doze or sleep modes. 18.5.1.5.1 doze mode in doze mode, the e500 core suspends instruction execution, significantly reducing the power consumption of the core. snooping of the l1 data cache is still supported and thus the data in the data cache is kept coherent. interrupts directed to the core as described in section 10.1.3, ?interrupts to the processor core,? are monitored by the device and cause the MPC8540 to use the defined handshake mechanism to exit the core from doze mode to allow the core to recognize and process the interrupt; however, unless the interrupt subroutine turns off (or masks) the control bits that enabled doze mode (msr[we], and hid0[doze]), the device re-enters doze mode after the interrupt has been serviced. see section 18.5.1.8, ?interrupts and power management,? for more information. the e500 core?s timer facilities are still enabled during doze mode, and core time base interrupts can be generated. all device logic external to the core remains fully operational in doze mode. 18.5.1.5.2 nap mode in nap mode all clocks internal to the e500 core are turned off except for its timer facilities clock (the core time base). the l1 caches do not respond to snoops in nap mode, so if coherency with external i/o transactions is required, the l1 cache must be flushed before entering nap mode. similar to doze mode, interrupts occurring in nap mode cause the device to wake up the e500 core in order to service the interrupt. however, unless the interrupt service routine changes the control bits that caused the device to enter nap mode (msr[we], and hid0[nap]), the MPC8540 returns to nap mode after the interrupt is serviced. see section 18.5.1.8, ?interrupts and power management,? for more information. all device logic external to the e500 core remains fully operational in nap mode.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 18-24 freescale semiconductor global utilities 18.5.1.5.3 sleep mode in sleep mode, all clocks internal to the e500 core are turned off, including the timer facilities clock. all i/o interfaces in the device logic are also shut down. only the clocks to the MPC8540 pic are still running so that an external interrupt can wake up the device. note that the ddr controller does not shut down unless ddr_sdram_interval[refint] is set to a non-zero value. see section 9.4.1.7, ?ddr sdram interval configuration (ddr_sdram_interval) ,? for details. after the core and i/o interfaces have shut down, asleep is asserted and ready is negated. note only external interrupts can wake the MPC8540 from sleep mode. internal interrupt sources like the core interval timer or watchdog timer depend on an active clock for their operation and these are disabled in sleep mode. 18.5.1.6 power management control fields the e500 core provides the following fields to signal power management requests to the MPC8540 device logic.  msr[we]?used to qualify the values of hid0[doze,nap,sleep] in the generation of the internal doze , nap , and sleep signals  hid0[doze]?signals the MPC8540 to initiate doze mode  hid0[nap]?signals the MPC8540 to initiate nap mode  hid0[sleep]?signals the MPC8540 to initiate sleep mode these register fields and their functional relationship are shown in figure 18-20 . the e500 reference manual has details on accessing these power management control bits. an external master can also initiate power management requests by setting the doz or slp bits in the memory-mapped power management control and status register (powmgtcsr). because the core responds to snoops while dozing but not while napping, maintaining cache coherency requires significant preparation by the core before entering nap mode. for this reason only the core can initiate a nap during normal operation while other masters can initiate a doze. 18.5.1.7 power-down sequence coordination to preserve cache coherency and otherwise avoid loss of system state, the core?s transition to low-power modes is coordinated by a set of handshaking signals, shown in figure 18-20 , and protocols with all other MPC8540 functional blocks that respond to power-down requests. the mode-transition protocol is executes automatically under these conditions and is shown in figure 18-19 and described in table 18-23 .
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 18-25 the column in table 18-23 showing the global utilities block as initiating a low-power mode corresponds to the external masters that can write to the powmgtcsr that resides in the global utilities block. for the MPC8540, these are the rapidio and pci/pci-x interfaces. however, note that the core can also write to powmgtcsr and, in this case, can initiate power management through the global utilities block. as shown in figure 18-20 , the e500 core enters low-power modes only in response to the core_halt , core_stop , or core_tben inputs from the MPC8540?s power management logic. these inputs may be prompted by the core (by setting the nap, doze, or sleep bits in the hid0 when enabled by setting msr[we]) or by an external master (by setting powmgtcsr[doz,slp]. figure 18-20 shows how all the clocking to the core timer facilities is disabled by clearing hid0[tben]. when enabled, (hid0[tben] = 1), the clock source is either the ccb clock divided by eight (the default) or a synchronized version of the rtc input. for more details, see section 6.10.1, ?hardware implementation-dependent register 0 (hid0).? table 18-23. power management entry protocol and initiating functional units low- power mode entry protocol initiating functional unit global utilities core doze 1. assert core_halt input to core. 2. wait for core_halted handshake from core. ? nap 1. follow doze protocol 2. assert core_stop input to core. 3. wait for core_stopped handshake from core. ? sleep 1. follow doze protocol; send stop requests to rest of device. 2. follow nap protocol. 3. wait for all interfaces to acknowledge stop requests. 4. assert asleep, negate ready, power down all clocks except to pic unit ?
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 18-26 freescale semiconductor global utilities figure 18-20. MPC8540 power management handshaking signals msr[we] hid0[nap] hid0[doze] hid0[sleep] sleep nap doze e500 core complex device logic core_halted core_stop core_halt core_tben stop fetching instructions instruction execution stopped? yes no core_stopped stop clock distribution clock distribution stopped? yes no hid0[sel_tbclk] 8 ccb clock rtc (sampled and synchronized) snoopable traffic stopped? yes no powmgtcsr[doz] powmgtcsr[slp] note: all signals shown are internal to the device. ckstp_in hreset core_tbint core timer facilities core timer clock (time base) hid0[tben] processor interrupt sources (see table 10-2 and table 10-3 ) devdisr[tb] devdisr[e500] any transactions that are complete could have snooped
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 18-27 18.5.1.8 interrupts and power management whether low-power modes are automatically re-enabled after an interrupt is processed differs depending on whether the low power mode was entered due to a write to the core msr[we] bit or the low power mode was entered due to a write to powmgtcsr. 18.5.1.8.1 interrupts and power management controlled by msr[we] when an interrupt is asserted to the cpu, the core complex saves portions of the msr to mcsrr1, csrr1, or srr1 (depending on the type of interrupt), and restores those values on return from the routine. msr[we], which gates the doze , nap , and sleep power management outputs (internal device signals) from the core complex, is always among the bits saved and restored; hence these outputs negate to the MPC8540 power management logic when the interrupt begins processing in the core. they return to their previous state when the core executes an rfi , rfci , or rfmci instruction. section 10.1.3, ?interrupts to the processor core,? lists interrupts that cause the MPC8540 to wake up. note returning doze , nap , and sleep signals to their original state when msr[we] is restored differs from how power management is implemented on earlier powerpc devices where msr[pow], which enables power-down requests, is cleared when the processor exits a low-power state and is not automatically restored, as it is in book e implementations. 18.5.1.8.2 interrupts and power management controlled by powmgtcsr the irq_msk and ci_msk fields of the powmgtcsr register prevent int interrupts or cint critical interrupts from waking the device from a low power state. this is true regardless of the method used to enter the low power state. any unmasked interrupt (not masked by the mask bits in the powmgtcsr register) causes the powmgtcsr[doz,slp] fields to be cleared when it occurs. when such an interrupt occurs, the device returns to the normal operating mode and does not automatically attempt to return to a low power state after the interrupt is handled. note that interrupts caused by the unconditional debug event (ude ) and machine check (mcp ) signals are not masked by the irq_msk and ci_msk fields; therefore, when these signals assert, the powmgtcsr[doz,slp] fields are cleared and the device will return to full power operation. see section 18.4.1.12, ?power management control and status register (powmgtcsr),? for detailed information about the bits of powmgtcsr.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 18-28 freescale semiconductor global utilities note also that unmasked interrupts that occur while the device is in the process of going into the sleep state (before sleep is completely attained) can also cause the device to clear the powmgtcsr[doz,slp] fields and return the device to full power operation. 18.5.1.9 snooping in power-down modes when the MPC8540 is in doze mode, the e500 core is in the core-halted state and it snoops its l1 caches and full coherency is maintained. in deeper power-down modes, however, the e500 core does not respond to snoops. the MPC8540 does not perform dynamic bus snooping as described in the e500 reference manual . that is, when the e500 core is in the core-stopped state (which is the state of the core when the MPC8540 is in either the nap or sleep state), the core is not awakened to perform snoops on global transactions. therefore, before entering nap or sleep modes, the l1 caches should be flushed if coherency is required during these power-down modes. 18.5.1.10 software considerations for power management setting msr[we] generates a request to the MPC8540 logic (external to the core complex) to enter a power saving state. it is assumed that the desired power-saving state (doze, nap, or sleep) was set up by setting the appropriate hid0 bit, typically at system start-up time. setting we has no direct effect on instruction execution, but is reflected on the internal doze , nap , and sleep signals, depending on the hid0 settings. to ensure a clean transition into and out of a power-saving mode, the following program sequence is recommended: sync mtmsr (we) isync loop: br loop 18.5.1.11 requirements for reaching and recovering from sleep state in order to successfully reach the sleep state, i/o traffic to the device must be stopped. the logic that controls the power down sequence waits for all i/o interfaces to become idle. in some applications this may happen eventually without actively shutting down interfaces, but most likely, software will have to take steps to shut down the tsec, fec, pci, and rapidio interfaces before issuing the command (either the write to the core msr[we] as described above or writing to powmgtcsr) to put the device into sleep state. the rapidio and pci interfaces will begin retrying inbound transactions before entering a power down state. upon exiting sleep, the rapidio interface begins its training sequence to re-establish the link. the pci interface, however, could potentially be in an unknown state when it exits sleep if it was in the middle of a retry sequence when its internal clocks were shut down. therefore it is strongly recommended that system software clear the memory space bit in the pci bus command register before putting the device in sleep mode. software may also need to set the agent config
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 18-29 lock bit of the pci bus function register so that the device will not respond to configuration transactions. upon exiting sleep mode, software should return these configuration bits to their normal state. 18.5.2 general-purpose i/o signals several groups of signals can optionally be used as general-purpose i/o signals when not being used for their primary function. the general-purpose i/o functionality of these signals can be enabled through configuration registers in the global utilities block. these signals are the following:  pci_ad[47:40] and pci_ad[39:32]. when configured as general-purpose i/o, pci_ad[47:40] function as outputs and pci_ad[39:32] function as inputs. pci_ad[47:32] can be used as general-purpose i/o if the pci/pci-x interface is disabled or if the pci/pci-x controller is not in 64-bit mode.  tsec2_rxd[0:7] and tsec2_txd[0:7]. tsec2 pins are fixed as either inputs or outputs based on the direction of the signal?s primary function. the tsec2_txd pins are always outputs, so these signals may only be used as outputs when configured as general-purpose i/o. similarly, the tsec2_rxd pins are used as inputs when configured as general-purpose i/o. the tsec2 txd and rxd pins are available when the tsec2 block is disabled. the txd signals can then be enabled as general-purpose outputs and the rxd pins can be enabled as general-purpose inputs. when configured as general-purpose i/o signals, software can read inputs by reading the associated gpio data register. output values can be set by writing the to the associated gpio data register. for details regarding the control and status of the general-purpose i/o signals, see section 18.4.1.7, ?general-purpose i/o control register (gpiocr).? 18.5.3 interrupt and local bus signal multiplexing the MPC8540 has very little signal multiplexing. two sets of dma channel triggering signals can alternately be placed on other signals as follows: lcs [5:7] are multiplexed with dma channel 2 dma_dreq2 , dma_dack2 , and dma_done2 .  irq[9:11] are multiplexed with dma channel 3 dma_dreq3 , dma_dack3 , and dma_ddone3 . for details regarding the selection of the alternate function dma trigger, see section 18.4.1.10, ?alternate function signal multiplex control register (pmuxcr).?
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 18-30 freescale semiconductor global utilities
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 19-1 chapter 19 performance monitor this chapter describes the MPC8540 performance monitor facility, which can be used to monitor and optimize performance. the e500 core implements a separate performance monitor for strictly core-related behavior, such as instruction timing and l1 cache operations. this is described in the e500 reference manual. section 19.4.7, ?performance monitor events,? briefly describes the events that can be monitored. refer to the individual chapters for a better understanding of these events. 19.1 introduction the MPC8540 includes a performance monitor facility that can be used to monitor and record selected behaviors of the integrated device. although the performance monitor described here is similar in many respects to the performance monitor facility implemented on the e500 core, it differs in that it is implemented using memory-mapped registers and it counts events outside the e500 core, for example, rapidio, pci, ddr, and l2 cache events. performance monitor counters (pmc0?pmc8) are used to count events selected by the performance monitor local control registers. pmc0 is a 64-bit counter specifically designated to count cycles. pmc1?pmc8 are 32-bit counters that can monitor 64 counter-specific events in addition to counting 64 reference events. the benefits of the on-chip performance monitor are numerous and include the following:  because some systems or software environments are not easily characterized by signal traces or benchmarks, the performance monitor can be used to understand the MPC8540?s behavior in any system or software environment.  the performance monitor facility can be used to aid system developers when bringing up and debugging systems.  system performance can be increased by monitoring memory hierarchy behavior. this can help to optimize algorithms used to schedule or partition tasks and to refine the data structures and distribution used by each task. 19.1.1 overview figure 19-1 is a high-level block diagram of the performance monitor, which consists of a global control register (pmgc0), one 64-bit counter (pmc0), eight 32-bit counters, and two control registers per counter (18 total control registers). the global control register pmgc0 affects all
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 19-2 freescale semiconductor performance monitor counters and takes priority over local control registers. the local control registers are divided into two groups as follows:  local control a registers control counter freezing, overflow condition enable, event selection, and burstiness. local control register pmlca0, which controls counter pmc0, does not contain event selection because pmc0 counts only cycles.  local control b registers control the start and stop triggering, contain the counters? threshold values, and the value of the threshold multiplier. local control register pmlcb0, which controls pmc0, does not contain threshold information because pmc0 only counts cycles. figure 19-1. performance monitor block diagram note note that the performance monitor implemented on the core also uses registers named pmc n and pmlc xn ; however, these registers are implemented on-chip, they are accessed using the eis-defined mtpmr and mtpmr instructions, and they do not interact with the memory-mapped registers shown in figure 19-1 . performance monitor events are signalled by the functional blocks in the integrated device and are selectively recorded in the pmcs. sixty-four of these events are referred to as reference events, counters global control register pmgc0 pmlca3 pmlcb3 pmlca2 pmlcb2 pmlca1 pmlcb1 pmlca0 pmlcb0 pmc1 pmc2 pmc3 ... control logic counters and registers performance monitor event 1 event 2 event 8 event 3 event 4 ... event signals interrupt ( in t ) read data output signals pmc8 pmlca8 pmlcb8 event 0 pmc0 (upper) pmc0 (lower) 32-bit local control registers ... ...
external signal descriptions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 19-3 which can be counted on any of the eight counters. counter-specific events can be counted only on the counter where the event is defined. the performance monitor can generate an interrupt on overflow. several control registers specify how a performance monitor interrupt is signalled. the pmcs can also be programmed to freeze when an interrupt is signalled. 19.1.2 features the MPC8540 performance monitor offers a rich set of features that permits a complete performance characterization of the implementation. these features include:  one 64-bit counter exclusively dedicated to counting cycles  eight 32-bit counters that count the occurrence of selected events  one global control register (affects all counters) and two local control registers per counter  ability to count up to 64 reference events that may be counted on any of the eight 32-bit counters  ability to count up to 512 counter-specific events  triggering and chaining capability  duration threshold counting  burstiness feature that permits counting of burst events with a programmable time between bursts  ability to generate an interrupt on overflow 19.2 external signal descriptions the performance monitor does not have any signals that are driven externally (off-chip) but it does assert the internal interrupt ( int ) signal on a performance monitor interrupt condition. 19.3 memory map and register definition performance monitor registers reside in the run-time register block starting at offset 0xe_1000. this section describes the registers implemented to support the performance monitor facilities. table 19-1 lists the performance monitor registers. these registers can be read or written only with 32-bit accesses. 19.3.1 register summary the performance monitor uses nine counter registers and a group of local control registers that are used to specify the method of counting. two local control registers are associated with each counter in addition to a global control register that applies to all counters.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 19-4 freescale semiconductor performance monitor in addition to these registers, the interrupt control provides four pairs of mask registers that can be used to monitor message, interprocessor, timer, and external interrupts. see section 10.3.4, ?performance monitor mask registers (pmmrs).? table 19-1. control register memory map address offset (in hex) register access reset section/page 0xe_1000 pmgc0?performance monitor global control register r/w 0x0000_0000 19.3.2.1/19-5 0xe_1010 pmlca0?performance monitor local control register a0 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1014 pmlcb0?performance monitor local control register b0 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1018 pmc0 (upper)?performance monitor counter 0 upper r/w 0x0000_0000 19.3.3.1/19-9 0xe_101c pmc0 (lower)?performance monitor counter 0 lower r/w 0x0000_0000 19.3.3.1/19-9 0xe_1020 pmlca1?performance monitor local control register a1 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1024 pmlcb1?performance monitor local control register b1 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1028 pmc1?performance monitor counter 1 r/w 0x0000_0000 19.3.3.1/19-9 0xe_1030 pmlca2?performance monitor local control register a2 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1034 pmlcb2?performance monitor local control register b 2 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1038 pmc2?performance monitor counter 2 r/w 0x0000_0000 19.3.3.1/19-9 0xe_1040 pmlca3?performance monitor local control register a3 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1044 pmlcb3?performance monitor local control register b3 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1048 pmc3?performance monitor counter 3 r/w 0x0000_0000 19.3.3.1/19-9 0xe_1050 pmlca4?performance monitor local control register a4 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1054 pmlcb4?performance monitor local control register b4 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1058 pmc4?performance monitor counter 4 r/w 0x0000_0000 19.3.3.1/19-9 0xe_1060 pmlca5?performance monitor local control register a5 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1064 pmlcb5?performance monitor local control register b 5 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1068 pmc5?performance monitor counter 5 r/w 0x0000_0000 19.3.3.1/19-9 0xe_1070 pmlca6?performance monitor local control register a6 r/w 0x0000_0000 19.3.3.1/19-9 0xe_1074 pmlcb6?performance monitor local control register b6 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1078 pmc6?performance monitor counter 6 r/w 0x0000_0000 19.3.3.1/19-9 0xe_1080 pmlca7?performance monitor local control register a7 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1084 pmlcb7?performance monitor local control register b7 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1088 pmc7?performance monitor counter 7 r/w 0x0000_0000 19.3.3.1/19-9 0xe_1090 pmlca8?performance monitor local control register a8 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1094 pmlcb8?performance monitor local control register b8 r/w 0x0000_0000 19.3.2.2/19-5 0xe_1098 pmc8?performance monitor counter 8 r/w 0x0000_0000 19.3.3.1/19-9
memory map and register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 19-5 19.3.2 control registers this section describes the performance monitor control registers in detail. 19.3.2.1 performance monitor global control register (pmgc0) the performance monitor global control register (pmgc0), shown in figure 19-2 , is a 32-bit register used to control all pmcs. figure 19-2. performance monitor global control register (pmgc0) table 19-2 describes pmgc0 fields. 19.3.2.2 performance monitor local control registers (pmlca n and pmlcb n ) the performance monitor local control registers (pmlca n and pmlcb n ) are used to control the operation of the pmcs. the performance monitor local control a and b registers are paired 32-bit control registers that are associated with an individual counter to specify how the counter is used and what event is monitored on that counter. figure 19-3 shows the performance monitor local control a0 register (pmlca0). 01 23 31 r fac pmie fcece 00000000000000000000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_1000 table 19-2. pmgc0 field descriptions bits name description 0 fac freeze all counters. 0 pmcs are incremented (if permitted by other pmgc0/pmlc bits). 1 pmcs are not incremented. set by hardware when an interrupt is signalled and fcece =1 1 pmie performance monitor interrupt enable. interrupts are caused by pmc overflows. 0 interrupts are disabled. 1 interrupts are enabled and occur when an enabled condition or event occurs. 2 fcece (discount) freeze counters on enabled condition or event. an enabled condition or event is defined as: the msb = 1 in pmc n and pmlca n [ce] = 1. the use of the trigger and freeze counter conditions depends on the enabled condition. 0 pmcs can be incremented (if permitted by other control bits). 1 pmcs can be incremented (if permitted by other control bits) only until an enabled condition or event occurs, at which time pmgc0[fac] is set. it is up to software to clear fac. 3?31 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 19-6 freescale semiconductor performance monitor figure 19-3. performance monitor local control register a0 (pmlca0) table 19-3 describes pmlca0 fields. figure 19-4 shows the performance monitor local control registers a1?a8. figure 19-4. performance monitor local control registers a1?a8 (pmlca1?pmlca8) table 19-4 describes pmlca n fields. 01 456 31 r fc 0000 ce 00000000000000000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_1010 table 19-3. pmlca0 field descriptions bits name description 0 fc freeze counter. basic counter enable 0 the pmcs are enabled and incremented (if permitted by other spm control bits). 1 the pmcs are disabled?they do not increment. 1?4 ? reserved 5 ce condition enable. controls counter overflow condition. should be cleared when pmc0 is used as a trigger or is selected for chaining 0 overflow conditions for pmc0 cannot occur (pmc0 cannot cause interrupts or freeze counters) 1 overflow conditions occur when pmc0[msb] is set. 6?31 ? reserved 0 1 4 5 6 8 9 1516 2021 2526 31 r fc 0000 ce 000 event bsize bgran bdist w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_1020, 0xe_1030, 0xe_1040, 0xe_1050, 0xe_1060, 0xe_1070, 0xe_1080, 0xe_1090 table 19-4. pmlca1?pmlc8 field descriptions bits name description 0 fc freeze counter 0 the pmcs are incremented (if permitted by other pmc control bits). 1 the pmcs are not incremented (if permitted by other pmc control bits). 1?4 ? reserved
memory map and register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 19-7 figure 19-5 shows the performance monitor local control b0 register (pmlcb0). figure 19-5. performance monitor local control register b0 (pmlcb0) table 19-5 describes pmlcb0 fields. 5 ce condition enable 0 overflow conditions for pmc n cannot occur (pmc n cannot cause interrupts or freeze counters). should be cleared when pmc n is used as a trigger or is selected for chaining. 1 overflow conditions occur when pmc n [msb] is set. 6?8 ? reserved 9?15 event event selector. up to 128 events selectable. see table 19-10 for definition of events. 16?20 bsize burst size. fewest event occurrences that constitute a burst, that is, a rapid sequence of events followed by a relatively long pause. a value less than two implies regular event counting. any non-threshold, regular event may be counted in a bursty fashion. see section 19.4.6, ?burstiness counting,? for more information. 21?25 bgran burst granularity. the maximum number of clock cycles between events that are considered part of a single burst. see section 19.4.6, ?burstiness counting.? 26?31 bdist burst distance (used with tbmult). the number of clock cycles between bursts. must be set to a value greater than bsize for proper burstiness counting behavior. 00_0000 regular counting 01 2 5 67 8 11 12 13 14 15 16 31 r00 trigonsel 00 trigoffsel trigoncntl trigoffcntl 0 00000000000000 0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_1014 table 19-5. pmlcb0 field descriptions bits name description 0?1 ? reserved 2?5 trigonsel trigger-on select. the number of the counter that starts event counting. when the specified counter?s trigoncntl event overflows, the current counter begins counting. no triggering occurs if the value is self-referential, that is, when set to the current counter number. 6?7 ? reserved 8?11 trigoffsel trigger-off select. the number of the counter that stops event counting. when the specified counter?s trigoncntl event overflows, the current counter stops counting. no triggering occurs if the value is self-referential, that is, when set to the current counter number. table 19-4. pmlca1?pmlc8 field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 19-8 freescale semiconductor performance monitor figure 19-6 shows performance monitor local control registers b1?b8. figure 19-6. performance monitor local control registers b1?b8 (pmlcb1?pmlcb8) table 19-5 describes pmlcb n fields. 12?13 trigoncntl trigger-on control. indicates the condition under which triggering to start counting occurs 00 trigger off (no triggering to start) 01 trigger on change 10 trigger on overflow 11 reserved 14?15 trigoffcntl trigger-off control. indicates the condition under which triggering to stop occurs 00 trigger off (no triggering to stop) 01 trigger on change 10 trigger on overflow 11 reserved 16?31 ? reserved 01 2 5 67 8 11 12 13 14 15 16 20 21 23 2425 26 31 r00 trigonsel 00 trigoffsel trigoncntl trigoffcntl 0 000 0 tbmult 00 threshold w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_1024, 0xe_1034, 0xe_1044, 0xe_1054, 0xe_1064, 0xe_1074, 0xe_1084, 0xe_1094 table 19-6. pmlcb n field descriptions bits name description 0?1 ? reserved 2?5 trigonsel trigger-on select. set this field equal to the number of the counter that should trigger event counting to start. when the specified counter?s trigoncntl event overflows, the current counter begins counting. no triggering occurs when trigonsel = current counter. 6?7 ? reserved 8?11 trigoffsel trigger-off select. set this field equal to the number of the counter that should trigger event counting to stop. when the specified counter?s trigoncntl event overflows, the current counter stops counting. no triggering occurs when trigoffsel = current counter. 12?13 trigoncntl trigger-on control. indicates the condition under which triggering to start counting occurs 00 trigger off (no triggering to start) 01 trigger on change 10 trigger on overflow 11 reserved table 19-5. pmlcb0 field descriptions (continued) bits name description
memory map and register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 19-9 19.3.3 counter registers this section describes the pmcs in detail. note because accessing a pmc manually has priority over incrementing it due to event counting, reading or writing a pmc while it is counting may affect the count. likewise, accessing a performance monitor control register while its target counter is counting may also affect the count. 19.3.3.1 performance monitor counters (pmc0?pmc8) pmc0?pmc8 are used to count events selected by the performance monitor local control registers. pmc0, shown in figure 19-7 , is associated with two 32-bit registers that form a 64-bit counter designated to count clock cycles. pmc0 upper represents the upper 32 bits of counter 0, and pmc0 lower represents the lower 32 bits. 14?15 trigoffcntl trigger-off control. indicates the condition under which triggering to stop occurs 00 trigger off (no triggering to stop) 01 trigger on change 10 trigger on overflow 11 reserved 16?20 ? reserved 21?23 tbmult threshold and burstiness multiplier. threshold events are counted when the event duration exceeds a specified threshold value. the threshold is scaled based on the tbmult settings. the burst distance for burstiness counting is also scaled using the tbmult settings. for all events that scale the threshold, the threshold field is multiplied by the factors shown below (ranging from 1 to 128). 000 1 001 2 010 4 011 8 100 16 101 32 110 64 111 128 24?25 ? reserved 26?31 threshold threshold. only events whose (number of) occurrences exceed this value are counted. by varying the threshold value, software can characterize the events subject to the threshold. for example, if pmc2 counts tsec bd read latencies for which the duration exceeds the threshold, software can obtain the distribution of tsec bd read latencies for a given program by monitoring the program repeatedly using a different threshold value each time. table 19-6. pmlcb n field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 19-10 freescale semiconductor performance monitor figure 19-7. performance monitor counter register 0 (pmc0) table 19-7 describes pmc0 fields. . pmc1?pmc8, shown in figure 19-8 , are 32-bit counters that can monitor 64 unique events in addition to the 64 reference events that can be counted on all of these registers. figure 19-8. performance monitor counter registers 1?8 (pmc1?pmc8) table 19-8 describes pmc n fields. 19.4 functional description this section describes the use of some features of the performance monitor. 19.4.1 performance monitor interrupt pmcs can generate an interrupt on an overflow when the msb of a counter changes from 0 to 1. for the interrupt to be signalled, the condition enable bit (pmlca n [ce]) and performance monitor interrupt enable bit (pmgc0[pmie]) must be set. when an interrupt is signalled and the 0313263 r pmc0 upper pmc0 lower w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_1018 0xe_101c table 19-7. pmc0 field descriptions bits name description 0?63 pmc0 event count. counts only clock cycles 0 31 r pmc n w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_1028, 0xe_1038, 0xe_1048, 0xe_1058, 0xe_1068, 0xe_1078, 0xe_1088, 0xe_1098 table 19-8. pmc n field descriptions bits name description 0?31 pmc n event count. an overflow is indicated when the msb = 1. manually setting the msb can cause an immediate interrupt.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 19-11 freeze-counters-on-enabled-condition-or-event bit (pmgc0[fcece]) is set, pmgc0[fac] is set by hardware and all of the registers are frozen. software can clear the interrupt condition by resetting the performance monitor and clearing the most significant bit of the counter that generated the overflow. 19.4.2 event counting using the control registers described in section 19.3.2, ?control registers,? the nine pmcs can count the occurrences of specific events. the 64-bit pmc0 is designated to count only clock cycles. however, to provide flexibility, a total of 64 reference events can be counted on any of the 32-bit pmcs (pmc1?pmc8). additionally, up to 64 unique events can be counted on each 32-bit counter. the performance monitor must be reset before event counting sequences. the performance monitor can be reset by first freezing one or more counters and then clearing the freeze condition to allow the counters to count according to the settings in the performance monitor registers.tcounters can be frozen individually by setting pmlcan[fc] bits, or simultaneously by setting pmgc0[fac]. simply clearing these freeze bits will then allow the performance monitor to begin counting based on the register settings.t note that using pmlcan[fc] to reset the performance monitor resets only the specified counter. performance monitor registers can be configured through reads or writes while the counters are frozen as long as freeze bits are not cleared by the register accesses. 19.4.3 threshold events the threshold feature allows characterization of events that can take a variable number of clock cycles to occur. threshold events are counted only if the latency is greater than the threshold value specified in pmlcb n [threshold]. for duration threshold event sequences, the pmc increments only when the duration of the event is equal to or greater than the threshold value. the threshold value is scaled by a multiple specified in pmlcb n [tbmult]. a threshold event requires two signals: the first indicates when a threshold event sequence begins, and the second indicates when it ends. an internal counter determines when the threshold count is exceeded and when the pmc can increment. this internal counter decrements during a threshold event sequence until it reaches the value of one. a new sequence cannot begin until the current one completes. additional threshold start signals are ignored during a sequence until a threshold stop signal occurs. if both a start and stop signal are asserted during the same cycle in a current sequence, the stop terminates the current sequence and the start signals the beginning of a new one. however, if both signals are asserted during the same cycle while not in a current event sequence, both signals are ignored. figure 19-9 is a timing diagram for duration threshold event counting.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 19-12 freescale semiconductor performance monitor an illegal condition exists if the threshold value obtained from pmlcb n [threshold] and pmlcb n [tbmult] is less than two. under these conditions the intent of threshold counting is ambiguous. figure 19-9. duration threshold event sequence timing diagram 19.4.4 chaining by configuring one counter to increment each time another counter overflows, several counters can be chained together to provide event counts larger than 32 bits. each counter in a chain adds 32 bits to the maximum count. the register chaining sequence is not arbitrary and is specified indirectly by selecting the register overflow event to be counted. selecting an event has the effect of selecting a source register because all available chaining events, as shown in table 19-10 , are dedicated to specific registers. note that the chaining overflow event occurs when the counter reaches its maximum value and wraps, not when the register?s msb is set. for this overflow to occur, pmlca n [ce] should be cleared to avoid signalling an interrupt when the counter?s most-significant bit is set. note that several cycles may be required for the chained counters to reflect the true count because of the internal delay between when an overflow occurs and a counter increments. 19.4.5 triggering triggering allows one counter to start or stop counting on the change of another counter or on the overflow of another counter. more specifically, if pmc1 is set to start or stop counting as a result of a change or overflow in counter pmc2, then counter pmc2 must be identified in the local thresh_value thresh_start thresh_stop thresh_counter thresh_exceeded 32 1 3 32 1 2 3 1 0 3 pmlcb n [threshold] pmlcb n [tbmult] perfmon_counter 0 1 2 123456789101112 1 for this example a threshold value of three indicates that the user wishes to count the number of times a particular event lasts three cycles or longer.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 19-13 control register of counter pmc1. this is done by appropriately setting the trigger-on select bit or trigger-off select bit (pmlcb1[trigoffsel] or pmlcb1[trigonsel]). additionally, the condition that triggers the counter must be selected by configuring the corresponding control bits (pmlcb1[trigoncntl] or pmlcb1[trigoffcntl]). assuming the counter is enabled by other control register settings, the counter increments (or freezes) when its specified event occurs after the trigger-on (or off) condition occurs. when trigger on and trigger off are both selected, the trigger-off condition is ignored until the trigger-on condition has occurred. furthermore, when a trigger-off condition occurs, the counter state is preserved; it is not restarted by subsequent trigger-on conditions. triggering is disabled when the counter?s trigger-select bits specify itself as the trigger source. similarly, triggering is disabled when the trigger control bits are cleared. 19.4.6 burstiness counting the burstiness counting feature makes it easier to characterize events that occur in rapid succession followed by a relatively long pause. as shown in table 19-9 , event bursts are defined by size, granularity, and distance. figure 19-10 shows the relationships between size, granularity, and distance. burstiness counting can be performed for all events except threshold events. figure 19-10. burst size, distance, granularity, and burstiness counting the burstiness size field (pmlca n [bsize]) specifies the minimum number of event occurrences that constitute a burst. a burst is identified when the number of event occurrences equals or exceeds pmlca n [bsize]. furthermore, these individual event occurrences must be separated by no more clock cycles than the value in the burstiness granularity field (pmlca n [bgran]). note table 19-9. burst definition parameter description register field size the minimum number of events constituting a burst pmlca n [bsize] granularity the maximum time between individual events counted as members of the same burst pmlca n [bgran] distance the minimum time between bursts pmlca n [bdist] x pmlcb n [tbmult] burst size burst granularity event occurrence time burst size burst distance (cycles)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 19-14 freescale semiconductor performance monitor that, although a burst is identified when the minimum number of events occurs, it is not counted until the burst sequence has ended. a burst sequence ends when the specified burstiness granularity is exceeded, at which point the last valid event has occurred for that sequence. pmlca n [bgran] specifies the maximum number of cycles between individual events for them to qualify as members of the same burst sequence. the burstiness distance field (pmlca n [bdist]) and threshold/burstiness multiplier field (pmlcb n [tbmult]) specify the acceptable number of cycles between the end of a burst sequence and the beginning of a new sequence for a group of event occurrences to be counted as an individual burst. the product of the burstiness distance field and the threshold/burstiness multiplier field determine the burstiness distance value used to determine when another burst sequence can begin. note that the burst distance count begins when a new burst sequence ends and the pmc is incremented. no new burst sequence may begin until the burst distance count has reached zero. after the burst distance count reaches zero, it holds the zero value indicating that a new burst sequence can be counted. the burst distance count begins again when a new burst sequence is identified and counted. burstiness counting is disabled when the definition of a burst is ambiguous, that is, when the burst size field is less than two, or the burst distance is zero. when burstiness counting is disabled, regular counting is allowed. figure 19-10 shows that the burst distance is measured from the end of one burst sequence and that a new burst sequence may not begin until the burst distance count expires. three internal counters track the different values required for burstiness counting.  burstiness size is monitored by a counter. it is loaded with the value specified in the local control register when the burst granularity counter and the burst distance counters reach zero, and no new event is occurring. it always decrements when the following conditions occur: its value is not already zero, an event occurs, and the burst distance count equals zero.  burstiness granularity is monitored by a counter that is loaded with the specified value in the local control register on the rising edge of an event occurrence whenever the burst distance count equals zero. the granularity counter is decremented (if it has not already reached zero) when an event is not occurring and burst distance count equals zero.  burstiness distance is measured by a counter that is loaded with the product of pmlcb n [bdist] and pmlcb n [tbmult] when a burst sequence has been identified and counted. this counter is decremented when burstiness counting is enabled (and the counter has not already reached zero). a burst is counted at the end of a burst sequence when the three burst parameter counters are all equal to zero. figure 19-11 shows a burstiness counting example.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 19-15 figure 19-11. burstiness counting timing diagram 19.4.7 performance monitor events table 19-10 lists performance monitor events specified in pmlca1?pmlc8. the event assignment column indicates the event?s type and number, using the following formats:  ref:#?reference events are shared across counters pmc1?pmc8. the number indicates the event. for example, ref:6 means that pmc1?pmc8 share reference event 6.  c[0?8]:#?counter-specific events. c8 indicates an event assigned to pmc8. thus c8:62 means pmc8 is assigned event 62 (pic interrupt wait cycles). note that with counter-specific events, an offset of 64 must be used when programming the field, because counter-specific events occupy the bottom 64 values of the 7-bit event field where events are numbered. for example, to specify counter-specific event 0, the event field must be programmed to 64. counter events not specified in table 19-10 are reserved. table 19-10. performance monitor events event counted number description of event counted general events nothing ref:0 register counter holds current value system cycles c0 ccb (platform) clock cycles burst size counter burst granularity counter burst distance counter pmlcb n [bgran] pmlcb n [bsize] 123456789101112 pmlcb n [bdist] pmlcb n [tbmult] burst count 14 15 16 17 18 19 20 21 22 23 24 25 13 26 1 0 1 01 4 53 2 10 5 0 4 32 1 0 1 54 1 5 4 1 (multiply by 2) 1 0 0 4321 0 1 for this example: count bursts of 5 event occurrences, burst granularity of 1, and acceptable distance between bursts of 8 (product of tbmult and bdist). 8 7 6 5
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 19-16 freescale semiconductor performance monitor ddr memory controller events cycles a read is returning data from ddr sdram ref:10 each data beat returned to the memory controller on the ddr sdram interface cycles a read or write transfers data from (or to) ddr sdram ref:11 each data beat transferred to or from the ddr sdram pipelined read misses in the row open table c1:57 row open table read misses issued while a read is outstanding pipelined read or write misses in the row open table c2:0 row open table read or write misses issued while a read or write is outstanding non-pipelined read misses in the row open table c3:60 row open table read misses issued when no reads are outstanding non-pipelined read or write misses in the row open table c4:0 row open table read or write misses issued when no reads or writes are outstanding pipelined read hits in the row open table c5:56 row open table read hits issued when a read is outstanding pipelined read or write hits in the row open table c6:0 row open table read or write hits issued when a read or write is outstanding non-pipelined read hits in the row open table c7:57 row open table read hits issued when no reads are outstanding non-pipelined read or write hits in the row open table c8:0 row open table read or write hits issued when no reads or writes are outstanding forced page closings not caused by a refresh c1:0 precharges issued to the ddr sdram for any reason except refresh. the possibilities are as follows:  a new transaction must be issued to an already active bank and sub-bank that has a different row open.  a new transaction must be issued, but the row open table is full and there is no bank/sub-bank match between the current transaction and the row open table.  the bstopre interval expired for an open row. row open table misses c2:1 transactions that miss in the row open table row open table hits c3:0 transaction that hit in the row open table force page closings c4:1 forced page closings including those due to refreshes read-modify-write transactions due to ecc c5:0 if ecc is enabled and a transaction requires byte enables, a read-modify-write sequence is issued on the ddr sdram interface. forced page closings due to collision with bank and sub-bank ref:12 increments if a new transaction must be issued to an active bank and sub-bank that has a different row open reads or writes from core ref:13 ? reads or writes from tsec 1 c3:1 ? reads or writes from tsec 2 c4:2 ? table 19-10. performance monitor events (continued) event counted number description of event counted
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 19-17 reads or writes from rapidio c3:2 ? reads or writes from pci c4:3 ? reads or writes from dma c5:2 ? row open table hits for reads or writes from core ref:14 ? row open table hits for reads or writes from tsec 1 c6:1 ? row open table hits for reads or writes from tsec 2 c7:0 ? row open table hits for reads or writes from rapidio c6:2 ? row open table hits for reads or writes from pci c7:1 ? row open table hits for reads or writes from dma c8:2 ? memory target queue events mem tq read/write address collision c5:5 ? rapidio controller events misaligned transactions on rapidio c4:11 new transactions loaded into the misaligned engine retried packets on rapidio transmit due to resource limitations c2:62 includes only packets that caused the retry, not ignored packets that must be resent flushed packets due to prior retries or error recovery on rapidio transmit c3:10 includes the packet being acknowledge retried retried or not accepted packets on rapidio rx c5:7 includes only retried or unaccepted packets from a remote device, not ignored packets that must be resent misaligned engine priority 2 occupied c5:12 misaligned engine for priority 2 transactions busy misaligned engine priority 1 occupied c6:12 ? misaligned engine priority 0 occupied c7:10 misaligned engine for priority 0 transactions busy ack history queue full c4:61 unacked packets are outstanding. outbound rapidio stopped for training event c6:13 event asserted during cycles when packet transmission is stopped for training. rapidio outbound retry-stopped event c7:11 outbound port is stopped due to an inbound ack retry outbound rapidio error-stopped event c8:11 outbound port is stopped due to an inbound ack not accepted inbound message packet protocol level retry c4:18 ? table 19-10. performance monitor events (continued) event counted number description of event counted
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 19-18 freescale semiconductor performance monitor inbound doorbell packet protocol level retry c6:14 ? rapidio outbound ack timeout/ out-of-order event c8:12 an ack timeout or an out of sequence ack has been detected by the ack history queue. dma controller events channel 0 read request c1:2 dma channel 0 read request active in the system channel 1 read request c2:5 dma channel 1 read request active in the system channel 2 read request c3:4 dma channel 2 read request active in the system channel 3 read request c4:6 dma channel 3 read request active in the system channel 0 write request c1:3 dma channel 0 write request active in the system channel 1 write request c2:6 dma channel 1 write request active in the system channel 2 write request c3:5 dma channel 2 write request active in the system channel 3 write request c4:7 dma channel 3 write request active in the system channel 0 descriptor request c5:41 dma channel 0 descriptor request active in the system channel 1 descriptor request c6:44 dma channel 1 descriptor request active in the system channel 2 descriptor request c7:41 dma channel 2 descriptor request active in the system channel 3 descriptor request c8:41 dma channel 3 descriptor request active in the system channel 0 read dw or less c1:4 and c5:53 dma channel 0 read double word valid channel 1 read dw or less c2:7 and c6:58 dma channel 1 read double word valid channel 2 read dw or less c3:6 and c7:54 dma channel 2 read double word valid channel 3 read dw or less c4:8 and c8:52 dma channel 3 read double word valid channel 0 write dw or less c1:5 dma channel 0 write double word valid channel 1 write dw or less c2:8 dma channel 1 write double word valid channel 2 write dw or less c3:7 dma channel 2 write double word valid channel 3 write dw or less c4:9 dma channel 3 write double word valid e500 coherency module (ecm) events ecm request wait core c8:13 asserted for every cycle core request occurs ecm request wait tsec1 c5:16 asserted for every cycle tsec1 request occurs ecm request wait tsec2 c6:16 asserted for every cycle tsec2 request occurs ecm request wait pci/rapidio/dma c4:20 asserted for every cycle pci request occurs ecm dispatch ref:15 ecm dispatch (includes address only?s) note: all ecm dispatch events are for committed dispatches ecm dispatch from core c1:16 ecm dispatch from core (includes address only?s) table 19-10. performance monitor events (continued) event counted number description of event counted
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 19-19 ecm dispatch from tsec1 c3:19 ? ecm dispatch from tsec2 c4:21 ? ecm dispatch from rapidio c5:17 ? ecm dispatch from pci c6:17 ? ecm dispatch from dma c7:14 ? ecm dispatch from other c8:14 ? ecm dispatch to ddr c4:22 ? ecm dispatch to l2/sram c5:18 ? ecm dispatch to lbc c6:18 ? ecm dispatch to rapidio c7:15 ? ecm dispatch to pci c8:15 ? ecm dispatch snoopable c3:20 ? ecm dispatch write c1:17 ? ecm dispatch write allocate c2:21 ? ecm dispatch write allocate lock c3:21 ? ecm dispatch read c4:23 ? ecm dispatch read unlock c5:19 ? ecm dispatch read clear atomic c6:19 ? ecm dispatch read set atomic c7:16 ? ecm dispatch read decrement atomic c8:16 ? ecm dispatch read increment atomic c7:17 ? ecm data bus grant ddr c1:18 ? ecm data bus grant lbc c2:22 ? ecm data bus grant pic c1:19 ? ecm data bus grant tsec1 c3:23 ? ecm data bus grant tsec2 c4:25 ? ecm data bus wait ddr c5:20 ? ecm data bus wait lbc c6:20 ? ecm data bus wait pic c5:21 ? ecm data bus wait tsec1 c7:19 ? ecm data bus wait tsec2 c8:18 ? ecm global data bus beat ref:16 ? table 19-10. performance monitor events (continued) event counted number description of event counted
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 19-20 freescale semiconductor performance monitor ecm e500 direct read bus beat ref:17 ? ecm e500 direct read bus beat forwarded c2:24 ecm direct read bus beat forwarded directly to e500 r1 data bus ecm cancel ref:18 ? interrupt controller (pic) events pic total interrupt count ref:26 total number of interrupts serviced pic interrupt wait cycles c8:62 counts cycles when an interrupt waits to be acknowledge pic interrupt service cycles c2:19 number of cycles there is an interrupt currently being serviced pic interrupt select 0 (duration threshold) c1:56 threshold: select 0?3: interrupt count over threshold. (note: only unmasked, nonzero priority requests are acknowledged). the four interrupts are selected through register pairs, pm0mr n ?pm3mr n . see section 10.3.4, ?performance monitor mask registers (pmmrs).? pic interrupt select 1 (duration threshold) c3:59 pic interrupt select 2 (duration threshold) c5:55 pic interrupt select 3 (duration threshold) c6:60 pci/pci-x common events pci/pci-x clock cycles ref:28 ? pci/pci-x inbound memory reads c1:62 includes all read types pci/pci-x inbound memory writes c2:37 ? pci/pci-x inbound config reads c3:63 ? pci/pci-x inbound config writes c4:37 ? pci/pci-x outbound memory reads c5:30 includes all read types pci outbound memory writes/pci-x outbound memory writes attempted c6:32 number of pci outbound memory writes or number of pci-x outbound memory writes attempted pci/pci-x outbound i/o reads c3:37 ? pci/pci-x outbound i/o writes c4:38 ? pci outbound config reads/pci-x outbound config reads attempted c7:26 number of pci outbound config reads or number of pci-x outbound config reads attempted pci/pci-x outbound config writes c8:26 ? pci/pci-x inbound total read data beats c5:32 includes 32- and 64-bit transactions pci/pci-x inbound total write data beats c6:34 includes 32- and 64-bit transactions pci/pci-x outbound total read data beats c7:28 includes 32- and 64-bit transactions table 19-10. performance monitor events (continued) event counted number description of event counted
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 19-21 pci/pci-x outbound total write data beats c8:28 includes 32- and 64-bit transactions pci/pci-x inbound 32-bit read data beats c1:30 ? pci/pci-x inbound 32-bit write data beats c2:38 ? pci/pci-x outbound 32-bit read data beats c3:38 ? pci/pci-x outbound 32-bit write data beats c4:39 ? pci/pci-x inbound 64-bit read data beats c5:31 ? pci/pci-x inbound 64-bit write data beats c6:33 ? pci/pci-x outbound 64-bit read data beats c7:27 ? pci/pci-x outbound 64-bit write data beats c8:27 ? pci/pci-x total transactions c7:29 includes 32- and 64-bit transactions pci/pci-x 64-bit transactions c8:29 ? pci/pci-x inbound purgeable reads c2:2 ? pci/pci-x inbound (speculative reads) purgeable reads discarded c8:63 pci/pci-x idle cycles c1:31 ? pci/pci-x dual address cycles c2:40 ? pci/pci-x internal cycles c3:39 ? pci inbound memory read pci-x inbound memory 32-bit read c1:34 ? pci inbound memory readline pci-x inbound memory alias read c2:44 ? pci inbound memory read multiple pci-x inbound memory block read c3:42 ? pci outbound memory reads/pci-x outbound memory dword reads attempted c4:43 number of pci outbound memory reads or number of pci-x outbound memory dword reads attempted pci outbound memory read lines/ pci-x outbound memory burst read attempted c5:36 number of pci outbound memory read lines or number of pci-x outbound memory burst reads attempted table 19-10. performance monitor events (continued) event counted number description of event counted
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 19-22 freescale semiconductor performance monitor pci wait pci-x initial wait c1:35 pci_irdy , pci_trdy not both asserted pci specific events pci cycles pci_irdy is asserted c6:36 ? pci cycles pci_trdy is asserted c7:31 ? pci cycles pci_frame is asserted c8:31 ? pci-x 1 split transaction c2:41 number of pci-x cycles there are 1 or more outbound read transactions awaiting completion (either waiting for a split response, or a partially transacted dword disconnected by a sdpd, awaiting completion) pci-x 2 split transactions c3:40 number of pci-x cycles there are 2 or more outbound read transactions awaiting completion (either waiting for a split response, or a partially transacted dword disconnected by a sdpd, awaiting completion) pci-x 3 split transactions c4:41 number of pci-x cycles there are 3 or more outbound read transactions awaiting completion (either waiting for a split response, or a partially transacted dword disconnected by a sdpd, awaiting completion) pci-x 4 split transactions c5:34 number of pci-x cycles there are 4 outbound read transactions awaiting completion (either waiting for a split response, or a partially transacted dword disconnected by a sdpd, awaiting completion) pci-x split responses c6:37 split responses received for an outbound transactions pci-x adb disconnects c7:32 ? pci/pci-x snoopable c1:32 ? pci/pci-x write stash c2:42 ? pci/pci-x write stash with lock c3:41 ? pci/pci-x read unlock c4:42 ? pci/pci-x byte enable transactions c1:33 ? pci/pci-x non-byte enable transactions c2:43 ? three-speed ethernet controller (tsec) events tsec1 address data filtering (adf) events accepted frames ref:36 ? individual hash table accepted frame c7:35 ? group hash table accepted frame c8:35 ? rejected frames ref:39 ? table 19-10. performance monitor events (continued) event counted number description of event counted
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 19-23 dropped frames ref:38 dropped frames that could have been accepted (data overflow, status overflow and lack of bds) dropped frames due to data overflow c1:41 frames dropped because of overflow in the fifo and 256-byte buffer dropped frames due to status overflow c2:50 frames dropped because of inability to write status for one frame and a new frame starts tsec1 fifo events receive fifo data valid c1:45 ? transmit frames without threshold c7:44 transmit frames that do not hit tx fifo threshold receive fifo above 1/4 ref:47 ? receive fifo above 1/2 ref:48 ? receive fifo above 3/4 ref:49 ? dma reads c1:47 descriptor and data reads bd reads c2:54 txbd and rxbd reads rxbd reads c3:51 rxbd reads (transmit number can be calculated by subtracting this number from total) dma writes c4:52 writes (descriptor and data) bd writes c5:46 txbds and rxbds closed rxbd writes c6:49 rxbds closed (transmit number can be calculated by subtracting this number from total) rxbd read latency (duration threshold) ref:41 times rxbd read latency exceeds threshold (threshold event) start: request asserted stop: data acknowledge received txbd read latency (duration threshold) ref:42 times txbd read latency exceeds threshold (threshold event) start: request asserted stop: data acknowledge received rxbd write latency (duration threshold) ref:43 times rxbd write latency exceeds threshold (threshold event). only for writes that require a response start: request asserted stop: end of transaction received txbd write latency (duration threshold) ref:44 times txbd write response latency exceeds threshold (threshold event). only for writes that require a response start: request asserted stop: end of transaction received tx data read latency (duration threshold) ref:45 times data read response latency exceeds threshold (threshold event) start: request asserted stop: data acknowledge received table 19-10. performance monitor events (continued) event counted number description of event counted
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 19-24 freescale semiconductor performance monitor data beats c7:48 ? read data beats c8:46 ? rx frame interrupts c1:49 times receive frame interrupt is set. event occurs when the bd receive interrupt is set on a last bd tx frame interrupts c3:53 times a transmit frame interrupt is set. event occurs when the bd transmit interrupt is set on a bd with l = 1 rx frame processing (duration threshold) ref:46 times frame processing exceeds threshold (threshold event) start: open first bd stop: close last bd tsec2 address data filtering (adf) events accepted frames ref:50 ? individual hash table accepted frame c7:36 ? group hash table accepted frame c8:36 ? rejected frames ref:53 ? dropped frames ref:52 dropped frames that could have been accepted (data overflow, status overflow and acknowledgement of bds) dropped frames due to data overflow c1:42 frames dropped because of overflow in the fifo and 256-byte buffer dropped frames due to status overflow c2:51 frames dropped because of inability to write status for one frame and a new frame starts tsec2 fifo events receive fifo data valid c1:46 receive fifo contains receive data transmit frames without threshold c7:45 transmit frames that do not hit tx fifo threshold receive fifo above 1/4 ref:61 ? receive fifo above 1/2 ref:62 ? receive fifo above 3/4 ref:63 ? tsec2 dma events dma reads c1:48 descriptor and data reads bd reads c2:55 transmit and rxbd reads rxbd reads c3:52 times that rxbd reads (transmit number can be calculated by subtracting this number from total) dma writes c4:53 descriptor and data writes bd writes c5:47 times that txbds and rxbds closed rxbd writes c6:50 times rxbds closed (transmit number can be calculated by subtracting this number from total) table 19-10. performance monitor events (continued) event counted number description of event counted
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 19-25 rxbd read latency (duration threshold) ref:55 times rxbd read latency exceeds threshold (threshold event) start: request asserted stop: data acknowledge received txbd read latency (duration threshold) ref:56 times txbd read latency exceeds threshold (threshold event) start: request asserted stop: data acknowledge received rxbd write latency (duration threshold) ref:57 times rxbd write response latency exceeds threshold (threshold event). only for writes that require a response start: request asserted stop: end of transaction received txbd write latency (duration threshold) ref:58 times that txbd write response latency exceeds threshold (threshold event). only for writes that require a response start: request asserted stop: end of transaction received tx data read latency (duration threshold) ref:59 data read response latency exceeds threshold (threshold event) start: request asserted stop: data acknowledge received data beats c7:49 ? read data beats c8:47 ? rx frame interrupts c1:50 bd receive interrupt is set on a last bd tx frame interrupts c3:54 bd transmit interrupt is set on a bd with l = 1 rx frame processing ref:60 receive frame processing exceeds threshold (threshold event) start: open first bd stop: close last bd local bus events bank 1 hits (chip-select) c1:51 ? bank 2 hits (chip-select) c2:56 ? bank 3 hits (chip-select) c3:55 ? bank 4 hits (chip-select) c4:54 ? bank 5 hits (chip-select) c5:48 ? bank 6 hits (chip-select) c6:53 ? bank 7 hits (chip-select) c7:50 ? bank 8 hits (chip-select) c8:50 ? requests granted to ecm port c2:57 ? cycles atomic reservation for ecm port is enabled c4:55 table 19-10. performance monitor events (continued) event counted number description of event counted
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 19-26 freescale semiconductor performance monitor atomic reservation time-outs for ecm port c6:54 ? cycles a read is taking in gpcm c1:53 ? cycles a read is taking in upm c2:58 ? cycles a read is taking in sdram c3:57 ? cycles a write is taking in gpcm c4:56 ? cycles a write is taking in upm c5:50 ? cycles a write is taking in sdram c6:55 ? sdram bank misses c7:51 ? sdram page misses c8:51 ? l2 cache/sram events core instruction accesses to l2 that hit ref:22 ? core instruction accesses to l2 that miss c2:59 ? core data accesses to l2 that hit ref:23 ? core data accesses to l2 that miss c4:57 ? non-core burst write to l2 (cache external write or sram) c5:51 ? non-core non-burst write to l2 c6:56 ? noncore write misses cache external write window and sram memory range c7:52 ? non-core read hit in l2 ref:24 ? non-core read miss in l2 c1:54 ? l2 allocates, from any source ref:25 ? l2 retries due to full write queue c2:60 ? l2 retries due to address collision c3:58 ? l2 failed lock attempts due to full set c4:58 ? l2 victimizations of valid lines c5:52 ? l2 invalidations of lines c6:57 ? l2 clearing of locks c7:53 ? debug events external event c3:61 number of cycles trig_in pin is asserted watchpoint monitor hits c2:61 ? table 19-10. performance monitor events (continued) event counted number description of event counted
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 19-27 19.4.8 performance monitor examples table 19-12 contains sample register settings for the four supported modes.  simple event performance monitoring example  triggering event performance monitoring example  threshold event performance monitoring example  burstiness event performance monitoring example the settings in table 19-11 are identical for all four examples. for simple event counting, a non-threshold event is selected in pmlca n [event] and all other features are disabled by clearing all register fields except for ce. trace buffer hits c1:58 ? duart events uart0 baud rate c1:63 ? uart1 baud rate c5:63 ? chaining events pmc0 carry-out ref:1 pmc0[0] 1-to-0 transitions pmc1 carry-out ref:2 pmc1[0] 1-to-0 transitions. reserved for pmc1. pmc2 carry-out ref:3 pmc2[0] 1-to-0 transitions. reserved for pmc2. pmc3 carry-out ref:4 pmc3[0] 1-to-0 transitions. reserved for pmc3. pmc4 carry-out ref:5 pmc4[0] 1-to-0 transitions. reserved for pmc4. pmc5 carry-out ref:6 pmc5[0] 1-to-0 transitions. reserved for pmc5. pmc6 carry-out ref:7 pmc6[0] 1-to-0 transitions. reserved for pmc6. pmc7 carry-out ref:8 pmc7[0] 1-to-0 transitions. reserved for pmc7. pmc8 carry-out ref:9 pmc8[0] 1-to-0 transitions. reserved for pmc8. table 19-11. pmgc0 and pmlca n settings field setting reason pmgc0[fac] 0 counters must not be frozen. pmgc0[pmie] 1 performance monitor interrupts are enabled. pmgc0[fcece] 1 counters should be frozen when an interrupt is signalled. pmlca n [fc] 0 counters cannot be frozen for counting. pmlca n [ce] 1 overflow condition enable is required to allow interrupt signalling. table 19-10. performance monitor events (continued) event counted number description of event counted
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 19-28 freescale semiconductor performance monitor for the triggering example any event can be selected in pmlca n [event]. all other features are disabled by clearing these register fields except for ce to allow interrupt signalling. if pmlcb n [trigonsel] is 3 and pmlcb n [trigoffsel] is 5, the counter begins and ends counting based on the conditions in counters three and five. furthermore, if pmlcb n [trigoncntl] is 1, the counter begins counting when pmc3 changes value. according to the setting in pmlcb n [trigoffcntl], the counter ends counting when pmc5 overflows. also, although the register settings for pmc5 is not shown, pmlca n [ce] for this counter must be cleared so that interrupt signalling is not enabled and the counter does not freeze when it overflows. for threshold counting, a threshold event must be specified in pmlca n [event]. for this example, the duration threshold value is scaled by two because pmlcb n [tbmult] is one. all other features are disabled by clearing the appropriate fields. any non-threshold event can use the burstiness feature. for burstiness counting, values for pmlca n [bsize,bgran,bdist] and pmlcb n [tbmult] must be specified. table 19-12. register settings for counting examples MPC8540 register register field simple event triggering threshold burstiness pmgc0 fac 0 0 0 0 pmie 1111 fcece1111 pmlca n fc 0000 ce 1111 event 89 68 39 2 bsize 0 0 0 5 bgran0001 bdist 0008 pmlcb n trigonsel 0 3 0 0 trigoffsel 0 5 0 0 trigoncntl 0 1 0 0 trigoffcntl 0 2 0 0 tbmult0000 threshold 0 0 3 0
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 20-1 chapter 20 debug features and watchpoint facility this chapter describes all customer-visible debug modes of the MPC8540 integrated device. the debug features on the MPC8540 pertain to these three interfaces: the local bus controller (lbc), the ddr sdram, and the pci/pci-x interface. in addition to the external interfaces, the MPC8540 provides triggering capabilities based on user-programmable events. the watchpoint and trace buffer also provide some visibility to internal buses. this chapter also describes context id registers, useful for software debug, and describes the jtag access port signals that comply with the ieee 1149.1 boundary-scan specification. 20.1 introduction as shown in the block diagram of figure 20-1 , the MPC8540 device provides the following debug features (listed with references to sections of this chapter that describe them):  pci/pci-x interface debug ( section 20.4.2, ?pci/pci-x interface debug? )  ddr sdram interface debug ( section 20.4.3, ?ddr sdram interface debug? )  local bus controller (lbc) debug ( section 20.4.4, ?local bus interface debug? )  watchpoint monitor and trace buffer debug ( section 20.4.5, ?watchpoint monitor,? and section 20.4.6, ?trace buffer? )
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 20-2 freescale semiconductor debug features and watchpoint facility figure 20-1. debug and watchpoint monitor block diagram 20.1.1 overview as shown in figure 20-1 , debug information is provided through the following interfaces: pci/pci-x, lbc, and ddr sdram. limited visibility, through a 256 64 trace buffer, is also provided for the processor core interface and on an internal rapidio outbound interface. this visibility into internal device operation is useful for debugging application software through inverse assembly and reconstruction of the fetch stream. the combination of a source id (msrcid[0:4]) and a data-valid signal (mdval) indicates that meaningful debug information is visible on either the local bus or ddr sdram interfaces. a logic analyzer can be programmed to capture data based on the values of msrcid[0:4] and mdval. e500 coherency pci/pci-x controller rapidio e500 processor ddr controller lbc controller mecc[0:5] msrcid[0:4], mdval trig_in trig_out pci_ad[62:58 ] trace buffer (256 x 64) watchpoint and trace buffer control module core sdram performance monitor signal name lbc protocol signals all other ddr signals 6 6 6 5 6 all other pci signals pordbgmsr[mem_sel] = por value of msrcid0 srcid[0:4] srcid[0:4] dval srcid[0:4] dval (local bus)
introduction MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 20-3 othmer system debugging is supported by the programmable triggering of the watchpoint monitor and trace buffer. both can be triggered from one of the following three sources:  each other  a performance monitor event  an external source (through trig_in) the watchpoint monitor can be configured to assert trig_out when a programmed event occurs. the two context id registers, described in section 20.3.3, ?context id registers,? are useful for software debug. 20.1.2 features the principle features of the debug modes and the watchpoint monitor are as follows:  pci/pci-x interface: transaction source id driven onto pci_ad[62:58]  lbc and ddr interface source id and data-valid indicators ? lbc or ddr sdram source id can be selected to be driven onto msrcid[0:4] ? source id and data-valid indicators can be selected to be driven onto the error correcting code (ecc) pins of the ddr interface  watchpoint monitor that supports the following: ? two-level triggering ? programmable external trigger (trig_out) ? interlocking with performance monitor to use its large number of counters  trace buffer features that supports the following: ? two-level triggering ? programmable external trigger (trig_out) ? interlocking with performance monitor to use its large number of counters ? 256-entry trace buffer, 64 bits each ? programmable trace start and stop ? functionality as a second watchpoint monitor  context id registers that can be programmed to trigger events 20.1.3 modes of operation the pci/pci-x, lbc, and ddr sdram interfaces all have debug modes, which are controlled by values on configuration inputs during the power-on reset (por) sequence, as shown in table 20-3 . the ddr controller can also drive debug information on either msrcid[0:4] or
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 20-4 freescale semiconductor debug features and watchpoint facility mecc[0:5]. see section 20.4.1, ?source and target id,? for additional information about the source id information driven on the debug signals in these modes. note that both the watchpoint monitor and trace buffer also operate in a variety of modes. 20.1.3.1 local bus (lbc) debug mode the lbc and the ddr sdram controller can drive debug information (source id and data-valid indicator) onto msrcid[0:4] and mdval as shown in table 20-1 , the msrcid0 value during por controls multiplexing. if msrcid0 is low when sampled during por, the local bus sdram information appears on msrcid[0:4] and mdval; otherwise, the ddr sdram debug information is presented. 20.1.3.2 ddr sdram interface debug modes msrcid1 is sampled during por to multiplex either ecc or debug information on the ecc pins of the ddr sdram interface. as shown in table 20-1 , if msrcid1 is low during por, the ecc pins operate in debug mode and provide memory debug source id and data-valid information. msrcid1 must be pulled low during por to use the ecc pins in debug mode. if msrcid1 is unconnected, an internal pull-up resistor ensures the ecc pins always source ddr sdram error correcting code information as their default power-on reset configuration. note if the ddr ecc pins are in debug mode (configured for debug during por), ecc checking is disabled in the memory controller. in this case, mecc[0:4] do not provide ecc information and must not be connected to sdram devices. table 20-1. por configuration settings and debug modes configuration signal por value effect reference msrcid0 0 local bus sdram information appears on msrcid[0:4] and mdval. 20.1.3.1/20-4 1 default value (internal pull-up resistor). ddr sdram information appears on msrcid[0:4] and mdval. msrcid1 0 mecc[0:4] operate in debug mode and provide memory debug source id and mecc5 provides data-valid information. 20.1.3.2/20-4 1 default value (internal pull-up resistor). mecc[0:4] operate in normal mode and provide ddr sdram error correcting code information. pci_gnt3 0 the pci/pci-x interface operates in debug mode. the source id information appears on the high-order address bits (pci_ad[62:58]) during the bus command phase. 20.1.3.3/20-5 1 default value (internal pull-up resistor). the pci/pci-x interface operates in normal mode.
introduction MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 20-5 20.1.3.3 pci/pci-x interface debug modes if pci_gnt3 is low when sampled during por, the pci/pci-x interface operates in debug mode. in this mode, the source id information appears on the high-order address bits (pci_ad[62:58]) during the bus command phase. see section 20.4.2, ?pci/pci-x interface debug,? for more information. 20.1.3.4 watchpoint monitor modes the watchpoint monitor supports the following operating modes:  immediate trigger arming (one-level triggering)?the watchpoint monitor triggers as soon as the first trigger event occurs.  wait for trigger arming (two-level triggering)?the watchpoint monitor waits for a specific event before enabling (arming) the trigger logic. the monitor does not respond to trigger events until after the arming event occurs. this function is similar to two-level triggering on a logic analyzer.  assert trig_out on hit?the debug block can be programmed to assert the trig_out signal when a programmed watchpoint monitor event occurs. this signal can be used to trigger a logic analyzer. 20.1.3.5 trace buffer modes the trace buffer supports the following operating modes:  immediate trigger arming (one-level triggering)?the trace buffer triggers as soon as the first trigger event occurs.  wait for trigger arming (two-level triggering)?the trace buffer waits for a specific event before enabling (arming) the trigger logic. the trace buffer does not respond to trigger events until after the arming event occurs. this function is similar to two-level triggering on a logic analyzer.  specific interface selection?the trace buffer can be programmed to trace one of several internal interfaces.  specific event selection?the trace buffer can be programmed to trace on the occurrence of one or several concurrent events.  specific trace selection?to facilitate trace data filtering, the trace buffer can be configured to capture data under the following conditions: ? on every cycle in which a valid transaction is present on the selected interface ? only when a watchpoint monitor event occurs ? only when the programmed trace event is detected  programmable trace stop?the trace buffer may be programmed to stop tracing when a programmed stop-tracing event occurs or when the 256-entry buffer is full.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 20-6 freescale semiconductor debug features and watchpoint facility 20.2 external signal descriptions this section provides information about all the external signals associated with the various MPC8540 debug functions. as shown in table 20-1 , the MPC8540 has several signals that are sampled during por to determine the configuration of the phase-locked loop clock mode and the rom, flash, and dynamic memory. see chapter 4, ?reset, clocking, and initialization.? to facilitate system testing, the MPC8540 provides a jtag test access port (tap) that complies with the ieee 1149.1 boundary-scan specification. this section also describes jtag tap signals. 20.2.1 overview all the signals associated with device debug features are summarized in table 20-2 , listed with a reference to the page number of the section with more information. the detailed descriptions are contained in table 20-2 . some signals (the mecc bus for example) are additionally described in other chapters, but are described here also for completeness, with emphasis on their debugging utility. table 20-2. debug, watchpoint and test signal summary name description functional block function reset value i/o page # mdval memory data-valid debug selectable data-valid signal from either ddr sdram controller or lbc 1o 20-7 mecc[0:7] ddr error correcting code ddr sdram in debug mode, the 6 high-order bits carry debug information (transaction source id and data-valid indication). 0x08 o 1 20-8 msrcid[0:1] memory source id debug selectable transaction source id from either ddr sdram controller or local bus controller reset_cfg o 20-8 msrcid[2:4] 111 o 20-8 trig_in trigger in debug trigger for various function in the watchpoint monitor and trace buffer 1i 20-8 trig_out trigger out debug can be used externally for triggering a logic analyzer. additionally, it can be used for observing system ready indication. functions are multiplexed onto this signal depending on tosr[sel] (see table 20-25 ). 1o 20-8 pci_ad[62:58] pci address debug in debug mode these pins carry the source id of the transaction. 0000_0 o 20-8 tck test clock debug clock for jtag testing. internally pulled up 1 i 20-9 tdi test data input debug serial input for instructions and data to the jtag test subsystem. internally pulled up 1i 20-9 tdo test data output debug serial data output for the jtag test subsystem. high impedance except when scanning out data hi-z o 20-9
external signal descriptions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 20-7 20.2.2 detailed signal descriptions this section describes the details of the debug, watchpoint monitor, and jtag test signals 20.2.2.1 debug signals?details table 20-3 describes all signals associated with device debug modes. tms test mode select debug carries commands to the tap controller for boundary scan operations. internally pulled up 1i 20-9 trst test reset debug resets the tap controller asynchronously ? i 20-9 therm[0:1] thermal resistor access test these pins tie directly to an internal resistor whose value varies linearly with temperature. ?i 20-9 test_sel test select test factory test. must be negated for normal operation ? i 20-9 lssd_ mode test test factory test. refer to the MPC8540 integrated processor hardware specifications for proper treatment. i 20-9 l1_tstclk test test factory test. refer to the MPC8540 integrated processor hardware specifications for proper treatment. i 20-9 l2_tstclk test test factory test. refer to the MPC8540 integrated processor hardware specifications for proper treatment. i 20-9 1 although these signals are normally bidirectional, when sourcing debug information they are output only. table 20-3. debug signals?detailed signal descriptions signal i/o description mdval o memory data-valid. indicates when valid data is available. may be used by a logic analyzer to capture the data on the data bus. state meaning asserted?indicates that data is valid on the data bus during the current clock cycle. when the ddr sdram interface is selected to source information on mdval, this signal is valid for every cycle that data is driven or received on the ddr sdram interface. when the lbc is selected, this signal is valid for every cycle that data is driven or received on the local bus interface. the assertion of this signal may be used by a logic analyzer to capture data. timing asserted/negated?referenced to the selected interface, (ddr or local bus). asserts when data is valid. assertions are held for the duration of the transfer. read data timing is similar to ma. write data timing is similar to the output mdq. table 20-2. debug, watchpoint and test signal summary (continued) name description functional block function reset value i/o page #
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 20-8 freescale semiconductor debug features and watchpoint facility 20.2.2.2 watchpoint monitor trigger signals?details table 20-4 shows detailed descriptions of the watchpoint monitor and trace buffer signals. mecc[0:7] o memory ecc. ddr error checking and correcting. the normally bidirectional operation of the memory ecc (mecc) bus is described in section 9.5.11, ?error checking and correcting (ecc).? this bus is used for debug functions when msrcid1 is sampled low during por. in debug mode, the high-order 5 bits (mecc[0:4]) may be used to provide the transaction source id and mecc5 can be used as the data-valid indicator. in debug mode, mecc[0:5] is constantly driven with debug information and must be disconnected from the ddr memory?s ecc pins. state meaning asserted/negated?in debug mode, mecc[0:5] is always driven. the source id values appear during ras and cas cycles. a value of 0x1f (all ones) is driven during cycles other than ras and cas. the data-valid indicator appears when data is being received or driven on the pins. timing driven every cycle in debug mode msrcid[0:4] o memory source id. attribute signals associated with the memory interface that indicate the source id for a transaction on an sdram interface. the sdram interface, ddr or local bus, to which the debug information applies is specified during por with msrcid0 as shown in tab le 2 0- 1 . two of these signals serve as reset configuration input signals. state meaning asserted/negated?in debug mode, always driven with the value of the source id. the source id has a value of 0x1f for cycles other than ras and cas. the encodings shown in table 20-26 provide detailed information about a memory transaction. timing driven every cycle in debug mode. similar timing to ma pci_ad[62:58] o pci address. provides transaction source id for the current pci bus transaction state meaning asserted/negation?in debug mode, always driven with the value of the transaction source id timing driven every cycle in debug mode table 20-4. watchpoint and trigger signals?detailed signal descriptions signal i/o description trig_in i trigger in. can be used to trigger the watchpoint and trace buffers. note this is an active-high (rising-edge triggered) signal. state meaning asserted?indicates that a programmed/armed external event has been detected. assertion may be used internally to trigger trace buffers and watchpoint mechanisms. timing assertion/negation?the MPC8540 interprets trig_in as asserted on detection of the rising edge. it may occur at any time. must remain asserted for at least 3 system clocks to be recognized internally table 20-3. debug signals?detailed signal descriptions (continued) signal i/o description
external signal descriptions MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 20-9 20.2.2.3 test signals?details table 20-5 shows detailed descriptions of the jtag test signals. trig_out o trigger out. function determined by tosr[sel]. when tosr[sel] is non-zero, it can be used for triggering external devices, like a logic analyzer, with either the watchpoint monitor, the trace buffer, or the performance monitor as trigger sources. when tosr[sel] is cleared, trig_out is multiplexed with ready, which indicates the operational readiness of the device (running or in low-power or debug modes). see chapter 4, ?reset, clocking, and initialization,? and chapter 18, ?global utilities,? for more details about reset, low power, and debug states. state meaning asserted?when tosr[sel] is all zeros, serves as the ready signal, indicating that the device is not in a low-power or debug mode and that it has emerged from reset. sel 0 indicates that a programmed trigger event has occurred. negation?no final watchpoint match condition timing assertion may occur at any time. remains asserted for at least 3 system clocks table 20-5. jtag test and other signals?detailed signal descriptions signal i/o description tck i jtag test clock state meaning asserted/negated?should be driven by a free-running clock signal with a 30?70% duty cycle. input signals to the tap are clocked in on the rising edge. changes to the tap output signals occur on the falling edge. the test logic allows tck to be stopped. an unterminated input appears as a high signal level to the test logic due to an internal pull-up resistor. timing see ieee 1149.1 standard for more details tdi i jtag test data input state meaning asserted/negated?the value present on the rising edge of tck is clocked into the selected jtag test instruction or data register. an unterminated input appears as a high signal level to the test logic due to an internal pull-up resistor. timing see ieee 1149.1 standard for more details tdo o jtag test data output state meaning asserted/negated?the contents of the selected internal instruction or data register are shifted out on this signal on the falling edge of tck. remains in a high-impedance state except when scanning data. timing see ieee 1149.1 standard for more details tms i jtag test mode select state meaning asserted/negated?decoded by the internal jtag tap controller to distinguish the primary operation of the test support circuitry. an unterminated input appears as a high signal level to the test logic due to an internal pull-up resistor. timing see ieee 1149.1 standard for more details table 20-4. watchpoint and trigger signals? detailed signal descriptions (continued) signal i/o description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 20-10 freescale semiconductor debug features and watchpoint facility 20.3 memory map/register definition table 20-6 shows the memory-mapped debug and watchpoint registers of the MPC8540. trst ijtag test reset state meaning asserted?causes asynchronous initialization of the internal jtag tap controller. must be asserted during power-on reset in order to properly initialize the jtag tap and for normal operation of the MPC8540. an unterminated input appears as a high signal level to the test logic due to an internal pull-up resistor. negated? normal operation timing see ieee 1149.1 standard for more details lssd_mode i used for factory test. refer to the MPC8540 integrated processor hardware specifications for proper treatment. l1_tstclk i used for factory test. refer to the MPC8540 integrated processor hardware specifications for proper treatment. l2_tstclk i used for factory test. refer to the MPC8540 integrated processor hardware specifications for proper treatment. therm[0:1] i these signals provide access to an internal resistor that has a value that varies linearly with temperature. the actual value for the resistor varies from device to device, but the linear relationship between temperature and resistance is consistent. see the MPC8540 integrated processor hardware specifications for more information on how to accurately measure the junction temperature of a device. note that this thermal resistor is intended for engineering development only. test_sel i used for factory test. must be negated for normal operation table 20-6. debug and watchpoint monitor memory map local memory offset register acces s reset section/page watchpoint monitor registers 0xe_2000 wmcr0?watchpoint monitor control register 0 r/w 0x0000_0000 20.3.1.1/20-11 0xe_2004 wmcr1?watchpoint monitor control register 1 r/w 0x0000_0000 20.3.1.1/20-11 0xe_200c wmar?watchpoint monitor address register r/w 0x0000_0000 20.3.1.2/20-13 0xe_2014 wmamr?watchpoint monitor address mask register r/w 0x0000_0000 20.3.1.3/20-14 0xe_2018 wmtmr?watchpoint monitor transaction mask register r/w 0x0000_0000 20.3.1.4/20-14 0xe_201c wmsr?watchpoint monitor status register r/w 0x0000_0000 20.3.1.5/20-16 trace buffer registers 0xe_2040 tbcr0?trace buffer control register 0 r/w 0x0000_0000 20.3.2.1/20-16 0xe_2044 tbcr1?trace buffer control register 1 r/w 0x0000_0000 20.3.2.1/20-16 table 20-5. jtag test and other signals?detailed signal descriptions (continued) signal i/o description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 20-11 20.3.1 watchpoint monitor register descriptions the following sections describe the control registers for the watchpoint monitor facility. 20.3.1.1 watchpoint monitor control registers 0?1 (wmcr0, wmcr1) the watchpoint monitor control registers (wmcr0, wmcr1) shown in figure 20-2 and figure 20-3 control the specification of watchpoint monitor events. 0xe_204c tbar?trace buffer address register r/w 0x0000_0000 20.3.2.2/20-19 0xe_2054 tbamr?trace buffer address mask register r/w 0x0000_0000 20.3.2.3/20-19 0xe_2058 tbtmr?trace buffer transaction mask register r/w 0x0000_0000 20.3.2.4/20-20 0xe_205c tbsr?trace buffer status register r/w 0x0000_0000 20.3.2.5/20-21 0xe_2060 tbacr?trace buffer access control register r/w 0x0000_0000 20.3.2.6/20-22 0xe_2064 tbadhr?trace buffer access data high register r/w 0x0000_0000 20.3.2.7/20-22 0xe_2068 tbadr?trace buffer access data register r/w 0x0000_0000 20.3.2.8/20-23 context id registers 0xe_20a0 pcidr?programmed context id register r/w 0x0000_0000 20.3.3.1/20-24 0xe_20a4 ccidr?current context id register r/w 0x0000_0000 20.3.3.2/20-24 other registers 0xe_20b0 tosr?trigger output source register r/w 0x0000_0000 20.3.4.1/20-25 0 1 2 3 4 5 6 7 20 21 23 24 31 r en amd tmd ecen necen siden tiden 0 0 0 0 0 0 0 0 0 0 0 0 0 0 strt 0 0 0 0 0 0 0 0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_2000 figure 20-2. watchpoint monitor control register 0 (wmcr0) table 20-6. debug and watchpoint monitor memory map (continued) local memory offset register acces s reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 20-12 freescale semiconductor debug features and watchpoint facility table 20-7 describes wmcr0 fields. table 20-7. wmcr0 field descriptions bits name description 0 en enable 0 watchpoint monitor events are not flagged. 1 a watchpoint monitor event is flagged. 1 amd address match disable. qualifies address match as a watchpoint event criterion. 0 address matching is used to recognize a watchpoint event. 1 address matching does not affect watchpoint event detection. 2 tmd transaction match disable. qualifies transaction type match (as defined in wmcr1[ifsel] and wmtmr) as a watchpoint event criterion. 0 a transaction type match is used to recognize watchpoint events. 1 a transaction type match does not affect watchpoint event detection. 3 ecen equal context enable. qualifies the matching of current context with programmed context as a watchpoint event criterion, as written in the context registers described in section 20.3.3, ?context id registers.? 0 current context match does not affect watchpoint event detection 1 watchpoint events are qualified by comparing current context with the programmed context event value. note: ecen and necen must not be enabled in the same run. if both are set, watchpoint events are inhibited (never occur). 4 necen not equal context enable. qualifies the matching of current context with programmed context as a watchpoint event criterion, as written in the context registers described in section 20.3.3, ?context id registers.? 0 the failure of a current context match does not affect watchpoint event detection 1 watchpoint events are qualified with not getting a current context compare with the programmed context event value. note: ecen and necen must not be enabled in the same run. if both are set, watchpoint events are inhibited (never occur). 5 siden source id enable 0 source id does not affect watchpoint event detection 1 watchpoint events are qualified by comparison with the programmed wmcr1(sid) value. 6 tiden target id enable 0 target id does not affect watchpoint event detection 1 watchpoint events are qualified by comparison with the programmed wmcr1(tid) value. 7?20 ? reserved 21?23 strt start condition. specifies the event that arms the watchpoint monitor to start looking for the programmed event. 000 no event. armed immediately 001 trace buffer event is detected 010 performance monitor signals overflow 011 trig_in transitions from 0 to 1. 100 trig_in transitions from 1 to 0. 101 current context id equals programmed context id 110 current context id is not equal to programmed context id 111 reserved 24?31 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 20-13 figure 20-3 shows the wmcr1. table 20-8 describes the wmcr1 fields. 20.3.1.2 watchpoint monitor address register (wmar) the watchpoint monitor address register (wmar) shown in figure 20-4 contains the address to match against if wmcr[amd] is clear. note that the transaction address is qualified with the bits described in section 20.3.1.3, ?watchpoint monitor address mask register (wmamr),? before being compared with wmar. note also that the contents of wmar are not qualified with wmamr. 012 345 78 1011 1516 2627 31 r 0 0 0 0 0 ifsel 0 0 0 sid 0 0 0 0 0 0 0 0 0 0 0 tid w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_2004 figure 20-3. watchpoint monitor control register 1 (wmcr1) table 20-8. wmcr1 field descriptions bits name description 0?4 ? reserved 5?7 ifsel interface selection. selects the address, transaction type (as defined in wmtmr), and other attributes to be used for comparison 000 select e500 coherency module (ecm) dispatch interface 001 select internal ddr sdram interface 010 select internal pci outbound interface 011 select internal rapidio interface 1xx reserved 8?10 ? reserved 11?15 sid source id. specifies the source id associated with wmcr0[siden]. for a definition of the source id, see table 20-26 . 16?26 ? reserved 27?31 tid target id. specifies the target id associated with wmcr0[tiden]. for a definition of the target id, see table 20-26 . 0 31 r wma w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_200c figure 20-4. watchpoint monitor address register (wmar)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 20-14 freescale semiconductor debug features and watchpoint facility table 20-9 describes the wmar fields. 20.3.1.3 watchpoint monitor address mask register (wmamr) the watchpoint monitor address mask register (wmamr) shown in figure 20-5 contains the mask that is applied to a transaction address before the address is compared with wmar. table 20-10 describes the wmamr fields. 20.3.1.4 watchpoint monitor transaction mask register (wmtmr) the watchpoint monitor transaction mask register (wmtmr), shown in figure 20-6 , specifies which transaction types to monitor. wmtmr allows users to qualify watchpoint events specifically with any combination of transaction types. as shown in table 20-12 , each bit represents as many as four separate transaction types; one for each interface. setting a bit enables watchpoint monitoring for the corresponding transaction types. because the supported transaction types vary by interface, the type designated by a wmtmr field also depends on the interface specified by wmcr1[ifsel]. table 20-12 lists transaction types associated with each wmtmr bit by interface. table 20-9. wmar field descriptions bits name description 0?31 wma watchpoint monitor address. 0 31 r wmam w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_2014 figure 20-5. watchpoint monitor address mask register (wmamr) table 20-10. wmamr field descriptions bits name description 0?31 wmam watchpoint monitor address mask. a value of zero masks the address comparison for the corresponding address bit.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 20-15 table 20-11 describes the wmtmr fields. the following table defines the transactions associated with each transaction mask bit for the different interfaces supported by the watchpoint monitor. 0 31 r wmtm w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_2018 figure 20-6. watchpoint monitor transaction mask register (wmtmr) table 20-11. wmtmr field descriptions bits name description 0?31 wmtm watchpoint monitor transaction mask. each bit corresponds to a transaction type as defined in table 20-12 . the transaction associated with any particular bit may be different depending on the interface being monitored. a value of 1 for a given mask bit enables the matching of the transaction associated with that bit. these bits are meaningful only when wmcr0[tmd]=0. table 20-12. transaction types by interface bit e500 coherency module dispatch ddr controller pci outbound request rapidio outbound request 0 write with local processor snoop write memory write nwrite 1 write with no local processor snoop ? i/o write nwrite_r 2 write with allocate (l2 stashing) write with allocate ? swrite 3 write with allocate and lock (l2 stashing with locking) write with allocate and lock ? flush with data 4?7 reserved 8 read with local processor snoop read memory read nread 9 read with no local processor snoop ? i/o read io_read_home 10 read with unlock read with unlock ? ? 11?15 reserved 16 atomic clear atomic clear ? atomic clear 17 atomic set atomic set ? atomic set 18 atomic decrement atomic decrement ? atomic decrement 19 atomic increment atomic increment ? atomic increment 20?27 reserved 28 ? ? ? maintenance write
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 20-16 freescale semiconductor debug features and watchpoint facility 20.3.1.5 watchpoint monitor status register (wmsr) the watchpoint monitor status register (wmsr) shown in figure 20-7 indicates the state of the watchpoint monitor. table 20-13 describes the wmsr fields. 20.3.2 trace buffer register descriptions the following sections describes the trace buffer registers. 20.3.2.1 trace buffer control registers (tbcr0, tbcr1) the trace buffer control registers (tbcr0, tbcr1), shown in figure 20-8 and figure 20-9 , specify trace buffer events. 29 ? ? ? maintenance read 30 ? ? ? doorbell 31 ? ? ? message 012 31 r act trig 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_201c figure 20-7. watchpoint monitor status register (wmsr) table 20-13. wmsr field descriptions bits name description 0actactive 0 the start triggering event has not occurred; watchpoint monitor is not armed. 1 the start triggering event has occurred; watchpoint monitor is armed. 1 trig triggered 0 the programmed event in wmcr0 has not yet been triggered. 1 the programmed event in wmcr0 has been triggered at least once. 2?31 ? reserved table 20-12. transaction types by interface (continued) bit e500 coherency module dispatch ddr controller pci outbound request rapidio outbound request
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 20-17 table 20-14 describes the tbcr0 fields. 012 3 4 5 6 78 131415 r en amd tmd ecen necen siden tiden halt 0 0 0 0 0 0 mode w reset 0000_0000_0000_0000 16 20 21 23 24 28 29 31 r 0 0 0 0 0 strt 0 0 0 0 0 stop w reset 0000_0000_0000_0000 offset 0xe_2040 figure 20-8. trace buffer control register 0 (tbcr0) table 20-14. tbcr0 field descriptions bits name description 0 en enable 0 the trace buffer facility is disabled. 1 the trace buffer facility is enabled. 1 amd address match disable 0 the address match is used to qualify a trace buffer event. 1 the address match is ignored when detecting a trace buffer event. 2 tmd transaction match disable 0 the transaction type match is used to qualify a trace buffer event. 1 the transaction type match is ignored when detecting a trace buffer event. 3 ecen equal context enable. qualifies the matching of current context with programmed context as a trace buffer event criterion, as written in the context registers described in section 20.3.3, ?context id registers.? 0 current context match does not affect trace buffer event detection. 1 trace buffer events are qualified by comparing current context with the programmed context event value. note: ecen and necen must not be enabled in the same run. if both are set, watchpoint events are inhibited (never occur). 4 necen not equal context enable. qualifies the matching of current context with programmed context as a trace buffer event criterion, as written in the context registers described in section 20.3.3, ?context id registers.? 0 the failure of a current context match does not affect trace buffer event detection 1 trace buffer events are qualified with not getting a current context compare with the programmed context event value. note: ecen and necen must not be enabled in the same run. if both are set, watchpoint events are inhibited (never occur). 5 siden source id enable 0 trace buffer events ignore the programmed source id value. 1 trace buffer events are qualified by comparison with the programmed sid event value. 6 tiden target id enable 0 trace buffer events ignore the programmed tid event value. 1 trace buffer events are qualified by comparison with the programmed tid event value. this comparison only applies when the ecm is selected for tracing (tbcr1[ifsel] is all zeros).
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 20-18 freescale semiconductor debug features and watchpoint facility 7 halt halt causes the trace buffer to stop tracing immediately. 8?13 ? reserved 14?15 mode trace mode. specifies one of two trace modes 00 trace every valid transaction 01 reserved 10 trace only cycles in which a trace event is detected. note that if en and other tbcr0 fields are not properly programmed to specify a traceable event, tracing occurs for every valid address. 11 reserved 16?20 ? reserved 21?23 strt start condition. specifies the event that arms the trace buffer to start looking for the programmed event. 000 no event. armed immediately 001 watchpoint monitor event is detected 010 trace buffer event is detected 011 performance monitor signals overflow 100 trig_in transitions from 0 to 1. 101 trig_in transitions from 1 to 0. 110 current context id equals programmed context id 111 current context id does not equal programed context id 24?28 ? reserved 29?31 stop trace stop mode. specifies the event that stops the updating of the trace buffer after it has been started. trace buffer only stops after it has been triggered at least once. 000 buffer is full 001 watchpoint monitor event is detected 010 trace buffer event is detected 011 performance monitor signals overflow 100 trig_in transitions from 0 to 1. 101 trig_in transitions from 1 to 0. 110 current context id equals programmed context id 111 current context id does not equal programed context id 0 4 5 7 8 9 10 11 15 16 26 27 31 r 0 0 0 0 0 ifsel 0 0 0 sid 0 0 0 0 0 0 0 0 0 0 0 tid w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_2044 figure 20-9. trace buffer control register 1 (tbcr1) table 20-14. tbcr0 field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 20-19 table 20-15 describes the tbcr1 fields. 20.3.2.2 trace buffer address register (tbar) the trace buffer address register (tbar) shown in figure 20-10 contains the address to match against (if tbcr0[amd] is zero). the transaction address is qualified with the bits described in section 20.3.2.3, ?trace buffer address mask register (tbamr),? before being compared with tbar. note that the contents of tbar are not qualified with tbamr. table 20-16 describes the tbar field. 20.3.2.3 trace buffer address mask register (tbamr) the trace buffer address mask register (tbamr) shown in figure 20-11 contains the mask that is applied to a transaction address before the address is compared with tbar. table 20-15. tbcr1 field descriptions bits name description 0?4 ? reserved 5?7 ifsel interface selection. specifies the interface that sources information for both comparison/buffer control and buffer data capture 000 selects e500 coherency module (ecm) dispatch interface 001 selects internal ddr sdram interface 010 selects internal pci outbound interface 011 selects internal rapidio interface 1xx reserved 8?10 ? reserved 11?15 sid source id. specifies the source id associated with tbcr0[siden]. the source id is defined in table 20-26 . 16?26 ? reserved 27?31 tid target id. specifies the target id associated with tbcr0[tiden]. the target id is defined in table 20-26 . 0 31 r tba w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_204c figure 20-10. trace buffer address register (tbar) table 20-16. tbar field descriptions bits name description 0?31 tba trace buffer address
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 20-20 freescale semiconductor debug features and watchpoint facility table 20-17 describes the tbamr field. 20.3.2.4 trace buffer transaction mask register (tbtmr) the trace buffer transaction mask register (tbtmr) shown in figure 20-12 specifies which transaction types to monitor. each bit in the tbtmr represents a transaction type on the selected interface. the transaction associated with any particular bit depends on the interface being monitored as specified by tbcr1[ifsel]. note that the transactions used for defining trace buffer events are the same as those defined for watchpoint monitor events. thus, table 20-12 defines the transaction types associated with each interface. setting a bit enables a hit when this transaction is matched (provided all other match criteria are met and tbcr0[tmd] is clear). different interfaces support different transaction types, and the same bit may represent different transaction types depending on the interface. 0 31 r tbam w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_2054 figure 20-11. trace buffer address mask register (tbamr) table 20-17. tbamr field descriptions bits name description 0?31 tbam trace buffer address mask.a value of zero masks the address comparison for the corresponding address bit. 0 31 r tbtm w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_2058 figure 20-12. trace buffer transaction mask register (tbtmr)
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 20-21 table 20-18 describes the tbtmr field. 20.3.2.5 trace buffer status register (tbsr) the trace buffer status register (tbsr) shown in figure 20-13 indicates the operational state of the trace buffer. table 20-19 describes the tbsr fields. table 20-18. tbtmr field descriptions bits name description 0?31 tbtm trace buffer transaction mask. each bit corresponds to a transaction type as defined in table 20-12 . the transaction associated with a bit depends on the interface being monitored. a value of 1 for a given mask bit enables the matching of the transaction associated with that bit. these bits are meaningful only when tbcr0[tmd]=0. 012 34 23 24 31 r act trig stp wrap 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 c_indx w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_205c figure 20-13. trace buffer status register (tbsr) table 20-19. tbsr field descriptions bits name description 0 act active. indicates trace buffer activity 0 the start triggering event has not yet occurred. trace buffer is not armed 1 the start triggering event has occurred. trace buffer is armed. 1 trig triggered. indicates whether or not a programmed event has been triggered 0 the programmed event in tbcr0 has not yet been triggered. 1 the programmed event in tbcr0 has been triggered at least once. 2 stp stopped. indicates whether or not a trace buffer stop condition has been detected. 0 no stop condition yet detected 1 the trace buffer has detected a stop condition and is no longer capturing events. 3 wrap wrapped. indicates that the trace buffer write pointer has wrapped to the beginning of the buffer at least once. set when the last entry of the trace buffer is written 0 pointer has not yet wrapped 1 pointer has wrapped to the beginning at least once 4?23 ? reserved 24?31 c_indx current index. represents the current value of the write pointer at the time tbsr was read. this value may be written by software to initialize the write pointer; however, software is not allowed to write the write pointer while the trace buffer is active. writes are ignored while the trace buffer is active. it is recommended to write the status register before enabling the trace buffer in order to zero out any bits that might have been set during a prior run and to initialize the write pointer to zero.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 20-22 freescale semiconductor debug features and watchpoint facility 20.3.2.6 trace buffer access control register (tbacr) the trace buffer access control register (tbacr), shown in figure 20-14 , enables software to read or write the trace buffer. each entry is 64 bits; therefore, it takes one write of tbacr and two reads of the access data register (tbadr and tbadhr) to read one 256-entry array entry. similarly, it takes one write of tbacr and two writes of tbadr and tbadhr to write one array entry. software can access any entry by writing the appropriate index into tbacr[indx]. to read or write the buffer sequentially, starting with entry 0, the index must start with a value of 0 and increment every time a new entry is accessed. table 20-20 describes the tbacr fields. 20.3.2.7 trace buffer access data high register (tbadhr) the trace buffer access data high register (tbadhr), shown in figure 20-15 , contains the high-order 32 bits of the data read from the trace buffer during a software-initiated read command (tbacr[rd]), or the write data to be written into the trace buffer during a software-initiated write command (tbacr[wr]). tbacr must be configured to perform a read before this register contains valid data. this register must be initialized by software before configuring the tbacr to perform a write command. 012 23 24 31 r rd wr 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 indx w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_2060 figure 20-14. trace buffer access control register (tbacr) table 20-20. tbacr field descriptions bits name description 0 rd read command. when set, a trace buffer read is performed using the value of tbacr[indx]. this bit is automatically cleared when the read is performed. 1 wr write command. when set, a trace buffer write is performed using the value of tbacr[indx]. this bit is automatically cleared when the write is performed. a write occurs only if the trace buffer is not active: write requests are ignored while the buffer is active. 2?23 ? reserved 24?31 indx buffer index to read from or write into (0?255). used in conjunction with tbacr[rd] and tbacr[wr]
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 20-23 table 20-21 describes tbadhr. 20.3.2.8 trace buffer access data register (tbadr) the trace buffer access data register (tbadr), shown in figure 20-16 , contains the low-order 32 bits of the data read from the trace buffer during a software-initiated read command (tbacr[rd]) or the write data to be written into the trace buffer during a software-initiated write command (tbacr[wr]). tbacr must be configured to perform a read before this register contains valid data. this register must be initialized by software before configuring the tbacr to perform a write command. table 20-22 describes the tbadr field. 0 31 r tbadh w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_2064 figure 20-15. trace buffer read high register (tbadhr) table 20-21. tbadhr field descriptions bits name description 0?31 tbadh trace buffer access data high. the higher 32 bits of the data read from or to be written into the trace buffer, depending on whether the array is accessed with a read or a write. 0 31 r tbad w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_2068 figure 20-16. trace buffer access data register (tbadr) table 20-22. tbadr field descriptions bits name description 0?31 tbad trace buffer access data. corresponds to the lower 32 bits of the data read from the trace buffer or to be written into the trace buffer, depending on whether software is accessing the array with a read or a write.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 20-24 freescale semiconductor debug features and watchpoint facility 20.3.3 context id registers this section describes the context id registers. the current context id register (ccidr) and programmed context id registers (pcidr) are set by software and facilitate debugging complex software. 20.3.3.1 programmed context id register (pcidr) the programmed context id register (pcidr), shown in figure 20-17 , contains the user-programmed context id. this register can be configured to trigger watchpoint events when its value matches the current context id register (ccidr), as controlled by wmcr0[ecen] and wmcr0[necen]. see section 20.3.1.1, ?watchpoint monitor control registers 0?1 (wmcr0, wmcr1),? for more information. table 20-23 describes the pcidr field. 20.3.3.2 current context id register (ccidr) the current context id register (ccidr) shown in figure 20-18 contains the current context id. this register is written by software after a context switch and can be used to trigger events when compared with the programmed context id register (pcidr). 0 31 r pcid w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_20a0 figure 20-17. programmed context id register (pcidr) table 20-23. pcidr field descriptions bits name description 0?31 pcid programmed context id. contains the user-programmed context id. compared with current context id for context-sensitive event triggering. 0 31 r ccid w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_20a4 figure 20-18. current context id register (ccidr)
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 20-25 table 20-24 describes the ccidr field. 20.3.4 trigger out function trig_out provides a convenient mechanism for triggering external system monitors and diagnostic equipment such as logic analyzers. note that ready is multiplexed with trig_out. see the last paragraph of section 4.4.2, ?power-on reset sequence,? for more information about ready functionality. when the trace buffer hit is selected by tosr[sel], trig_out is only meaningful if the trace buffer control register 0 (tbcr0) is properly configured to hit on a traceable event. the same holds true for the watchpoint monitor when the watchpoint monitor is selected by tosr[sel]. 20.3.4.1 trigger out source register (tosr) the trigger out source register (tosr) shown in figure 20-19 specifies the source for trig_out. the three event-trigger sources are the following:  the watchpoint monitor  the trace buffer  the performance monitor table 20-24. ccidr field descriptions bits name description 0?31 ccid current context id. set by user software. typically loaded immediately following a context switch. compared with user-programmed context id for context-sensitive event triggering. 04578 30 31 r 0 0 0 0 0 sel 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 sync w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0xe_20b0 figure 20-19. trigger out source register (tosr)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 20-26 freescale semiconductor debug features and watchpoint facility table 20-25 describes the tosr fields. 20.4 functional description the debug features on the MPC8540 use the lbc interfaces, ddr sdram interface, and the pci interface. 20.4.1 source and target id debug information that is common to all the interfaces is the source id (sid). the transaction source id provides enough information to determine which block or port originated a transaction including the distinction between instruction and data fetches from the processor core. table 20-26 shows the values and interpretation for the 5-bit sid field. note that the table also includes ports that are only slaves, such as local memory. these ports are always targets. as such, the value shown represents a target id (tid) and not a source id. for ports that can function in both capacities, the value indicates source id when mastering transactions, and target id when responding as slave. the tid field is only meaningful when one of the following participates in the transaction:  the e500 coherency module (ecm) dispatch bus  the watchpoint monitor (wmcr1[ifsel] = 000)  the trace buffer (tbcr1[ifsel] = 000) table 20-25. tosr field descriptions bits name description 0?4 ? reserved 5?7 sel select. selects the source for trig_out 000 ready signal. multiplexed with trig_out. basic device state indicator. ready asserts whenever the device is not in reset or not asleep. see chapter 4, ?reset, clocking, and initialization,? for more details about the reset sequence, and chapter 18, ?global utilities,? for more information about power management states. 001 selects the watchpoint monitor hit indication 010 selects the trace buffer hit indication 011 selects the performance monitor overflow indication 8?31 ? reserved table 20-26. source and target id values value (hex) source (or target) port value (hex) source (or target) port 00 pci/pci-x 10 local processor (instruction fetch) 01 reserved 11 local processor (data fetch) 02 reserved 12 reserved
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 20-27 20.4.2 pci/pci-x interface debug if pci_gnt3 is low when sampled during por, the pci/pci-x interface operates in debug mode. in debug mode the source id appears on the high-order address bits (pci_ad[62:58]) during the bus command phase of a pci/pci-x transaction. the bus command phase occurs either during the first cycle that pci_frame is asserted, or, in the case of addresses greater than 32 bits, after a dual-address cycle phase. in either case, the debug information appears on the highest order address bits while pci_frame is asserted and both pci_irdy and pci_trdy are negated. when accessing the low 4 gbytes of pci address space for which no dual-address cycle is needed, the debug information appears during the first (and only) address phase on pci_ad[62:58]. whenever a dual-address cycle must be run, (addresses above 4 gbytes) the debug information appears on pci_ad[62:58] during the second address cycle. in either case a logic analyzer should be configured to sample information on the first cycle of the assertion of pci_frame and the cycle following a dual-address cycle command. note because they share the same pins, an entire 64-bit address and the debug information cannot be captured in a single cycle. 03 reserved 13 reserved 04 local bus controller 14 reserved 05 reserved 15 dma 06 reserved 16 reserved 07 reserved 17 system access port (sap) 08 configuration space 18 tsec1 09 reserved 19 tsec2 0a boot sequencer 1a fec 0b reserved 1b reserved 0c rapidio 1c rapidio message unit 0d reserved 1d rapidio doorbell unit 0e reserved 1e rapidio port-write unit 0f local space (ddr) 1f non valid port indicator (reserved for debug info) table 20-26. source and target id values (continued) value (hex) source (or target) port value (hex) source (or target) port
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 20-28 freescale semiconductor debug features and watchpoint facility 20.4.3 ddr sdram interface debug the ddr interface has two debug modes distinguished by which pins drive the debug information. in one mode, debug information (source id, data valid) is multiplexed onto the ecc pins; the other mode uses the debug pins. 20.4.3.1 debug information on debug pins if msrcid0 is high when sampled during por, the debug information from the ddr sdram interface is driven on msrcid[0:4] and mdval. this por value is captured in pordbgmsr[mem_sel] as described in section 18.4.1.5, ?por debug mode status register (pordbgmsr).? in this mode, the source id appears on msrcid[0:4] during a ras or cas cycle. during any other cycle, the value of msrcid[0:4] is all ones, which indicates idle cycles on the address/command interface. similarly, mdval is asserted during valid data cycles on the ddr interface. 20.4.3.2 debug information on ecc pins if msrcid1 is low when sampled during por, debug information from the ddr sdram interface is selected to appear on mecc[0:5] as shown in figure 20-1 . in this mode, the id value of the source port, (the source id), appears on mecc[0:4] during a ras or cas cycle. during any other cycle the value of mecc[0:4] is all ones. a data-valid signal (dval) is driven on mecc5 during valid ddr sdram data cycles. note in this mode, mecc[0:5] must be disconnected from all sdram devices to prevent contention on those lines. 20.4.4 local bus interface debug if msrcid0 is low when sampled during por, the lbc is selected as the source for the debug information appearing on msrcid[0:4] and mdval. for more information on this mode, see section 13.1.3.2, ?source id debug mode.? 20.4.5 watchpoint monitor the watchpoint monitor (wm) can be programmed to arm and trigger on many different events including any of the following:  external event (through trig_in)  a trace buffer event  a performance monitor overflow event  a comparison of the current and programmed context id registers
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 20-29 a watchpoint event can be used in the following ways:  trigger a logic analyzer (using trig_out)  arm or trigger the trace buffer  trigger a performance monitor event the large counters available in the performance monitor block and the interlock between it and the watchpoint monitor support sophisticated debug scenarios. a wm trigger event may be composed of several events programmed in the watchpoint monitor control registers (wmcr0?wmcr1). because the watchpoint monitor is disabled by default during por, these registers must be initialized to make use of this debug feature. note that the wm address mask register (wmamr) and the type mask register (wmtmr) are cleared during por. this means that the watchpoint monitor?s default behavior following a power-on reset is to trigger on any address and no transaction type. the reset value of wmcr0[tmd] is 0 which means transaction matching is enabled but since no transaction is selected (wmtmr=0), a match will never occur. either the transaction matching must be disabled by setting wmcr0[tmd] to a value of 1, or valid transactions must be selected by setting one or more of the wmtmr bits to a value of 1. 20.4.5.1 watchpoint monitor performance monitor events the wm can produce a performance monitor (pm) event with every trigger. this is accomplished by configuring the performance monitor to count wm events. for more information on this configuration see the events named ?number of watchpoint monitor hits,? and ?number of trace buffer hits,? in table 19-10 . multi-level triggers can be created using the watchpoint monitor, the performance monitor, and the trace buffer combined. for example, the wm can be programmed to trigger on events that also increment a pm counter (the performance monitor must also be programmed to respond to this event), the output of which (perfmon_overflow) could trigger the start of tracing in the trace buffer. 20.4.6 trace buffer the trace buffer is a 256 64 array that can capture information about the internal processing of transactions to selected interfaces. the trace buffer controls are a superset of those for the watchpoint monitor. close inspection of the trace buffer control registers (tbcr n ) and the wm control registers (wmcr n ) shows that trace buffer controls not needed for the wm are marked reserved in wmcr n . this permits using the trace buffer as a second watchpoint monitor by simply ignoring the trace options. the trace buffer provides great flexibility about when to start tracing, when to stop tracing, and what to trace. the trace mode field, tbcr0[mode], indicates when to trace: on every valid cycle, on a watchpoint monitor event, or when all the programmed events in the tbcr are met. this
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 20-30 freescale semiconductor debug features and watchpoint facility permits a user to program the trace condition in the watchpoint monitor and to program a start or stop condition in the trace buffer control register. the user can also program the tbcr with the conditions in which to stop tracing: on an event, or when the buffer is full. tbcr0[ifsel] specifies which interface transactions are being captured. the trace buffer can be programmed to trace the dispatch bus from any of the following:  e500 coherency module (ecm)  outbound host interface to the rapidio controller  outbound host interface to the pci controller  host interface to the ddr controller transactions come into the ecm, arbitrate for common resources, and get dispatched to the target port. information such as transaction types, source id, and other attributes can be captured in any of the selected interfaces. the trace buffer can be used to distinguish between requests due to an instruction fetch versus a data fetch on the rapidio interface, where external i/o alone does not allow for easy discrimination. 20.4.6.1 traced data formats (as a function of tbcr1[ifsel]) figure 20-20 shows the trace buffer entry format for an ecm dispatch (cmd) transaction that is specified when tbcr1[ifsel] = 000. table 20-27 describes the fields of cmd trace buffer entries. 0 4 5 9 10 13 14 18 19 31 32 63 r cmdtt cmdsid cmdtid cmdbc ? cmdaddr w reset 0000_0000_0000_0000_0000_0000_0000_0000 figure 20-20. e500 coherency module dispatch (cmd) trace buffer entry table 20-27. cmd trace buffer entry field descriptions (tbcr1[ifsel] = 000) bits name function 0?4 cmdtt transaction type. specifies the transaction type as shown in table 20-12 . for example, a value of zero indicates a write with local processor snoop condition. 5?9 cmdsid source id. identifies the source of the transaction as shown in table 20-26 . for example, a value of 0b01100 indicates that rapidio is the transaction source. 10?13 cmdtid target id. identifies the target of the transaction as shown in table 20-26 . for example, a value of 0b1100 indicates that rapidio is the transaction target. note that for a target id the topmost bit of the 5-bit field is always 0 and, therefore, only 4 bits are required to define a target interface.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 20-31 figure 20-21 shows the trace buffer entry format for the ddr sdram interface, tbcr1[ifsel] = 001. table 20-28 describes the fields of ddr sdram trace buffer entries when tbcr1[ifsel] = 001. 14?18 cmdbc byte count. range: 32 to 1 where a value of 0 indicates 32 bytes. 00000 32 bytes 00001 1 byte 00010 2 bytes 11110 30 bytes 11111 31 bytes 19?31 ? reserved 32?63 cmdaddr address bits 0?31 0 4 5 9 10 13 14 18 19 31 32 63 r ddrtt ddrsid ? ddrbc ? ddraddr w reset 0000_0000_0000_0000_0000_0000_0000_0000 figure 20-21. ddr trace buffer entry table 20-28. ddr trace buffer entry field descriptions (tbcr1[ifsel] = 001) bits name function 0?4 ddrtt transaction type. specifies the transaction type as shown in table 20-12 . for example, a value of all zeros maps to write. 5?9 ddrsid source id. specifies the source of the transaction as shown in table 20-26 . for example, a value of 01100 indicates that rapidio is the transaction source, and so on. 10?13 ? reserved 14?18 ddrbc byte count 19?31 ? reserved 32?63 ddraddr address bits 0?31 table 20-27. cmd trace buffer entry field descriptions (tbcr1[ifsel] = 000) (continued) bits name function
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 20-32 freescale semiconductor debug features and watchpoint facility figure 20-22 shows the pci trace buffer entry format when tbcr1[ifsel] = 010. table 20-29 describes the fields of pci trace buffer entries when tbcr1[ifsel] = 010. figure 20-23 shows the format for rapidio interface trace buffer entries when tbcr1[ifsel] = 011. table 20-30 describes the fields of the rapidio interface trace buffer entries. 0 4 5 9 10 11 12 31 32 63 r pcitt pcisid pcibc ? pciaddr w reset 0000_0000_0000_0000_0000_0000_0000_0000 figure 20-22. pci trace buffer entry table 20-29. pci trace buffer entry field descriptions (tbcr1[ifsel] = 010) bits name function 0?4 pcitt transaction type. specifies the transaction type as shown in table 20-12 . for example, a value of all zeros maps to write. 5?9 pcisid source id. identifies the source of the transaction as shown in table 20-26 . for example, a value of 01100 identifies rapidio as the transaction source. 10?11 pcibc byte count. the size of the transaction. 00 32 bytes 01 8 bytes 10 16 bytes 11 24 bytes 12?31 ? reserved 32?63 pciaddr address bits 0?31 0 4 5 9 10 13 14 18 19 32 33 63 r riott riosid ? riodwc rioaddr w reset 0000_0000_0000_0000_0000_0000_0000_0000 figure 20-23. rapidio trace buffer entry table 20-30. rapidio trace buffer entry field descriptions (tbcr1[ifsel] = 011) bits name function 0?4 riott transaction type. specifies the transaction type as shown in table 20-12 . for example, a value of all zeros indicates an nwrite transaction. 5?9 riosid source id. identifies the source of the transaction as shown in table 20-26 . for example, a value of 01100 identifies rapidio as the transaction source. ?
initialization MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 20-33 20.5 initialization configuring the appropriate control register must be the last step in the initialization sequence for either the watchpoint or trace buffer. that is, all required registers except the corresponding control register must be configured before any control register bits that enable watchpoint or trace events are set. 10?13 ? reserved 14?18 riodwc double-word count. this number times eight equals the byte count. 19?32 ? reserved 33?63 rioaddr address bits 0?30. represents a double-word address on rapidio table 20-30. rapidio trace buffer entry field descriptions (tbcr1[ifsel] = 011) (continued) bits name function
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 20-34 freescale semiconductor debug features and watchpoint facility
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-1 chapter 21 10/100 fast ethe rnet controller the MPC8540 provides a 10/100 fast ethernet controller (fec) operating at 10 to 100 megabits per second (mbps) that can be used as a device debug and maintenance port. the three-speed (10/100/1gb) ethernet controller (tsec) is separate from this 10/100 ethernet controller, and is described in chapter 14, ?three-speed ethernet controllers.? 21.1 introduction the 10/100 ethernet standard supports the ieee 802.3 ethernet frame format, backward compatibility for installed media, and the use of full- or half-duplex csma/cd. the ethernet protocol implements the bottom two layers of the open systems interconnection (osi) 7-layer model, that is, the data link and physical layers. figure 21-1 depicts the typical ethernet protocol stack and the relationship to the osi model. figure 21-1. 10/100 fast ethernet controller in relation to the osi protocol stack data link physical logical link control (llc) media access control (mac) osi reference model layers lan csma/cd layers higher layers 10/100 mbps 10/100 ethernet reconciliation pcs pma pmd mdi mii physical medium
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-2 freescale semiconductor 10/100 fast ethernet controller ethernet provides the following sublayers:  media access control (mac) sublayer?the mac sublayer provides a logical connection between the mac and its peer station. its primary responsibility is to initialize, control, and manage the connection with the peer station.  reconciliation sublayer?the reconciliation sublayer acts as a command translator. it maps the terminology and commands used in the mac layer into electrical formats appropriate for the physical layer entities.  mii (media-independent interface) sublayer?the mii sublayer provides a standard interface between the mac layer and the physical layer for 10/100 mbps operation. it isolates the mac layer and the physical layer, enabling the mac layer to be used with various implementations of the physical layer.  pcs (physical coding sublayer)?the pcs sublayer is responsible for encoding and decoding data stream to and from the mac sublayer.  pma (physical medium attachment) sublayer?the pma sublayer is responsible for serializing code groups into a bit stream suitable for serial bit-oriented physical devices(serdes) and vice versa. synchronization is also performed for proper data decoding in this sublayer. the pma sits between the pcs and the pmd sublayers.  pmd (physical medium dependent) sublayer?the pmd sublayer is responsible for signal transmission. the typical pmd functionality includes amplifier, modulation, and wave shaping. different pmd devices may support different media.  mdi (medium-dependent interface) sublayer?mdi is a connector. it defines different connector types for different physical media and pmd devices. ethernet/ieee 802.3 frames are based on the frame structure shown in figure 21-2 . the term ?packet? is sometimes used to refer to the frame plus the preamble and start frame delimiter (sfd). figure 21-2. ethernet/ieee 802.3 frame structure the elements of an ethernet frame are as follows:  preamble?the 7-byte preamble of alternating ones and zeros used for receiver timing synchronization (each byte containing the value 0x55)  start frame delimiter (sfd)?a sequence of 0xd5 (10101011 because the bit ordering is lsb first) indicates the beginning of the frame start frame delimiter preamble data destination address source address type/ length 6 bytes 1 byte 7 bytes 2 bytes 6 bytes 46?1500 bytes 4 bytes frame check sequence frame length is 64?1518 bytes
introduction MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-3  48-bit destination address (da)?the first bit identifies the address as an individual address (0) or a group address (1). the second bit is used to indicate whether the address is locally-defined (1) or globally-defined (0)  48-bit source address (sa)?(original versions of the ieee 802.3 specification allowed 16-bit addressing, which has never been used widely.)  ethernet type field/ieee 802.3 length field?the type field signifies the protocol (for example, tcp/ip) used in the rest of the frame. the length field specifies the length of the data portion of the frame. for both ethernet and ieee 802.3 frames to exist on the same lan, the length field must be unique from any type fields used in ethernet. this limitation requires that a type field be identified by a decimal number equal to or greater than 1536 (0x0600) but less than 65535 (0xffff). if the number, however, is between 0 and 1,500 (0x0000 through 0x05dc) then this field indicates the length of the mac client data. the range from 1,501 to 1,535 (0x5dd through 0x5ff) was intentionally left undefined.  data and padding?padding is optional. it is only needed if the data is smaller than 46 octets (one octet = one byte) to ensure the minimum frame size of 64 octets as specified in the ieee 802.3 standard. in 802.3x the first two octets of the data field are used as opcode (op) (pause = 0x0001) and the second two octets are used to transmit a pause time (pt) parameter (pausetime = 0x0000 for on and 0xffff for off). in addition, a third two-octet field can be used for an extended pause control parameter (pte). because the use of these fields varies with the protocol used, the ability to examine them and report their content can significantly accelerate ethernet frame processing.  frame-check sequence (fcs)?specifies the standard 32-bit cyclic redundancy check (crc) obtained using the standard ccitt-crc polynomial on all fields except the preamble, sfd and crc.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-4 freescale semiconductor 10/100 fast ethernet controller figure 21-3 details the ethernet/ieee 802.3 frame structure. figure 21-3. ethernet/ieee 802.3 frame structure with more details relative to figure 21-3 , the ieee 802.3 section 3.11 (mac frame format) defines the frame format such that the octets of a frame are transmitted from left to right (preamble first, the fcs last), and the bits of each octet are transmitted least-significant bit (lsb) first. the destination address example shown in figure 21-3 (02608c:876543) which would normally be written as 0000 0010 0110 0000 1000 1100 1000 0111 0110 0101 0100 0011 is transmitted bit by bit as 0100 0000 0000 0110 0011 0001 1110 0001 1010 0110 1100 0010 which is an individual address (because the lsb is cleared) but locally-defined (because the second least-significant bit is set). when first originated, a type field was used for protocol identification. the ieee 802.3 specification eliminated the type field, replacing it with the length field. the length field is used to identify the length, in bytes, of the data field. the protocol type in 802.3 frames is held within the data portion of the packet. the logical link control (llc) is responsible for providing services to the network layer regardless of media type, such as fddi, ethernet, token ring, and others. the llc layer makes use of llc protocol data units (pdus) in order to communicate between the media access control (mac) layer and the upper layers of the protocol stack. three variables determine access into the upper layers via the llc-pdu. the variables include the destination service access point (dsap), the source service access point (ssap), and a control variable. the dsap address specifies a unique identifier within the station providing protocol information for the upper layer. the ssap provides the same information for the source address. start frame delimiter preamble data destination address source address type/ length 6 bytes 1 byte 7 bytes vendor uservalue 2 bytes control ssap dsap information 6 bytes 46?1500 bytes 4 bytes llc frame yzxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx bit 0 (lsb) bit 47 destination address u/l i/g example: 02608c : 876543 (02608c = 3com, 876543 = uservalue assigned by 3com) note: the lsb of each octet is transmitted first. 3 bytes frame check sequence frame length is 64?1518 bytes lld destination address
introduction MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-5 the llc defines service access for protocols that conform to the open system interconnection (osi) model for network protocols. however, many protocols do not obey the rules for those layers and additional information must be added to the llc in order to provide information regarding those protocols. protocols that fall into this category include ip and ipx. the method used to provide this additional protocol information is called a subnetwork access protocol (snap) frame. a snap encapsulation is indicated by the dsap and ssap addresses being set to 0xaa and the llc control field being set to 0x03. if that address is seen, a snap header follows. the snap header is five bytes long. the first three bytes consist of the organization code (snap oui), which is assigned by the ieee. the last two bytes become the type value set from the original ethernet specifications if snap oui = 0, or they become a snap protocol identifier if snap oui is nonzero. the fec allows the flexibility to accelerate the identification and retrieval of all the standard and non-standard protocols mentioned above. figure 21-4 depicts the block diagram of the fec. figure 21-4. fec block diagram 21.1.1 10/100 fast ethernet controller overview the fec is designed to support 10/100 mbps ethernet/802.3 networks and contains the following components:  ethernet media access controller (mac)  first-in first-out (fifo) controller  direct memory access (dma) controller address/data filtering mac layer dma tx system clk data path pack words unpack words rx fifo 1 kbyte fifo control tx fifo 1 kbyte tx/rx descriptors tx/rx data tx/rx status block interface clocks mii mgmt to p h y
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-6 freescale semiconductor 10/100 fast ethernet controller the most-significant byte of data in a receive or transmit data buffer corresponds to the most-significant byte of a frame, respectively. the complete fec is designed for single mac applications. the fec supports the 10/100 mbps mii interface to connect to an external ethernet transceiver. the fec software programming model is similar to the mpc8260 (powerquicc ii) device. hence, it enables freescale semiconductor customers to leverage already implemented ethernet drivers, reducing the software development cycle. 21.2 features the MPC8540 fec includes these distinctive features:  ieee 802.3, 802.3u, 802.3x, 802.3ac compliant  support for different ethernet physical interfaces: ? 10/100 mbps ieee 802.3 mii ? 10 mbps ieee 802.3 mii  full- and half-duplex support  ieee 802.3 full-duplex flow control (automatic pause frame generation or software programmed pause frame generation and recognition)  support for out-of-sequence transmit queue (for initiating flow control)  programmable maximum frame length supports jumbo frames (up to 9.6 kbytes) and ieee 802.1 virtual local area network (vlan) frames  retransmission from transmit fifo following a collision  support for crc generation and verification of inbound/outbound packets  address recognition ? each exact match can be programmed to be accepted or rejected ? broadcast address (accept/reject) ? exact match 48-bit individual (unicast) address ? hash (256-bit hash) check of individual (unicast) addresses ? hash (256-bit hash) check of group (multicast) addresses ? promiscuous mode  extraction data and its associated buffer descriptors can be directed to processor?s l2 cache to reduce access latency
modes of operation MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-7 21.3 modes of operation the fec?s primary operational modes are the following:  full- and half-duplex operation. determined by maccfg2 full_duplex bit. full-duplex mode is intended for use on point to point links between switches or end node to switch. half-duplex mode is used in connections between an end node and a repeater or between repeaters. if configured in half-duplex mode (only 10 and 100 mbps operation, maccfg2 register?s full_duplex bit is cleared), the mac complies with the ieee csma/cd access method. if configured in full-duplex mode (10/100 mbps operation; maccfg2 register?s full_duplex bit is set), the mac supports flow control. if flow control is enabled, it allows the mac to receive or send pause frames.  10 mbps and 100 mbps mii interface operation. the mac-phy interface operates in mii mode by configuring bits 22?23 of maccfg2 (maccfg2[i/f_mode] = 01). the mii is the media-independent interface defined by the 802.3 standard for 10/100 mbps operation. operation speed is determined by the fec_tx_clk and fec_rx_clk signals which are driven by the transceiver. the transceiver auto negotiates the speed.  address recognition options the options supported are promiscuous, broadcast, exact individual address hash or exact match, and multicast hash match. for detailed descriptions refer to section 21.5.3.7.1, ?individual address registers 0?7 (iaddrn),? section 21.5.3.7.2, ?group address registers 0?7 (gaddrn),? section 21.5.3.4.1, ?receive control register (rctrl),? and section 21.6.2.5, ?frame recognition.?  internal loop back internal loop back mode is selected via the loop_back bit in the maccfg1 register. see section 21.6.2.9, ?internal and external loop back,? for details. 21.4 external signal descriptions this section defines the fec-to-chip signals. the buses are described using the bus convention used in ieee 802.3 because the phy follows this same convention (that is, txd[3:0] means 0 is the lsb). notice that except for external physical interfaces the buses and registers follow a big-endian format. the fec network interface supports the mii option that requires 15 i/o signals. the mii option supports both 10- and 100-mbps ethernet rates.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-8 freescale semiconductor 10/100 fast ethernet controller 21.4.1 detailed signal descriptions table 21-1 provides a detailed description of the fec interface signals. the modes follow the ieee 802.3 standard, 2000 edition. input signals not used are internally disabled. output signals not used are driven low. table 21-1. fec signals?detailed signal descriptions signal i/o description fec_col i collision. the behavior of this signal is not specified when in full-duplex mode. state meaning asserted/negated?asserted upon detection of a collision. it must remain asserted while the collision persists. timing asserted/negated?not required to transition synchronously with fec_tx_clk or fec_rx_clk. fec_crs i carrier sense. used as sdet (signal detect), an optional signal that some phys generate. state meaning asserted/negated?asserted when the transmit or receive medium is not idle. in case of a collision, fec_crs must stay asserted through the duration of the collision. timing asserted/negated?not required to transition synchronously with fec_tx_clk or fec_rx_clk. fec_rx_clk i receive clock. this is a continuous clock (2.5, or 25 mhz) that provides a timing reference for fec_rx_dv, fec_rxd, and fec_rx_er. fec_rx_dv i receive data valid. if fec_rx_dv is asserted, the phy is indicating that valid data is present on the mii interfaces. fec_rxd[3:0 ] i receive data in. represents a nibble of data to be transferred from the phy to the mac when fec_rx_dv is asserted. a completely formed sfd must be passed across the mii. when fec_rx_dv is not asserted, fec_rxd has no meaning. fec_rx_er i receive error state meaning asserted?when fec_rx_er and fec_rx_dv are asserted, the phy has detected an error in the current frame. negated?the phy has not detected an error in the current frame. fec_tx_clk i transmit clock in. fec_tx_clk is a continuous clock (with a frequency of 2.5 or 25 mhz) that provides a timing reference for fec_tx_en, fec_txd, and fec_tx_er. fec_tx_clk is generated in the phy and provided to the mac. fec_txd[3:0] o transmit data out state meaning asserted/negated?represents a nibble of data to be sent from the mac to the phy when fec_tx_en is asserted; has no meaning if fec_tx_en is negated. fec_tx_en o transmit data valid state meaning asserted?the mac is indicating that valid data is present on the mii. negated?valid data is not guaranteed to be present on the mii. timing asserted/negated?this signal transitions synchronously with respect to fec_tx_clk.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-9 21.5 memory map/register definition the fec uses a software model similar to that employed by the fast ethernet function supported on the freescale semiconductor mpc8260 cpm fcc and in the 10/100 controller of the mpc860t. the fec is programmed by a combination of control/status registers (csrs) and buffer descriptors. the csrs are used for mode control, interrupts, and to access status information. the descriptors are used to pass data buffers and related buffer status or frame information between the hardware and software. all accesses to and from the registers must be made with 32-bit accesses. there is no support for accesses of sizes other than 32 bits. this section of the document defines the memory map and describes the registers in detail. the buffer descriptors are described in section 21.6.3, ?buffer descriptors.? the mii registers are described in this section. 21.5.1 top-level module memory map the fec implementation requires 4 kbytes of memory-mapped space, of which more than 1 kbyte is reserved for future expansion. the space is divided into the following sections:  general control/status registers  transmit-specific control/status registers  receive specific control/status registers  mac registers  hash function registers fec_tx_er o transmit error state meaning asserted/negated?assertion of this signal for one or more clock cycles while fec_tx_en is asserted causes the phy to transmit one or more illegal symbols. asserting fec_tx_er has no effect when operating at 10 mbps or when fec_tx_en is negated. timing asserted/negated?this signal transitions synchronously with respect to fec_tx_clk. table 21-1. fec signals?detailed signal descriptions (continued) signal i/o description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-10 freescale semiconductor 10/100 fast ethernet controller table 21-2 defines the top-level memory map. 21.5.2 detailed memory map table 21-3 shows the address of each register, the name of the register, and a cross-reference to the complete description of the register. table 21-2. module memory map summary address function 000?0ff fec general control/status registers 100?2ff fec transmit control/status registers 300?4ff fec receive control/status registers 500?5ff fec mac registers 600?7ff reserved 800?8ff fec hash function registers 900?aff reserved b00?bff fec attribute registers c00?fff future expansion space table 21-3. module memory map offset name access 1 reset section/page fec general control and status registers 0x2_6000? 0x2_600c reserved r 0x0000_0000 ? 0x2_6010 ievent?interrupt event register r 0x0000_0000 21.5.3.1.1/21-13 0x2_6014 imask?interrupt mask register r/w 0x0000_0000 21.5.3.1.2/21-16 0x2_6018 edis?error disabled register r/w 0x0000_0000 21.5.3.1.3/21-18 0x2_601c? 0x2_6020 reserved r 0x0000_0000 ? 0x2_6024 minflr?minimum frame length register r/w 0x0000_0040 21.5.3.1.4/21-18 0x2_6028 ptv?pause time value register r/w 0x0000_0000 21.5.3.1.5/21-19 0x2_602c dmactrl?dma control register r/w 0x0000_0000 21.5.3.1.6/21-20 0x2_6030? 0x2_6088 reserved r 0x0000_0000 ? fec fifo control and status registers 0x2_604c fifo_pause_ctrl?fifo pause control register r/w 0x0000_0000 21.5.3.2.1/21-22 0x2_608c fifo_tx_thr?fifo transmit threshold register r/w 0x0000_0080 21.5.3.2.2/21-23
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-11 0x2_6090? 0x2_6094 reserved r 0x0000_0000 ? 0x2_6098 fifo_tx_starve?fifo transmit starve register r/w 0x0000_0020 21.5.3.3.4/21-27 0x2_609c fifo_tx_starve_shutoff?fifo transmit starve shutoff register r/w 0x0000_0080 21.5.3.3.5/21-28 0x2_60a0? 0x2_60fc reserved r 0x0000_0000 ? fec transmit control and status registers 0x2_6100 tctrl?transmit control register r/w 0x0000_0000 21.5.3.3.1/21-25 0x2_6104 tstat?transmit status register r/w 0x0000_0000 21.5.3.3.2/21-26 0x2_6108 reserved r 0x0000_0000 ? 0x2_610c tbdlen?txbd data length r 0x0000_0000 21.5.3.3.3/21-27 0x2_6110? 0x2_6120 reserved r 0x0000_0000 ? 0x2_6124 ctbptr?current txbd pointer register r 0x0000_0000 21.5.3.3.4/21-27 0x2_6128? 0x2_6180 reserved r 0x0000_0000 ? 0x2_6184 tbptr?txbd pointer register r/w 0x0000_0000 21.5.3.3.5/21-28 0x2_6188? 0x2_6200 reserved r 0x0000_0000 ? 0x2_6204 tbase?txbd base address register r/w 0x0000_0000 21.5.3.3.6/21-28 0x2_6208? 0x2_62ac reserved r 0x0000_0000 ? 0x2_62b0 ostbd?out-of-sequence txbd register r/w 0x0000_0000 21.5.3.3.7/21-29 0x2_62b4 ostbdp?out-of-sequence txbd pointer register r/w 0x0000_0000 21.5.3.3.8/21-31 0x2_62b8? 0x2_62fc reserved r 0x0000_0000 ? fec receive control and status registers 0x2_6300 rctrl?receive control register r/w 0x0000_0000 21.5.3.4.1/21-31 0x2_6304 rstat?receive status register r/w 0x0000_0000 21.5.3.4.2/21-32 0x2_6308 reserved r 0x0000_0000 ? 0x2_630c rbdlen?rxbd data length register r 0x0000_0000 21.5.3.4.3/21-33 0x2_6310? 0x2_6320 reserved r 0x0000_0000 ? 0x2_6324 crbptr?current rxbd pointer register r 0x0000_0000 21.5.3.4.4/21-33 table 21-3. module memory map (continued) offset name access 1 reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-12 freescale semiconductor 10/100 fast ethernet controller 0x2_6328? 0x2_633c reserved r 0x0000_0000 ? 0x2_6340 mrblr?maximum receive buffer length register r/w 0x0000_0000 21.5.3.4.5/21-34 0x2_6344? 0x2_6380 reserved r 0x0000_0000 ? 0x2_6384 rbptr?rxbd pointer register r/w 0x0000_0000 21.5.3.4.6/21-35 0x2_6388? 0x2_6400 reserved r 0x0000_0000 ? 0x2_6404 rbase?rxbd base address register r/w 0x0000_0000 21.5.3.4.7/21-35 0x2_6408? 0x2_64fc reserved r 0x0000_0000 ? fec mac registers 0x2_6500 maccfg1?mac configuration register 1 r/w 0x0000_0000 21.5.3.6.1/21-38 0x2_6504 maccfg2?mac configuration register 2 r/w 0x0000_7000 21.5.3.6.2/21-40 0x2_6508 ipgifg?inter-packet gap/inter-frame gap register r/w 0x4060_5060 21.5.3.6.3/21-41 0x2_650c hafdup?half-duplex register r/w 0x00a0_f037 21.5.3.6.4/21-41 0x2_6510 maxfrm?maximum frame length register r/w 0x0000_0600 21.5.3.6.5/21-42 0x2_6514? 0x2_6538 reserved r 0x0000_0000 ? 0x2_653c ifstat?interface status register r 0x0000_0000 21.5.3.6.6/21-43 0x2_6540 macstnaddr1?station address register, part 1 r/w 0x0000_0000 21.5.3.6.7/21-43 0x2_6544 macstnaddr2?station address register, part 2 r/w 0x0000_0000 21.5.3.6.8/21-44 0x2_6548? 0x2_67fc reserved r 0x0000_0000 ? fec hash function registers 0x2_6800 iaddr0?individual address register 0 r/w 0x0000_0000 21.5.3.7.1/21-45 0x2_6804 iaddr1?individual address register 1 r/w 0x0000_0000 0x2_6808 iaddr2?individual address register 2 r/w 0x0000_0000 0x2_680c iaddr3?individual address register 3 r/w 0x0000_0000 0x2_6810 iaddr4?individual address register 4 r/w 0x0000_0000 0x2_6814 iaddr5?individual address register 5 r/w 0x0000_0000 0x2_6818 iaddr6?individual address register 6 r/w 0x0000_0000 0x2_681c iaddr7?individual address register 7 r/w 0x0000_0000 0x2_6820? 0x2_687c reserved r 0x0000_0000 ? table 21-3. module memory map (continued) offset name access 1 reset section/page
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-13 21.5.3 memory-mapped register descriptions this section provides a detailed description of the fec registers. because all of these registers are 32 bits wide, only 32-bit register accesses are supported. 21.5.3.1 fec general control and status registers this section describes general control and status registers used for both transmitting and receiving ethernet frames. all of the registers are 32 bits wide. 21.5.3.1.1 interrupt event register (ievent) if an event occurs that sets a bit in the interrupt event (ievent) register, shown in figure 21-5 , an interrupt is generated if the corresponding bit in the interrupt enable register (imask) is also set. the bit in the interrupt event register is cleared if a 1 is written to that bit position. a write of 0 has no effect. 0x2_6880 gaddr0?group address register 0 r/w 0x0000_0000 21.5.3.7.2/21-46 0x2_6884 gaddr1?group address register 1 r/w 0x0000_0000 0x2_6888 gaddr2?group address register 2 r/w 0x0000_0000 0x2_688c gaddr3?group address register 3 r/w 0x0000_0000 0x2_6890 gaddr4?group address register 4 r/w 0x0000_0000 0x2_6894 gaddr5?group address register 5 r/w 0x0000_0000 0x2_6898 gaddr6?group address register 6 r/w 0x0000_0000 0x2_689c gaddr7?group address register 7 r/w 0x0000_0000 0x2_68a0? 0x2_6aff reserved r 0x0000_0000 ? fec attribute registers 0x2_6b00? 0x2_6bf4 reserved r 0x0000_0000 ? 0x2_6bf8 attr?attribute register r/w 0x0000_0000 21.5.3.8.1/21-46 0x2_6bfc attreli?attribute el & ei register r/w 0x0000_0000 21.5.3.8.2/21-47 fec future expansion space 0x2_6c00? 0x2_6fff reserved r 0x0000_0000 ? 1 r = read only, w = write only, r/w = read and write, lh = latches high, sc = self-clearing. table 21-3. module memory map (continued) offset name access 1 reset section/page
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-14 freescale semiconductor 10/100 fast ethernet controller these interrupts can be divided into operational interrupts, transceiver/network error interrupts, and internal error interrupts. interrupts that may occur in normal operation are:  gtsc, grsc, txf, txb, txc, rxf, rxb, rxc, and msro interrupts resulting from errors/problems detected in the network or transceiver are:  babr, babt, lc, and crl/xda interrupts resulting from internal errors are:  eberr, xfun, and bsy table 21-4 describes the fields of the ievent register. 012 3456789101112131415 r babr rxc bsy eberr 0 msro gtsc babt txc txe txb txf 0 lc crl/ xda xfun w reset 0000_0000_0000_0000 16 17 22 23 24 25 31 r rxb 00 000 0 grsc rxf 00 00000 w reset 0000_0000_0000_0000 offset 0x2_6010 figure 21-5. ievent register definition table 21-4. ievent field descriptions bits name description 0 babr babbling receive error. this bit indicates that a frame was received with length in excess of the mac?s maximum frame length register while maccfg2[huge frame] is set. 0 excessive frame not received 1 excessive frame received 1 rxc receive control interrupt. a control frame was received. if maccfg1[rx_flow] is set, a pause operation is performed lasting for the duration specified in the received pause control frame and beginning when the frame was received. 0 control frame not received 1 control frame received 2 bsy busy condition interrupt. indicates that a frame was received and discarded due to a lack of buffers. when ievent[bsy] is set rstat[qhlt] is also set. in order to begin receiving packets again, the user must clear rstat[qhlt]. this bit and rstat[qhlt] are set whenever the fec reads an rxbd with its empty field cleared. 0 no frame received and discarded. 1 frame received and discarded.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-15 3 eberr ethernet bus error. this bit indicates that a system bus error occurred while a dma transaction was underway. if the eberr is set while transmission is in progress, the dma stops sending data to the tx fifo which eventually causes an underrun error (xfun) and tstat[thlt] is set. if the eberr is set while receiving a frame, the dma discards the frame and rstat[qhlt] is set. 0 no system bus error occurred. 1 system bus error occurred. 4?reserved 5 msro mstat register overflow. this interrupt is asserted if the count for one of the mstat registers has exceeded the size of the register. 0 mstat count not exceeding register size. 1 mstat count exceeds register size. 6 gtsc graceful transmit stop complete. this interrupt is asserted following the completion of a graceful stop, which was intitiated by setting either dmactrl[gts] or tctrl[tfc_pause]. graceful stop means that the transmitter is put into a pause state after completion of the frame currently being transmitted. 0 no graceful stop interrupt. 1 graceful stop requested. 7 babt babbling transmit error. this bit indicates that the transmitted frame length has exceeded the value in the mac?s maximum frame length register and maccfg2[huge frame] is cleared. frame truncation occurs when this condition occurs. txbd[txtrunc] is set in the last txbd (txbd[l] is set) of the frame. 0 transmitted frame length not exceeding maximum frame length. 1 transmitted frame length exceeding maximum frame length. 8 txc transmit control interrupt. this bit indicates that a control frame was transmitted. 0 control frame not transmitted. 1 control frame transmitted. 9 txe transmit error. indicates that an error occurred on the transmitted channel that caused tstat[thlt] to be set by the fec. this bit is set whenever any transmit error occurs that causes the transmitter to halt (eberr, lc, crl/xda, xfun). it is not set if dmactrl[wop] is set and the fec runs out of txbds to process. in order to begin transmitting packets again, the user must clear tstat[thlt]. 0 no transmit channel error occurred. 1 transmit channel error occurred. 10 txb transmit buffer. indicates that a transmit buffer descriptor was updated whose i (interrupt) bit was set in its status word and was not the last buffer descriptor of the frame. 0 no transmit buffer descriptor updated. 1 transmit buffer descriptor updated. 11 txf transmit frame interrupt. indicates that a frame was transmitted and that the last corresponding transmit buffer descriptor (txbd) was updated. this only occurs if the i (interrupt) bit in the status word of the buffer descriptor is set. 0 no frame transmitted/txbd not updated. 1 frame transmitted/txbd updated. 12 ? reserved 13 lc late collision. this bit indicates that a collision occurred beyond the collision window (slot time) in half-duplex mode. the frame is truncated with a bad crc and the remainder of the frame is discarded. 0 no late collision occurred. 1 late collision occurred. table 21-4. ievent field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-16 freescale semiconductor 10/100 fast ethernet controller 21.5.3.1.2 interrupt mask register (imask) the interrupt mask register, shown in figure 21-6 , provides control over which possible interrupt events are allowed to generate an actual interrupt. all implemented bits in this csr are r/w. this register is cleared upon a hardware reset. if the corresponding bits in both the ievent and imask registers are set, an interrupt is generated. the interrupt signal can be cleared by clearing the corresponding ievent bit. 14 crl/ xda collision retry limit/excessive defer abort. indicates either one of two conditions occurred while attempting to transmit a frame: 1) the number of successive transmission collisions has exceeded the mac?s hafdup[retransmission maximum] count or 2) an excessive defer abort condition has occurred. an excessive defer abort condition occurs when the tsec waits more than 3036 bytes while attempting to send a frame and hafdup[excess_defer] is 0. the txbd[def] or ostbd[def] is also set. in either case the frame is discarded without being transmitted and the tsec is halted (tstat[thlt] is set). the crl or xda condition can only occur while in half-duplex mode. 0 successive transmission collisions do not exceed maximum and no excessive defer abort condition has occurred. 1 successive transmission collisions exceed maximum or an excessive defer abort condition has occurred. 15 xfun transmit fifo underrun. indicates that the transmit fifo became empty before the complete frame was transmitted. 0 transmit fifo not underrun. 1 transmit fifo underrun. 16 rxb receive buffer. indicates that a receive buffer descriptor was updated which had the i (interrupt) bit set in its status word and was not the last buffer descriptor of the frame. 0 receive buffer descriptor not updated. 1 receiver buffer descriptor updated. 17?22 ? reserved 23 grsc graceful receive stop complete. this interrupt is asserted if a graceful receive stop is completed. it allows the user to know if the system has completed the stop and it is safe to write to receive registers (status, control or configuration registers) that are used by the system during normal operation. 0 graceful stop not completed. 1 graceful stop completed. 24 rxf receive frame interrupt. the last receive buffer descriptor (rxbd) of a frame was updated. this occurs only if the i (interrupt) bit in the buffer descriptor status word is set. 0 frame not received. 1 frame received. 25?31 ? reserved table 21-4. ievent field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-17 table 21-5 describes the fields of the imask register. 012 345 6 7 89101112131415 r bren rxcen bsyen eberren 0 msroen gtscen bten txcen txeen txben txfen 0 lcen crl/ xdaen xfunen w reset 0000_0000_0000_0000 16 17 22 23 24 25 31 r rxben 00 000 0 grscen rxfen 000000 0 w reset 0000_0000_0000_0000 offset 0x2_6014 figure 21-6. imask register definition table 21-5. imask field descriptions bits name description 0 bren babbling receiver interrupt enable 1 rxcen receive control interrupt enable 2 bsyen busy interrupt enable 3 eberren ethernet controller bus error enable 4?reserved 5 msroen mstat register overflow interrupt enable 6 gtscen graceful transmit stop complete interrupt enable 7 bten babbling transmitter interrupt enable 8 txcen transmit control interrupt enable 9 txeen transmit error interrupt enable 10 txben transmit buffer interrupt enable 11 txfen transmit frame interrupt enable 12 ? reserved 13 lcen late collision enable 14 crl/xdaen collision retry limit / excessive defer abort enable 15 xfunen transmit fifo underrun enable 16 rxben receive buffer interrupt enable 17?22 ? reserved 23 grscen graceful receive stop complete interrupt enable 24 rxfen receive frame interrupt enable 25?31 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-18 freescale semiconductor 10/100 fast ethernet controller 21.5.3.1.3 error disabled register (edis) the error disabled register allows the user to control the reporting of errors by the fec. the ievent bit corresponding to an error is not set if the error is disabled in the edis register. figure 21-7 shows the edis register. table 21-6 describes the fields of the edis register. 21.5.3.1.4 minimum frame length register (minflr) minflr, shown in figure 21-8 , is written by the user and tells the fec the smallest packet to accept and place in a receive buffer pointed to by the rxbd. 01 2 3 4 1213 1415 r0 0 bsydis eberrdis 000000000 lcdis 00 w reset 0000_0000_0000_0000 16 31 r0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w reset 0000_0000_0000_0000 offset 0x2_6018 figure 21-7. edis register definition table 21-6. edis field descriptions bits name description 0?1 ? reserved 2 bsydis busy disabled 3 eberrdis ethernet controller bus error disabled 4?12 ? reserved 13 lcdis late collision disabled 14?31 ? reserved 0 24 25 31 r0000000000000000000000000 minflr w reset 0000_0000_0000_0000_0000_0000_0100_0000 offset 0x2_6024 figure 21-8. minflr register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-19 table 21-7 describes the fields of the minflr register. 21.5.3.1.5 pause time value register (ptv) ptv, shown in figure 21-9 , is written by the user to store the pause duration used when the fec initiates a pause frame through tctrl[tfc_pause]. the low-order 16 bits (pt) represent the pause time and the high-order 16 bits (pte) represent the extended pause control parameter. the pause time is measured in units of pause_quanta, equal to 512 bit times. the pause time can range from 0 to 65,535 pause_quanta, or 0 to 33,553,920 bit times. see section 21.6.2.6, ?flow control,? for additional details. table 21-7. minflr field descriptions bits name description 0?24 ? reserved 25?31 minflr minimum receive frame length (typically 64 decimal, which is the maximum). ethernet discards incoming frames shorter than minflr unless rctrl[rsf] (receive short frames) is set, in which case rxbd[sh] (frame too short) is set in the last rxbd. unlike the mpc8260, in which pads are added to make the transmit frame equal to minflr bytes, if padding is requested, the fec always pads transmit frames to 64 bytes ignoring minflr. minflr is only used to determine the minimum size of acceptable receive frames. 0151631 r pte pt w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6028 figure 21-9. ptv register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-20 freescale semiconductor 10/100 fast ethernet controller table 21-8 describes the fields of the ptv register. 21.5.3.1.6 dma control register (dmactrl) dmactrl is writable by the user to configure the dma block. figure 21-10 describes the definition for the dmactrl register. table 21-9 describes the fields of the dmactrl register. table 21-8. ptv field descriptions bits name description 0?15 pte extended pause control. this field allows software to add a 16-bit additional control parameter into the pause frame to be sent when tctrl[tfc_pause] is set. note that current ieee 802.3 pause frame format requires this parameter to be set to 0. 16?31 pt pause time value. represents the 16-bit pause quanta (that is, 512 bit times). this pause value is used as part of the pause frame to be sent when tctrl[tfc_pause] is set. see section 21.6.2.6, ?flow control,? for more information. 0232425262728293031 r00000000000000000000000 0 tdsen tbdsen 0 grs gts 0 wwr wop w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_602c figure 21-10. dmactrl register definition table 21-9. dmactrl field descriptions bits name description 0?23 ? reserved 24 tdsen tx data snoop enable 0 disables snooping of all transmit frames from memory. 1 enables snooping of all transmit frames from memory. 25 tbdsen txbd snoop enable 0 disables snooping of all transmit bd memory accesses. 1 enables snooping of all transmit bd memory accesses. 26 ? reserved
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-21 21.5.3.2 fec fifo control and status registers the following registers allow the user to change some of the default settings in the fifo that can be used to optimize operation for performance or for safety. they must be set carefully in order to 27 grs graceful receive stop. if this bit is set, the ethernet controller stops receiving frames following completion of the frame currently being received. (that is, after a valid end of frame was received). the buffer of the receive frame associated with the eof is closed and the ievent[grsc] is set. because the mac?s receive enable bit (maccfg[rx_en]) may still be set, the mac may continue to receive but the fec ignores the receive data until grs is cleared. if this bit is cleared, the fec scans the input data stream for the start of a new frame (preamble sequence and start of frame delimiter) and the first valid frame received uses the next rxbd. if grs is set, the user must monitor the graceful receive stop complete (grsc) bit in the ievent register to insure that the graceful receive stop was completed. the user can then clear ievent[grsc] and can write to receive registers that are accessible to both user and the fec hardware without fear of conflict. 0 the fec scans the input data stream for valid frames. 1 the fec stops receiving frames following completion of current frame. 28 gts graceful transmit stop. if this bit is set, the ethernet controller stops transmission after the completion of any frame that is currently being transmitted and the gtsc interrupt in the ievent register is asserted. if frame transmission is not currently underway, the gtsc interrupt is asserted immediately. once transmission has completed, a ?restart? can be accomplished by clearing gts. 0 the fec continues. 1 the fec stops transmission after completion of current frame. 29 ? reserved 30 wwr write with response. this bit gives the user the assurance that a bd was updated in memory before it receives an interrupt concerning a transmit or receive frame. 0 do not wait for acknowledgement from system for bd writes before setting ievent bits. 1 before setting ievent bits txb, txf, txe, ie, xfun, lc, crl/xda, rxb, rxf, the fec waits for system acknowledgement that the transmit or receive bd being updated was stored in memory. 31 wop wait or poll. this bit, which is applicable only to the transmitter, provides the user the option for the fec to periodically poll txbd or to wait for software to tell fec to fetch a buffer descriptor. while operating in the wait mode, the fec allows two additional reads of a descriptor which is not ready before entering a halt state. no interrupt is driven (ievent[txe] is clear). to resume transmission, software must clear tstat[thlt]. note that if this bit is set, the user must ensure that all txbds involved with sending a frame have their ready bits set before any transmission begins. otherwise, fec behavior is boundedly undefined. in wait mode (dmactrl[wop] is set) when fec is processing a frame and an intermediate txbd?s ready bit is cleared, fec does not halt, but instead continuously polls the same txbd until the txbd becomes ready or an ethernet interface error or a memory error is encountered. if the txbd becomes ready (txbd[ready] is set), fec continues to process the frame. if an error occurs before the txbd becomes ready, fec reports the error in both the ievent register as well as the txbd for ethernet interface errors, or the ievent[eberr] for a memory error and sets tstat[thlt]. note : software must eventually set all of its txbds for a frame, because fec continuously reads an intermediate txbd until it becomes ready if insufficient data has been read to surpass the fifo transmit threshold (fifo_tx_thr) register value. 0 poll txbd every 512 clocks. 1 do not poll, but wait for a write to tstat[thlt]. table 21-9. dmactrl field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-22 freescale semiconductor 10/100 fast ethernet controller avoid an underrun condition. underrun is an error condition in which data is not retrieved from external memory quickly enough, leaving the tx fifo empty before the complete frame is transmitted. because different combinations of events, several of which are determined by the user, can lead to underrun, the fec provides several fifo registers that allow the user to select the proper setting to be able to tune the system and obtain the maximum performance with minimal chance of underrun. the principal causes for underrun in the fec are:  misaligned data buffer addresses  small data buffer sizes  combinations of the above it is recommended that the minimum size data buffers be 64 bytes and that data buffers be 64-byte aligned. the user can deviate from these recommended values to try to increase performance or to use less memory, but unless the default values of some of the fifo registers are adjusted, the probability of an underrun may also increase. the fifo_tx_thr (default is 512 entries) indicates the amount of data required to be in the fifo before starting the transmission of a frame. the fifo_tx_starve (default is 128 entries) is used to indicate that the amount of data in the fifo is so low that the risk of underrun is extremely high. the fifo_tx_starve_shutoff (default is 512 entries) contains the watermark level to be used for exiting the starve state. these registers are intended to allow the user to make the proper trade-off. if triggered, the starve mode, for instance, automatically raises the priority of fec fetches from memory. 21.5.3.2.1 fifo pause control register (fifo_pause_ctrl) fifo_pause_ctrl, shown in figure 21-11 , is writable by the user to configure the properties of the fec fifo. table 21-10 describes the fields of the fifo_pause_ctrl register. 0 15 r00000000000000 0 0 w reset 0000_0000_0000_0000 16 29 30 31 r00000000000000 tfc_pause_en 0 w reset 0000_0000_0000_0000 offset 0x2_604c figure 21-11. fifo_pause_ctrl register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-23 21.5.3.2.2 fifo transmit threshold register (fifo_tx_thr) the purpose of the threshold register is to trigger the unloading of fifo data to the phy. it represents the numerical sram entry (0-255 for a 1-kbyte fifo) to trigger the threshold function. if the used entry count is equal to or greater than the threshold register, then transmission can begin. this register is read/write by software. this register is initialized to 0000_0000_0000_0000_0000_0000_1000_0000 at system reset. figure 21-12 describes the definition for the fifo_tx_thr register. table 21-10. fifo_pause_ctrl field descriptions bits name description 0?29 ? reserved. 30 tfc_pause_en tfc_pause enable. this bit enables the ability to transmit a pause control frame by setting the tctrl[tfc_pause] bit. this bit is cleared at reset. 0 pause control frame transmission disabled. 1 pause control frame transmission enabled. 31 ? reserved. 01516232431 r000000000000000000000000 fifo_tx_thr w reset 0000_0000_0000_0000_0000_0000_1000_0000 offset 0x2_608c figure 21-12. fifo_tx_thr register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-24 freescale semiconductor 10/100 fast ethernet controller table 21-11 describes the fields of the fifo_tx_thr register. 21.5.3.2.3 fifo transmit starve register (fifo_tx_starve) the purpose of the starve register is to inform the system of extremely imminent underrun conditions. it represents the numerical sram entry (0?255 for 1-kbyte fifo) to trigger the starve function. if the used entry count in the fifo is less than or equal to the starve register, a starve alert is triggered. this triggered condition is used to throttle back the ocn2cu interface at the e500 coherency module (ecm), to change the tx transaction priority. this register is read/write by software. figure 21-13 describes the definition for the fifo_tx_starve register. table 21-12 describes the fields of the fifo_tx_starve register. 21.5.3.2.4 fifo transmit starve shutoff register (fifo_tx_starve_shutoff) the starve shutoff registers contains the watermark level to be used for coming out of the starve state. if the starve state is in effect and the number of valid entries in the fifo becomes greater than or equal to the value in the fifo_tx_starve_shutoff register, the starve condition table 21-11. fifo_tx_thr field descriptions bits name description 0?23 ? reserved 24?31 fifo_tx_thr fifo transmit threshold. marks the number of entries in the transmit fifo that when reached triggers the unloading of frame data into the mac. if the fifo tx used entry count is equal to or greater than fifo_tx_thr, frame transmission request is sent to the mac. 0 23 24 31 r000000000000000000000000 fifo_tx_starve w reset 0000_0000_0000_0000_0000_0000_0010_0000 offset 0x2_6098 figure 21-13. fifo_tx_starve register definition table 21-12. fifo_tx_starve field descriptions bits name description 0?23 ? reserved 24?31 fifo_tx_starve fifo transmit starve. indicates the value to trigger the transmit starve function. it triggers once the fifo transmit used entry count is less than or equal to the fifo tx starve. the starve state turns off when the fifo tx used entry count becomes greater than or equal to the fifo tx starve shutoff register.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-25 ends. this register is read/write by software. figure 21-14 describes the definition for the fifo_tx_starve_shutoff register. table 21-13 describes the fields of the fifo_tx_starve_shutoff register. 21.5.3.3 fec transmit control and status registers this section describes the control and status registers that are used specifically for transmitting ethernet frames. all of the registers are 32 bits wide. 21.5.3.3.1 transmit control register (tctrl) this register is writable by the user to configure the transmit block. figure 21-15 describes the definition for the tctrl register. 0 23 24 31 r000000000000000000000000 fifo_tx_starve_shutoff w reset 0000_0000_0000_0000_0000_0000_1000_0000 offset 0x2_609c figure 21-14. fifo_tx_starve_shutoff register definition table 21-13. fifo_tx_starve_shutoff field descriptions bits name description 0?23 ? reserved 24?31 fifo_tx_starve_shutoff fifo transmit starve shutoff. indicates the value to use to turn off the starve state. the starve state turns off when the fifo rx used entry count becomes greater than or equal to the fifo rx starve shutoff register. 0 192021 26 27 28 29 31 r000000000000000 0 0 00 0 thdf 0 0 0 0 0 0 rfc_pause tfc_pause 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6100 figure 21-15. tctrl register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-26 freescale semiconductor 10/100 fast ethernet controller table 21-14 describes the fields of the tctrl register. 21.5.3.3.2 transmit status register (tstat) this register is written by the fec to convey dma status information. figure 21-16 describes the definition for the tstat register. table 21-14. tctrl field descriptions bits name description 0?19 ? reserved 20 thdf transmit half-duplex flow control. written by user. this bit is not self-resetting. 0 disable back pressure. 1 back pressure is applied to media. 21?26 ? reserved 27 rfc_pause receive flow control pause frame. written by the fec. this read-only status bit is set if a flow control pause frame was received and the transmitter is paused for the duration defined in the received pause frame. this bit automatically clears after the pause duration is complete. 0 pause duration complete. 1 pause duration in progress. 28 tfc_pause transmit flow control pause frame. use this bit to transmit a pause frame. to transmit a flow control pause frame, first set fifo_pause_ctrl[tfc_pause_en]. next, set maccfg1[gts]. if tfc_pause is then set, the mac stops transmission of data frames after the current transmission completes. the gtsc interrupt in the ievent register is asserted. with transmission of data frames stopped, the mac transmits a mac control pause frame with the duration value obtained from the ptv register. the txc interrupt occurs after sending the control pause frame. next, the mac clears tfc_pause and resumes transmitting data frames. note that if the transmitter is paused due to user assertion of gts or reception of a pause frame, the mac may still transmit a mac control pause frame. 0 no outstanding pause frame transmission request. 1 pause frame transmission requested. 29?31 ? reserved 01 31 r thlt 0000000000000000000000000000000 w reset: 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6104 figure 21-16. tstat register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-27 table 21-15 describes the fields of the tstat register. 21.5.3.3.3 txbd data length register (tbdlen) tbdlen is a dma register that contains the number of bytes remaining in the current transmit buffer. figure 21-17 describes the definition for the tbdlen register. table 21-16 describes the fields of the tbdlen register. 21.5.3.3.4 current transmit buffer descriptor pointer register (ctbptr) ctbptr, shown in figure 21-18 , contains the address of the transmit buffer descriptor either currently being processed, or processed most recently. table 21-15. tstat field descriptions bit name description 0 thlt transmit halt 0 no hardware initiated transmission halt. 1 fec transmission function halted. set by the fec to inform the user that it is no longer processing transmit frames and the transmit dma function is disabled by hardware. to re-start the transmission function, the user must clear this bit by writing a one. 1?31 ? reserved 0151631 r0000000000000000 tbdlen w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_610c figure 21-17. tbdlen register definition table 21-16. tbdlen field descriptions bits name description 0?15 ? reserved 16?31 tbdlen internally written by the dma module. the transmit channel remains active until tbdlen is 0. 0 28 29 31 rctbptr 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6124 figure 21-18. ctbptr register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-28 freescale semiconductor 10/100 fast ethernet controller table 21-17 describes the fields of the ctbptr register. 21.5.3.3.5 transmit buffer descriptor pointer register (tbptr) tbptr contains the low-order 32 bits of the next transmit buffer descriptor address. figure 21-19 describes the definition for the tbptr register. this register takes on the value of tbase when the tbase register is written by software. table 21-18 describes the fields of the tbptr register. 21.5.3.3.6 transmit descriptor base address register (tbase) the tbase register is written by the user with the txdb base address. the value must be divisible by eight for the 8-byte data buffer descriptors. figure 21-20 describes the definition for the tbase register. table 21-17. ctbptr field descriptions bits name description 0?28 ctbptr internally written by the dma module. the value increments by eight (bytes) each time a descriptor is read from memory. 29?31 ? reserved 0 28 29 31 r tbptr 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6184 figure 21-19. tbptr register definition table 21-18. tbptr field descriptions bit name description 0?28 tbptr internally written by the dma module. the value increments by eight (bytes) each time a descriptor is read from memory. 29?31 ? reserved 0 28 29 31 r tbase 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6204 figure 21-20. tbase register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-29 table 21-19 describes the fields of the tbase register. 21.5.3.3.7 out-of-sequence txbd register (ostbd) the out-of-sequence txbd register (ostbd), shown in figure 21-21 , includes the status/control and data length in the same format as a regular txbd. it is useful for sending flow control frames. the ostbd[r] is always checked between frames. if it is not ready, a regular frame is sent. if a flow control frame is sent and ostbd[i] is set, a txc event is generated after frame transmission. this area must be cleared while not in use. once the tsec is in paused mode the out-of-sequence buffer descriptor cannot be used to send another flow control frame because the mac regards it as a regular txbd. table 21-20 describes the fields of the ostbd register. table 21-19. tbase field descriptions bits name description 0?28 tbase transmit base. defines the starting location in the memory map for the fec txbds. this field must be 8-byte aligned. together with setting the w (wrap) bit in the last bd, the user can select how many bds to allocate for the transmit packets. the user must initialize tbase before enabling the fec transmit function. 29?31 ? reserved 0 1 2 3 4 5 6 7 8 9 10 13 14 15 16 31 r r pad/crc w i l tc def to1 hfe/lc rl rc un 0 ostbdlen w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_62b0 figure 21-21. ostbd register definition table 21-20. ostbd field descriptions bits name description 0 r ready. written by both the fec and the user. 0 the data buffer associated with this bd is not ready for transmission. the user is free to manipulate this bd or its associated data buffer. the fec clears this bit after the buffer was transmitted or after an error condition is encountered. 1 the data buffer, prepared for transmission by the user, was not transmitted or is currently being transmitted. no fields of this bd may be written by the user once this bit is set. 1 pad/crc padding and crc attachment for short frames. (valid only when maccfg2[pad/crc] is cleared, and maccfg2[crc en] is cleared.) if maccfg2[pad/crc] is set, pads are added to all short frames, however, this bit is ignored. 0 do not add pads to short frames unless ostbd[tc] is set. 1 add pads to short frames. pad bytes are inserted until the length of the transmitted frame equals 64 bytes. unlike the mpc8260 which pads up to minflr value, fec always pads up to the ieee minimum frame length of 64 bytes.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-30 freescale semiconductor 10/100 fast ethernet controller 2 w wrap. written by user. this bit is ignored by fec. 3 i interrupt. written by user. 0 no interrupt is generated after this buffer is serviced. 1 ievent[txf] is set after this buffer is serviced. setting this bit can cause an interrupt if imask[txfen] is enabled. 4 l last in frame. (the ostbd is always the last in the frame, so l is always set). hardwired to a value of 1. 5 tc tx crc. written by user. (valid only while it is set in the first bd and ostbd[pad/crc] is cleared, maccfg2[pad/crc] is cleared, and maccfg2[crc en] is cleared.) if maccfg2[pad/crc] is set or maccfg2[crc en] is set, a crc is added to all frames and this bit is ignored. 0 end transmission immediately after the last data byte, unless txbd[pad/crc] is set. 1 transmit the crc sequence after the last data byte. 6 def defer indication. written by the fec. hardware updates this bit after transmitting a frame when used as a ?defer indicator.? software/user updates this bit while building a transmit buffer descriptor if used as a ?hardware event indicator.? 0 this frame was not deferred. 1 this frame did not have a collision before it was sent but it was sent late because of deferring. 7 to1 transmit software ownership. this read/write bit may be utilized by software, as necessary. its state does not affect the hardware nor is it affected by the hardware. 8 hfe/lc huge frame enable (written by user)/late collision (written by tsec) huge frame enable. written by user. valid only while it is set in first bd and the maccfg2[huge frame] is cleared. if maccfg2[huge frame] is set, this bit is ignored. 0 truncate transmit frame if its length is greater than the mac?s maximum frame length register. 1 do not truncate the transmit frame. late collision. written by tsec. 0 no late collision. 1 a collision occurred after 64 bytes are sent. the tsec terminates the transmission and updates lc. 9 rl retransmission limit. written by the fec. 0 transmission before maximum retry limit is hit. 1 the transmitter failed (maximum retry limit + 1 attempts to successfully send a message due to repeated collisions). the fec terminates the transmission and updates rl. 10?13 rc retry count. written by the fec. 0 the frame is sent correctly the first time. 1 more than zero attempts where needed to send the transmit frame. when this field is 15, 15 or more retries were needed. the ethernet controller updates rc after sending the buffer. 14 un underrun. written by the fec. 0 no underrun encountered (data was retrieved from external memory in time to send a complete frame). 1 the ethernet controller encountered a transmitter underrun condition while sending the associated buffer. the fec terminates the transmission and updates un. 15 ? reserved 16?31 ostbdlen out-of-sequence txbd data length. written by user. data length is the number of octets the fec transmits from this bd?s data buffer. it is never modified by the fec. table 21-20. ostbd field descriptions (continued) bits name description
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-31 21.5.3.3.8 out-of-sequence tx data buffer pointer register (ostbdp) the out-of-sequence tx data buffer pointer register (ostbdp), shown in figure 21-22 , is written by the user and contains the data buffer pointer fields in the same format as a regular txbd and, together with ostbd, provides the complete 8-byte descriptor. this area must be cleared while not in use. table 21-21 describes the field of the ostbdp register. 21.5.3.4 fec receive control and status registers this section describes the control and status registers that are used specifically for receiving ethernet frames. all of the registers are 32 bits wide. 21.5.3.4.1 receive control register (rctrl) the rctrl, shown in figure 21-23 , controls the operational mode of the receive block. it must be written only after a system reset (at initialization) or if dmactrl[grs] is zero. 0 15 r ostbdp w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_62b4 figure 21-22. ostbdp register definition table 21-21. ostbdp field descriptions bita name description 0?31 ostdbp out-of-sequence tx data buffer pointer. written by user. the tx data buffer pointer contains the address of the associated data buffer. there are no alignment requirements for this address. 01516 262728293031 r000000000000000 0 0 00 0 0 0 00 0 0 0 bc_rej prom rsf 00 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6300 figure 21-23. rctrl register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-32 freescale semiconductor 10/100 fast ethernet controller table 21-22 describes the fields of the rctrl register. 21.5.3.4.2 receive status register (rstat) the fec writes to this register under the following conditions:  the receiver runs out of descriptors.  the receiver was halted because an error condition was encountered while receiving a frame. software must clear the qhlt bit to take the fec?s receiver function out of a halt state. figure 21-24 describes the definition for the rstat register. table 21-22. rctrl field descriptions bits name description 0?26 ? reserved 27 bc_rej broadcast frame reject. if this bit is set, frames with da (destination address) = 0xffff_ffff_ffff are rejected unless rctrl[prom] is set. if both bc_rej and prom are set, then frames with broadcast da are accepted and the m (miss) bit is set in the receive bd. 0 broadcast frame reject is disabled. 1 broadcast frame reject is enabled. 28 prom promiscuous mode. when set, all frames except pause frames are accepted. 0 promiscuous mode is disabled. 1 promiscuous mode is enabled. 29 rsf receive short frame mode. when set, enables the reception of frames shorter than minflr bytes. note that in order for short frames to be received when rsf is set, a da hit must occur. when rsf is cleared, all frames shorter than minflr are automatically rejected. 0 receive short frame mode is disabled. 1 receive short frame mode is enabled. 30?31 ? reserved 0789 31 r0 0000000 qhlt 0 0 0 00000000000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6304 figure 21-24. rstat register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-33 table 21-23 describes the fields of the rstat register. 21.5.3.4.3 rxbd data length register (rbdlen) rbdlen is a dma register that contains the number of bytes remaining in the current receiver buffer. figure 21-25 describes the definition for the rbdlen register. table 21-24 describes the fields of the rbdlen register. 21.5.3.4.4 current receive buffer descriptor pointer register (crbptr) crbptr, shown in figure 21-26 , contains the address of the receive buffer descriptor either currently being processed, or processed most recently. table 21-23. rstat field descriptions bits name description 0?7 ? reserved 8 qhlt rxbd queue is halted. when ievent[bsy] or ievent[eberr] is set during reception of a packet, rstat[qhlt] is also set. in order to begin receiving packets again, the user must clear rstat[qhlt]. this bit is set whenever the fec reads an rxbd with its empty field cleared or encounters a system bus error while processing an rx packet. it is a hardware-initiated stop indication (dma_ctrl[grs] being set by the user does not cause this bit to be set). the current frame and all other frames directed to the halted queue are discarded. a write with a value of 1 re-enables the queue for receiving. 0 rxbd queue is enabled for ethernet reception. (that is, it is not halted.) 1 all ethernet controller receive activity to rxbd queue is halted. 9?31 ? reserved 0151631 r0000000000000000 rbdlen w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_630c figure 21-25. rbdlen register definition table 21-24. rbdlen field descriptions bits name description 0?15 ? reserved 16?31 rbdlen the rbdlen is internally written by the dma module. if rbdlen is cleared, all activity in the receive channel stops.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-34 freescale semiconductor 10/100 fast ethernet controller table 21-25 describes the fields of the crbptr register. \ 21.5.3.4.5 maximum receive buffer length register (mrblr) the mrblr, shown in figure 21-27 , is written by the user. it informs the fec how much space is in the receive buffer pointed to by the rxbd. table 21-26 describes the fields of the mrblr register. \ 0 28 29 31 r crbptr 0 0 0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6324 figure 21-26. crbptr register definition table 21-25. crbptr field descriptions bits name description 0?28 crbptr the crbptr register is internally written by the dma module. the value increments by eight (bytes) each time a descriptor is read from memory. 29?31 ? reserved 01516252631 r0000000000000000 mrbl 000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6340 figure 21-27. mrblr register definition table 21-26. mrblr field descriptions bits name description 0?15 ? to ensure that mrbl is a multiple of 64 these bits are reserved and must be cleared. 16?25 mrbl maximum receive buffer length. the number of bytes that the fec receiver writes to the receive buffer. the mrbl register is written by the user with a multiple of 64 for all modes. the fec can write fewer bytes to the buffer than the value set in mrbl if a condition such as an error or end-of-frame condition occurs, but it never exceeds the mrbl value; therefore, user-supplied buffers must be at least as large as the mrbl. note that transmit buffers can have varying lengths by programming txbd[data length], as needed, and are unaffected by the mrblr value. mrblr is not intended to be changed dynamically while fec is operating. change mrblr only when the fec receive function is disabled. 26?31 ? to ensure that mrbl is a multiple of 64 these bits are reserved and must be cleared.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-35 21.5.3.4.6 receive buffer descriptor pointer register (rbptr) rbptr, shown in figure 21-28 , contains the receive buffer descriptor address. it takes on the value of rbase when the rbase register is written by software. table 21-27 describes the fields of the rbptr register. \ 21.5.3.4.7 receive descriptor base address register (rbase) rbase, shown in figure 21-29 , is written by the user with the rxbd base address and must be divisible eight for the 8-byte buffer descriptors. table 21-28 describes the fields of the rbase register. \ 0 28 29 31 r rbptr 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6384 figure 21-28. receive buffer descriptor pointer definition table 21-27. rbptr field descriptions bits name description 0?28 rbptr the rbptr register is internally written by the dma module. the value increments by eight (bytes) each time a descriptor is read from memory. 29?31 ? reserved 0 28 29 31 r rbase 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6404 figure 21-29. rbase register definition table 21-28. rbase field descriptions bits name description 0?28 rbase receive base. rbase defines the starting location in the memory map for the fec rxbd. this field must be 8-byte aligned. 29?31 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-36 freescale semiconductor 10/100 fast ethernet controller 21.5.3.5 mac functionality this section describes the mac registers and provides a brief overview of some of the functionality that can be exercised through the use of these registers, particularly those that provide functionality not explicitly required by the ieee 802.3 standard. all of the mac registers are 32 bits wide. 21.5.3.5.1 configuring the mac mac configuration registers 1 and 2 provide a way to configure the mac as follows:  adjusting the preamble length ? the length of the preamble can be adjusted from the nominal seven bytes to some other(non-zero) value.  varying pad/crc combinations ? two different pad/crc combinations are provided to handle a variety of system requirements. the most simple are frames that already have a valid fcs field. in this case, the crc is checked and reported via the transmit statistics vector (tsv[51:0]). these options include appending a valid crc, or padding and then appending a valid crc, resulting in a minimum frame of 64 octets. in addition to the programmable register set, the pad/crc behavior can be dynamically adjusted on a per-packet basis. 21.5.3.5.2 controlling csma/cd the half-duplex register (hafdup) controls the carrier-sense multiple access/collision detection (csma/cd) logic. after a packet is sent, the device begins timing the inter-packet gap (ipg) as programmed in the back-to-back ipg configuration register. the system is then free to begin another frame transfer. in full-duplex mode, the carrier sense (fec_crs) and collision (fec_col) indications from the phy are ignored, but in half-duplex mode, the fec defers to fec_crs and, following a carrier event, times the ipg using the non?back-to-back ipg configuration values that include support for the optional two-thirds, one-third fec_crs deferral process. this optional ipg mechanism enhances system robustness and ensures fair access to the medium. during the first two-thirds of the ipg, the ipg timer is cleared if fec_crs is sensed. during the final one-third of the ipg, fec_crs is ignored and the transmission begins when ipg is timed. the two-thirds/one-third ratio is recommended. 21.5.3.5.3 handling packet collisions when transmitting a packet in half-duplex mode, the fec is sensitive to fec_col. if a collision occurs, it aborts the packet and outputs the 32-bit jam sequence. the jam sequence is made up of several bits of the crc, inverted to guarantee an invalid crc upon reception. a signal is sent to the system indicating a collision occurred and the start of the frame is needed for retransmission. the fec then backs-off of the medium for a time determined by the truncated binary exponential
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-37 back-off (beb) algorithm. following this back-off time, the packet is retried. the back-off time can be skipped if configured via the half-duplex register. however, this is non-standard behavior and its use must be carefully applied. should any one packet experience excessive collisions, the packet is aborted. the system flushes the frame and move to the next one in line. if the system requests to send a packet while the fec is deferring to a carrier, the fec simply waits until the end of the carrier event and the timing of ipg before it honors the request. when packet transmission attempts experience collisions, the fec outputs the jam sequence and waits some amount of time before retrying the packet. this amount of time is determined by a controlled randomization process called truncated binary exponential back-off. the amount of time is an integer number of slot times. the number of slot times to delay before the n th retransmission attempt is chosen as a uniformly distributed random integer r in the range: 0 r 2 k , where k = min( n ,10). so, after the first collision, fec backs-off either 0 or 1 slot times. after the fifth collision, the fec backs-off between 0 and 32 slot times. after the tenth collision, the maximum number of slot times to back-off is 1024. this can be adjusted via the half-duplex register. an alternate truncation point, such as 7 for instance, can be programmed. on average, the mac is be more aggressive after 7 collisions than other stations on the network. 21.5.3.5.4 controlling packet flow packet flow can be dealt with in a number of ways with the fec. a default retransmit attempt limit of 15 can be reduced using the half-duplex register. the slot time or collision window can be used to gate the retry window and possibly reduce the amount of transmit buffering within the system. the slot time for 10/100 mbps is 512 bit times. since the slot time begins at the beginning of the packet, the end occurs around the 56th byte of the frame data. full-duplex flow control is provided for in ieee 802.3x. currently the standard does not address flow control in half-duplex environments. common in the industry, however, is the concept of back pressure. the fec implements the optional back pressure mechanism using the raise carrier method. when the system receive logic wants to stop the reception of packets in a network-friendly way, transmit half-duplex flow control (thdf) is asserted (tctrl[thdf]). if the medium is idle, the fec raises carrier by transmitting preamble. other stations on the half-duplex network then defer to the carrier. in the event the preamble transmission happens to cause a collision, the fec ensures the minimum 96-bit presence on the wire, then drops preamble and waits a back-off time depending on the value of the configuration bit back pressure no back-off (half-duplex) [bpnb]. these transmitting-preamble-for-back pressure collisions are not counted. when bpbn is asserted, the fec waits an inter-packet gap before resuming the transmission of preamble following the collision and does not defer. if deasserted, the fec adheres to the truncated beb algorithm that allows packets to be received. this also can be detrimental in that packets can now experience excessive collisions causing them to be dropped in the stations from which they originate. to
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-38 freescale semiconductor 10/100 fast ethernet controller reduce the likelihood of lost packets and packets leaking through the back pressure mechanism, bpnb must be set. the fec drops carrier (ceases transmitting preamble) periodically to avoid excessive defer conditions in other stations on the shared network. if while applying back pressure, the fec is requested to send a packet, it stops sending preamble, and waits one ipg before sending the packet. bpnb applies for any collision that occurs during the sending of this packet. collisions for packets while thbp is asserted are counted. the fec does not defer while attempting to send packets while in back pressure. again, back pressure is nonstandard, but can reduce the flow of receive packets. 21.5.3.6 mac registers this section contains descriptions of the mac registers. 21.5.3.6.1 mac configuration register 1 (maccfg1) the maccfg1, shown in figure 21-30 , is written by the user. table 21-29 describes the fields of the maccfg1 register. \ 012 1112131415 r soft_reset 0 00000 0 00 0 0 reset_ rx_mc reset_ tx_mc reset_ rx_fun reset_ tx_fun w reset 0000_0000_0000_0000 16 22 23 24 25 26 27 28 29 30 31 r 0 0 00000 loop_ back 00 rx_flow tx_flow sync?d_ rx_en rx_en sync?d_ tx_en tx_en w reset 0000_0000_0000_0000 offset 0x2_6500 figure 21-30. maccfg1 register definition table 21-29. maccfg1 field descriptions bits name description 0 soft_reset 0 default 1 setting this bit puts all modules within the mac in reset. 1?11 ? reserved 12 reset_rx_mc 0 default 1 setting this bit puts the receive mac control block in reset. this block detects control frames and contains the pause timers.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-39 13 reset_tx_mc 0 default 1 setting this bit puts the petmc transmit mac control block in reset. this block multiplexes data and control frame transfers. it also responds to xoff pause control frames. 14 reset_rx_fun 0 default 1 setting this bit puts the receive function block in reset. this block performs the receive frame protocol. 15 reset_tx_fun 0 default 1 setting this bit puts the transmit function block in reset. this block performs the frame transmission protocol. 16?22 ? reserved 23 loop_back 0 default. 1 causes the mac transmit outputs to be looped back to the mac receive inputs. 24?25 ? reserved 26 rx_flow 0 default. the receive mac control ignores pause flow control frames. 1 the receive mac control can detect and act on pause flow control frames. 27 tx_flow 0 default. the transmit mac control cannot send flow control frames. 1 the transmit mac control can send pause flow control frames when requested by the system. 28 sync?d_rx_en receive enable synchronized to the receive stream. (read only) 0 frame reception is not enabled. 1 frame reception is enabled. 29 rx_en receive enable. this bit is cleared by default. if set, prior to clearing this bit, set dmactrl[grs] then confirm subsequent occurrence of the graceful receive stop interrupt (ievent[grsc] is set). 0 default. the mac cannot receive frames from the phy. 1 the mac can receive frames from the phy. 30 sync?d_tx_en transmit enable synchronized to the transmit stream. (read only) 0 frame transmission is not enabled. 1 frame transmission is enabled. 31 tx_en transmit enable. this bit is cleared by default. if set, prior to clearing this bit, set dmactrl[gts] then confirm subsequent occurrence of the graceful transmit stop interrupt (ievent[gtsc] is set). 0 default. clearing this bit prevents the transmission of frames. 1 setting this bit allows the mac to transmit frames from the system. table 21-29. maccfg1 field descriptions (continued) bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-40 freescale semiconductor 10/100 fast ethernet controller 21.5.3.6.2 mac configuration register 2 (maccfg2) the maccfg2, shown in figure 21-31 , is written by the user. table 21-30 describes the fields of the maccfg2 register. 0 15 r0 0 0 0 00 0 0 00 0 0 0 0 0 0 w reset 0000_0000_0000_0000 16 19 20 21 22 23 24 25 26 27 28 29 30 31 r preamble_length 00 i/f_mode 00 huge frame length_check 0 pad/crc crc en full_duplex w reset 0111_0000_0000_0000 offset 0x2_6504 figure 21-31. maccfg2 register definition table 21-30. maccfg2 field descriptions bits name description 0?15 ? reserved 16?19 preamble_length this field determines the length in bytes of the preamble field of the packet. its default is 0x7. a preamble length of 0 is not supported. 20?21 ? reserved 22?23 i/f_mode determines the type of interface the mac is connected to. 00 reserved 01 nibble mode (mii) 10 reserved 11 reserved 24?25 ? reserved 26 huge frame 0 default. the mac limits the length of frames at the maximum frame length value. 1 frames longer than the maximum frame length can be transmitted and received. 27 length_check 0 default. clear this bit if no length field checking is desired. 1 the mac checks the frame?s length field to ensure it matches the actual data field length. 28 ? reserved 29 pad/crc 0 default. transmitted short frames are not padded. 1 the mac pads all transmitted short frames and appends a crc to every frame whether or not padding was required. 30 crc en crc enable 0 default. clear if frames presented to the mac have a valid length and contain a valid crc. 1 causes the mac to append a crc on all frames. if the configuration bit pad/crc or the per-packet pad/crc is set, crc en is ignored. 31 full_duplex 0 default. clearing this bit configures the mac to operate in half-duplex mode only. 1 configures the mac to operate in full-duplex mode.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-41 21.5.3.6.3 inter-packet gap/inter-frame gap register (ipgifg) the ipgifg, shown in figure 21-32 , is written by the user. table 21-31 describes the fields of the ipgifg register. 21.5.3.6.4 half-duplex register (hafdup) the hafdup register, shown in figure 21-33 , is written by the user. 0 1 7 8 9 15 16 23 24 25 31 r0 non back-to-back inter-packet-gap, part 1 0 non back-to-back inter-packet-gap, part 2 minimum ifg enforcement 0 back-to-back inter-packet-gap w reset 0100_0000_0110_0000_0101_0000_0110_0000 offset 0x2_6508 figure 21-32. ipgifg register definition table 21-31. ipgifg field descriptions bits name description 0?reserved 1?7 non back-to-back inter-packet-gap, part 1 optional carrier sense window referenced in ieee 802.3/4.2.3.2.1 carrier deference. if carrier is detected during the timing of ipgr1, the mac defers to carrier. but if carrier becomes active after ipgr1, the mac continues timing ipgr2 and transmits, knowingly causing a collision and ensuring fair access to medium. its range of values is 0x00 to ipgr2. the default, 0x40, follows the two-thirds/one-thirds guideline. 8?reserved 9?15 non back-to-back inter-packet-gap, part 2 this is a programmable field representing the non-back-to-back inter-packet-gap in bits. the default, 0x60, represents the minimum ipg of 96 bits. 16?23 minimum ifg enforcement minimum number of bits of ifg to enforce between frames. a frame whose ifg is less than that programmed is dropped. the default setting of 0x50 (80d) represents half of the nominal minimum ifg, which is 160 bits. 24 ? reserved 25?31 back-to-back inter-packet-gap ipg between back-to-back packets. this ipg parameter is used exclusively in full-duplex mode and in half-duplex mode when two transmit packets are sent back-to-back. set this field to the number of bits of ipg desired. the default (minimum) of 0x60 (96d) represents the ipg of 96 bits. 0 78 111213141516 1920 2526 31 r 0 0 0 0 0 0 0 0 alternate beb truncation alt beb bp no backoff no backoff excess defer retransmission maximum 000000 collision window w reset 0000_0000_1010_0000_ 1111_0000_0011_0111 offset 0x2_650c figure 21-33. half-duplex register definition
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-42 freescale semiconductor 10/100 fast ethernet controller table 21-32 describes the fields of the hafdup register. 21.5.3.6.5 maximum frame length register (maxfrm) the maxfrm register is written by the user. figure 21-34 describes the maxfrm register. table 21-32. hafdup field descriptions bits name description 0?7 ? reserved 8?11 alternate beb truncation used when alternate binary exponential back-off enable is set. the value programmed is substituted for the ethernet standard value of ten. 12 alt beb setting this bit configures the tx mac to use the alternate binary exponential back-off truncation setting instead of the 802.3 standard tenth collision. the standard specifies that any collision after the tenth uses 2 10 ? 1 as the maximum back-off time. clearing this bit causes the tx mac to follow the standard binary exponential back-off rule. 13 bp no backoff setting this bit configures the tx mac to immediately retransmit, following a collision, during back pressure operation. clearing this bit causes the tx mac to follow the binary exponential back-off rule. 14 no backoff setting this bit configures the tx mac to immediately retransmit following a collision. clearing this bit causes the tx mac to follow the binary exponential back-off rule. 15 excess defer setting this bit configures the tx mac to allow the transmission of a packet that was excessively deferred. clearing this bit causes the tx mac to abort the transmission of a packet that was excessively deferred. 16?19 retransmission maximum specifies the number of retransmission attempts following a collision before aborting the packet due to excessive collisions. the standard specifies the attempt limit to be 0xf (15d), which is the default. 20?25 ? reserved 26?31 collision window the slot time or collision window during which collisions occur in properly configured networks. because the window starts at the start of transmission, the preamble and sfd are included. its default of 0x37 (55d) corresponds to the count of frame bytes at the end of the window. 0151631 r0000000000000000 maximum frame w reset 0000_0000_0000_0000_0000_0110_0000_0000 offset 0x2_6510 figure 21-34. maximum frame length register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-43 table 21-33 describes the fields of the maxfrm register. 21.5.3.6.6 interface status register (ifstat) figure 21-35 shows the ifstat register. table 21-34 describes the fields of the ifstat register. 21.5.3.6.7 station address register part 1 (macstnaddr1) the macstnaddr1 register is written by the user. figure 21-36 describes the macstnaddr1 register. the value of the station address written by the user into macstnaddr1 and macstnaddr2 is byte-reversed from how it would appear in the da field of a frame in memory. for example, for a station address of 0x12345678abcd, perform a write to macstnaddr1 of 0xcdab7856, and to macstnaddr2 of 0x34120000. when the table 21-33. maxfrm descriptions bit name description 0?15 ? reserved 16?31 maximum frame sets the maximum frame size in both the transmit and receive directions. (refer to maccfg2[huge frame].) 0 21 22 23 27 28 29 31 r 000000000000000000000 0excess defer0 000 0 link fail 000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_653c figure 21-35. interface status register definition table 21-34. ifstat field descriptions bit name description 0?21 ? reserved 22 excess defer excessive transmission defer. this bit latches high and is cleared when read. this bit is cleared by default. 0 normal operation 1 the mac excessively defers a transmission. 23?27 ? reserved 28 link fail link fail. this bit indicates the status of signal detection. 0 the100x module has detected a ?signal detect? for longer than 330 ms. 1 the100x module has detected a ?signal detect? for less than 330 ms or not at all. 29?31 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-44 freescale semiconductor 10/100 fast ethernet controller user reads macstnaddr1, 0xcdab7856 is returned. a read of macstnaddr2 returns a value of 0x34120000. note that the i/g and u/l bits of the frame?s da field are located at the lsbs of the 1st octet stored in macstnaddr2, where the i/g bit is bit 15, and the u/l bit is bit 14. table 21-35 describes the fields of the macstnaddr1 register. 21.5.3.6.8 station address register part 2 (macstnaddr2) the macstnaddr2 register is written by the user. figure 21-37 describes the macstnaddr2 register. note that the i/g and u/l bits of the frame?s da field are located at the lsbs of the 1st octet stored in macstnaddr2, where the i/g bit is bit 15, and the u/l bit is bit 14. 0781516232431 r station address, 6th octet station address, 5th octet station address, 4th octet station address, 3rd octet w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6540 figure 21-36. station address part 1 register definition table 21-35. macstnaddr1 field descriptions bit name description 0?7 station address, 6th octet this field holds the sixth octet of the station address. the sixth octet (station address bits 40?47) defaults to a value of 0x00. 8?15 station address, 5th octet this field holds the fifth octet of the station address. the fifth octet (station address bits 32?39) defaults to a value of 0x00. 16?23 station address, 4th octet this field holds the fourth octet of the station address. the fourth octet (station address bits 24?31) defaults to a value of 0x00. 24?31 station address, 3rd octet this field holds the third octet of the station address. the third octet (station address bits 16?23) defaults to a value of 0x00. 0781516 31 r station address, 2nd octet station address, 1st octet 0000000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6544 figure 21-37. station address part 2 register definition
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-45 table 21-36 describes the fields of the macstnaddr2 register. 21.5.3.7 hash function registers this section provides detailed descriptions of the registers used for hash functions. all of the registers are 32 bits wide. when the da field of a receive frame is processed through a 32-bit crc generator, the 8-bit msb of the crc remainder is mapped to a hash table entry. the user can enable a hash entry by setting the appropriate bit. a hash entry usually represents a set of addresses. a hash table hit occurs when the da crc result points to an enabled hash entry. the user must further filter the address. see section 21.6.2.5.2, ?hash table algorithm,? for more information on the hash algorithm. 21.5.3.7.1 individual address registers 0?7 (iaddr n ) the iaddr n registers, shown in figure 21-38 , represent 256 entries of the individual (unicast) address hash table used in the address recognition process. when the da field of a receive frame is processed through a 32-bit crc generator, the 8 high-order bits (0?7) of the crc remainder are mapped to one of the 256 entries. the user can enable a hash entry by setting the appropriate bit. a hash table hit occurs when the da crc result points to an enabled hash entry. table 21-37 describes the field of the iaddr n registers. table 21-36. macstnaddr2 field descriptions bit name description 0?7 station address, 2nd octet this field holds the second octet of the station address. the second octet (station address bits 8?15) defaults to a value of 0x00. 8?15 station address, 1st octet this field holds the first octet of the station address. the first octet (station address bits 0?7) defaults to a value of 0x00. 16?3 1 ?reserved 0 31 r iaddr n w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6800, 0x2_6804, 0x2_6808, 0x2_680c, 0x2_6810, 0x2_6814, 0x2_6818, 0x2_681c figure 21-38. iaddr n register definition table 21-37. iaddr n field description bits name description 0?31 iaddr n represents the 32-bit value associated with the corresponding register. iaddr0 contains the high-order 32 bits of the 256-entry hash table and iaddr7 represents the low-order 32 bits. for instance, the msb of iaddr0 correlates to entry 0 and the lsb of iaddr7 correlates to entry 255.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-46 freescale semiconductor 10/100 fast ethernet controller 21.5.3.7.2 group address registers 0?7 (gaddr n ) the gaddr n registers, shown in figure 21-39 , represent 256 entries of the group (multicast) address hash table used in the address recognition process. when the da field of a receive frame is processed through a 32-bit crc generator, the 8-bit msb of the crc remainder is mapped to one of the 256 entries. the user can enable a hash entry by setting the appropriate bit. a hash table hit occurs when the da crc result points to an enabled hash entry. table 21-38 describes the field of the gaddr n registers. 21.5.3.8 attribute registers this section describes the two fec frame attribute registers. 21.5.3.8.1 attribute register (attr) the attr, shown in figure 21-40 , defines attributes and transaction types used to access buffer descriptors and to write receive data and to read transmit data. snoop enable attributes may be set for reading buffer descriptors and for reading transmit data. buffer descriptors may be written with attributes that cause allocation into the l2 cache with or without line locking. similarly, sections of a receive frame header may have attributes attached that cause allocation and locking in the l2 cache. this process of specifying a region of each frame to stash into the l2 cache is referred to as extraction. extraction is specified in conjunction with attreli. attr[elcwt] only has meaning if the attreli[el] field is non-zero. 0 15 r gaddr n w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6880, 0x2_6884, 0x2_6888, 0x2_688c, 0x2_6890, 0x2_6894, 0x2_6898, 0x2_689c figure 21-39. gaddr n register definition table 21-38. gaddr n field description bits name description 0?31 gaddr n represents the 32-bit value associated with the corresponding register. gaddr0 contains the high-order 32 bits of the 256-entry group hash table and gaddr7 represents the low-order 32 bits. for instance, the msb of gaddr0 correlates to entry 0 and the lsb of gaddr7 correlates to entry 255.
memory map/register definition MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-47 table 21-39 describes the fields of the attr register. 21.5.3.8.2 attribute extract length and extract index register (attreli) the attreli registers are written by the user to specify the extract index and extract length. figure 21-41 describes the definition for attreli. 0 151617 181920 212223 24 25 26 31 r 0000_0000_0000_0000 0 elcwt 0 bdlwt 00 rdsen rbdsen 000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6bf8 figure 21-40. attr register definition table 21-39. attr field descriptions bits name description 0?16 ? reserved 17?18 elcwt extracted l2 cache write type. specifies the write transaction type to perform for the extracted data. this occurs only if attreli[el] is non-zero. for maximum performance, it is recommended that if elcwt is set to allocate, bdlwt also be set to allocate. writes to cache are always performed with snoop. this setting overrides the rdsen bit setting. 00 no allocation performed. 01 reserved, no extraction occurs. 10 allocate l2 cache line. 11 allocate and lock l2 cache line. 19 ? reserved 20?21 bdlwt buffer descriptor l2 cache write type. specifies the write transaction type to perform for the buffer descriptor for a receive frame. writes to cache are always performed with snoop. 00 no allocation performed. this setting overrides the rbdsen bit setting. 01 reserved 10 allocate l2 cache line. 11 allocate and lock l2 cache line. 22?23 ? reserved 24 rdsen rx data snoop enable. this bit is superseded by the elcwt settings. 0 disables snooping of all receive frames data to memory unless elcwt specifies l2 allocation. 1 enables snooping of all receive frames data to memory. 25 rbdsen rxbd snoop enable. this bit is superceded by the bdlwt settings. 0 disables snooping of all receive bd memory accesses unless bdlwt specifies l2 allocation. 1 enables snooping of all receive bd memory accesses. 26?31 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-48 freescale semiconductor 10/100 fast ethernet controller table 21-40 describes the fields of the attreli register. 21.6 functional description this section describes many of the functions of the 10/100 fast ethernet controller (fec). 21.6.1 connecting to the physical interface this section describes how to connect the fec to the mii interface. the bus follows the bus conventions used in the ieee 802.3 specification because the phy follows the same conventions (that is, in the bus txd[3:0], bit 3 is the msb and bit 0 the lsb). 21.6.1.1 media-independent interface (mii) this section describes the media independent interface (mii) intended to be used between the phys and the fec. figure 21-42 depicts the basic components of the mii including the signals required to establish the fec module connection with a phy. 0 1 2 15 16 17 18 31 r00 el 00 ei w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6bfc figure 21-41. attreli register definition table 21-40. attreli field descriptions bits name description 0?1 ? reserved 2?15 el extracted length. specifies the number of bytes to extract from the receive frame. the dma controller uses this field to perform extraction. if set to zero, no extraction is performed. 16?17 ? reserved 18?31 ei extracted index. points to the first byte within the receive frame from which to begin extracting data.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-49 figure 21-42. fec?mii connection an mii interface has 16 signals, as defined by the ieee 802.3u standard, for connecting to an ethernet phy. table 21-41 lists the mii interface signals. 21.6.2 fec channel operation this section describes the operation of the fec. first the software initialization sequence is described. next, the software (ethernet driver) interface for transmitting and receiving frames is described. address recognition and hash table algorithm features are also discussed. the section concludes with interrupt handling, inter-packet gap time, and loop-back descriptions. table 21-41. mii interface signals frequency [mhz] 25 voltage [v] 3.3 signals i/o no. of signals signals i/o no. of signals fec_tx_clk i 1 fec_rxd[0] i 1 fec_txd[0] o 1 fec_rxd[1] i 1 fec_txd[1] o 1 fec_rxd[2] i 1 fec_txd[2] o 1 fec_rxd[3] i 1 fec_txd[3] o 1 fec_rx_dv i 1 fec_tx_en o 1 fec_rx_er i 1 fec_tx_er o 1 fec_col i 1 fec_rx_clk i 1 fec_crs i 1 transmit error (fec_tx_er) transmit data (fec_txd[3:0]) transmit enable (fec_tx_en) transmit clock (fec_tx_clk) collision detect (fec_col) receive data (rxd[3:0]) receive error (fec_rx_er) receive clock (fec_rx_clk) receive data valid (fec_rx_dv) carrier sense output (fec_crs) 10/100 medium 10/100 controller controller phy
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-50 freescale semiconductor 10/100 fast ethernet controller 21.6.2.1 initialization sequence this section describes which registers are reset due to a hard or software reset and what registers the user must initialize before the fec is enabled. 21.6.2.1.1 hardware controlled initialization a hard reset occurs when the system powers up. all of the fec?s registers and control logic are reset to their default states after a hard reset has occurred. 21.6.2.1.2 user initialization after the system has undergone a hard reset, software must initialize certain basic fec registers. other registers can also be initialized during this time, but they are optional and must be determined based on the requirements of the system. see table 21-2 for the register list. table 21-42 describes the minimum steps for register initialization. after the registers are initialized, the user must execute the following steps in the order described below to bring the fec into a functional state (out of reset): 1. for the transmission of ethernet frames, txbds have to be first built in memory, linked together as a ring, and pointed to by the tbase register. at least two buffer descriptors per ring are required. setting the ring size to one causes the same frame to be sent twice. 2. likewise, for the reception of ethernet frames, the receive queue must be ready, with its rxbd pointed to by the rbase register. both transmit and receive can be gracefully stopped after transmission and reception begins. 3. write to the maccfg1 register and set the appropriate bits. these must include rx_en = 1, and tx_en = 1. to enable flow control, rx_flow and tx_flow must also be set. table 21-42. steps of minimum register initialization description 1. set, then clear maccfg1 [soft_reset] 2. initialize maccfg2 3. initialize mac station address 4. set up the phy using the mii mgmt interface 5. clear ievent 6. initialize imask 7. initialize iaddr n 8. initialize gaddr n 9. initialize rctrl 10. initialize dmactrl
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-51 4. clearing dmactrl[gts] triggers the transmission of frame data if the transmitter had been previously stopped. dmactrl[grs] must be cleared if the receiver was previously stopped. see section 21.5.3.1.6, ?dma control register (dmactrl),? and section 21.6.3.1, ?transmit data buffer descriptor (txbd).? 21.6.2.2 soft reset and reconfiguring procedure before issuing a soft-reset to and/or reconfiguring the mac with new parameters, the user must properly shutdown the dma and make sure it is in an idle state for the entire duration. the user must gracefully stop the dma by setting both grs and gts bits in the dmactrl register, then wait for both grsc and gtsc bits to be set in the ievent register before resetting the mac or changing parameters. both grs and gts bits must be cleared before re-enabling the mac to resume the dma. during the mac configuration, if a new set of tx buffer descriptors are used, the user must load the pointers into the tbase register. likewise if a new set of rx buffer descriptors are used, the rbase register must be written with the new pointer. following is a procedure to gracefully reset and reconfigure the mac: 1. set gts bit in dmactrl register. 2. poll gtsc bit in ievent register until detected as set. 3. clear both rx_en and tx_en bits in maccfg1. 4. wait for a period of 9.6 kbytes worth of data on the interface (~8ms worst case). 5. set grs bit in dmactrl register. 6. poll grsc bit in ievent register until detected as set. 7. set soft_reset bit in maccfg1 register. 8. clear soft_reset bit in maccfg1 register. 9. load tbase with new txbd pointer. 10. load rbase with new rxbd pointer. 11. set up other mac registers (maccfg2, maxfrm, and so on). 12. set wwr and wop bits in dmactrl register. 13. clear thlt bit in tstat register and qhlt bit in rstat register by writing 1 to these bits. 14. clear grs/gts bits in dmactrl. (do not change other bits.) 15. enable tx_en/rx_en in maccfg1 register.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-52 freescale semiconductor 10/100 fast ethernet controller 21.6.2.3 fec frame transmission the ethernet transmitter requires almost no core intervention. after the software driver initializes the system, the fec begins to poll the first txbd in the txbd ring every 512 transmit clocks. if txbd[r] is set, the fec begins moving transmit buffer from memory to its tx fifo. the transmitter takes data from the tx fifo and transmits data to the mac. the mac transmits the data through the mii interface to the physical media. the transmitter, once initialized, runs until the end-of-frame (eof) condition is detected unless a collision within the collision window occurs (half-duplex mode) or an abort condition is encountered. if the user has a frame ready to transmit, a transmit-on-demand function may be emulated while in polling mode by using the graceful-transmit-stop feature. first, clear the imask[gtscen] bit to mask the graceful-transmit-stop complete interrupt. next set, then immediately clear the dmactrl[gts] bit. clear the resulting ievent[gtsc] bit. finally, the imask[gtscen] bit may be set once again. there is one internal buffer for out-of-sequence flow control frames. when the fec is between frames, this buffer is polled. the buffer must contain the whole frame. once the fec is in paused mode, the out-of-sequence buffer descriptor cannot be used to send another flow control frame because the mac treats it like a regular txbd. in half-duplex mode (maccfg2[full_duplex] = 0) the mac defers transmission if the line is busy (fec_crs asserted). before transmitting, the mac waits for carrier sense to become inactive, at which point it then determines if fec_crs remains negated for 60 clocks. if so, transmission begins after an additional 36 bit times (96 bit times after fec_crs originally became negated). if fec_crs continues to be asserted, the mac follows a specified back-off procedure and tries to retransmit the frame until the retry limit is reached. data stored in the tx fifo is retransmitted in case of a collision. this improves bus usage and latency. the transmitter also monitors for an abort condition and terminates the current frame if an abort condition is encountered. in full-duplex mode the protocol is independent of network activity, and only the transmit inter-frame gap needs to be enforced. the transmit block also implements full-duplex flow control. if a flow control frame is received, the mac does not service the transmitter?s request to send data until the pause duration is over. if the mac is currently sending data while a pause frame is received, the mac finishes sending the current frame, then suspends subsequent frames (except a pause frame) until the pause duration is over. the pause duration is defined by the received pause control frame and begins when the frame was first received. in addition, the transmitter supports transmission of flow control frames via tctrl[tfc_pause]. the transmit pause frame is generated internally based on the pause register that defines the pause value to be sent. note that it is possible to send a pause frame while the pause timer has not expired. the mac automatically appends fcs (32-bit crc) bytes to the frame if any of the following values are set:
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-53  txbd[pad/crc] is set in first txbd  txbd[tc] is set in first txbd  maccfg2[pad/crc] is set  maccfg2[crc en] is set after the fcs is sent, the ethernet controller writes the frame status bits into the bd and clears txbd[r]. when the end of the current buffer is reached and txbd[l] = 0 (a frame is comprised of multiple buffer descriptors), only txbd[r] is cleared. for both half- and full-duplex modes, an interrupt can be issued depending on txbd[i]. the ethernet controller then proceeds to the next txbd in the table. in this way, the core can be interrupted after each frame, after each buffer, or after a specific buffer is sent. if txbd[pad/crc] = 1, the ethernet controller pads any frame shorter than 64 bytes. to pause transmission, or rearrange the transmit queue, set dmactrl[gts]. this can be useful for transmitting expedited data ahead of previously linked buffers or for error situations. when this bit is set the fec transmitter performs a graceful transmit stop. the ethernet controller stops immediately if no transmission is in progress or continues transmission until the current frame either finishes or terminates with an error. the ievent[gtsc] interrupt occurs when the graceful transmit stop operation is completed. when dmactrl[gts] is cleared, the fec resumes transmission with the next frame. the fec sends bytes least-significant nibble first and each nibble is sent least-significant bit first. 21.6.2.4 fec frame reception the fec ethernet receiver is designed to work with almost no core intervention and can perform address recognition, crc checking, short frame checking, and maximum frame-length checking. the receiver can also force frame headers and buffer descriptors to be allocated into the l2 cache. see section 21.6.4, ?data extraction to the l2 cache? for additional information. after a hardware reset, the software driver clears the rstat register and sets maccfg1[rx_en]; the ethernet receiver is enabled and immediately starts processing receive frames. the mac checks for when fec_rx_dv is asserted and as long as fec_col remains negated (full-duplex mode ignores fec_col) the mac looks for the start of a frame by searching for a valid preamble/sfd (start of frame delimiter) header, which is stripped, and the frame begins to be processed. if a valid header is not found, the frame is ignored. if the receiver detects the first bytes of a frame, the fec begins to perform the frame recognition function through destination address (da) recognition. (see section 21.6.2.5, ?frame recognition? for additional information.) based on this match the frame can be accepted or rejected. once accepted, the fec processes the frame based on user-defined attributes. the receiver can also filter frames based on physical (individual), group (multicast), and broadcast addresses. because ethernet receive frame data is not written to memory until the internal frame
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-54 freescale semiconductor 10/100 fast ethernet controller recognition algorithm is complete, system bus usage is not wasted on frames not wanted by this station. if a frame is accepted, the ethernet controller fetches the receive buffer descriptor (rxbd) from the queue. if the rxbd is not being used by software (rxbd[e] is set), the fec begins transferring the incoming frame. rxbd[f] is set for the first rxbd used for any receive frame. if the buffer is filled, the fec clears rxbd[e] and generates an interrupt if rxbd[i] is set. if the incoming frame is larger than the buffer, the ethernet controller fetches the next rxbd in the table; if it is empty, it continues receiving the rest of the frame. in half-duplex mode, if a collision is detected during the frame, no rxbds are used. thus, no collision frames are presented to the user except late collisions, which indicate serious lan problems. the rxbd length is determined by the mrbl field in the maximum receive buffer length register (mrblr). the smallest valid value is 64 bytes. during reception, the ethernet controller checks for frames that are too short or too long. when the frame ends (fec_crs is negated), the receive crc field is checked and written to the data buffer. the data length written to the last rxbd in the ethernet frame is the length of the entire frame, which enables the software to recognize a frame-too-long condition. receive frames are not truncated if they exceed maximum frame bytes in the mac?s maximum frame register if maccfg2[huge frame] is set, however the babbling receiver error interrupt occurs (ievent[babr] is set) and rxbd[lg] is set. when the receive frame is complete, the ethernet controller sets rxbd[l], updates the frame status bits in the rxbd, and clears rxbd[e]. if rxbd[i] is set, the ethernet controller next generates a maskable interrupt, indicating that a frame was received and is in memory. the ethernet controller then waits for a new frame. to interrupt reception, or rearrange the receive queue, dmactrl[grs] must be set. when this bit is set the fec receiver does a graceful receive stop. the ethernet controller stops immediately if no frames are being received or continues receiving until the current frame either finishes or an error condition occurs. the ievent[grsc] interrupt event is signalled when the graceful receive stop operation is completed. while in this mode the user can then clear ievent[grsc] and can write to registers that are accessible to both user and the fec hardware without fear of conflict. when dmactrl[grs] is cleared, the fec scans the input data stream for the start of a new frame (preamble sequence and start of frame delimiter), it resumes receiving, and the first valid frame received is placed in the next available rxbd. 21.6.2.5 frame recognition the ethernet controller performs frame recognition using destination address (da) recognition. a frame can be rejected or accepted based on the outcome.
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-55 21.6.2.5.1 destination address recognition the ethernet controller can also perform the frame filtering using the traditional destination address (da) recognition methods. figure 21-43 depicts a flowchart for address recognition on received frames that is used to explain the concept. in the actual implementation most of the decision points shown in the figure actually occur simultaneously.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-56 freescale semiconductor 10/100 fast ethernet controller figure 21-43. ethernet address recognition flowchart i/g address station address match? i g broadcast address broadcast reject t f hash search (use group table) t hash match? t promiscuous? discard frame t f f f f t receive frame incoming frame hash search (use individual tab l e)
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-57 the ethernet controller compares the destination address field of the received frame with the physical address that the user programs in the station address registers (macstnaddr1 and macstnaddr2). if the da does not match the station address, then the fec performs address recognition on multiple individual addresses using the iaddr n hash table. the user must write zeros to the hash in order to avoid a hash match, and ones to station address in order to avoid individual address match, or the user can turn on promiscuous mode (see section 21.5.3.4.1, ?receive control register (rctrl).? ) in the group type of address recognition, the ethernet controller determines whether the group address is a broadcast address. if it is a broadcast, and broadcast addresses are enabled, the frame is accepted. if the group address is not a broadcast address, the user can perform address recognition on multiple group addresses using the gaddr n hash table. in promiscuous mode, the ethernet controller receives all of the incoming frames regardless of their address. 21.6.2.5.2 hash table algorithm the hash table process used in the individual and group hash filtering operates as follows. the ethernet controller maps any 48-bit destination address into one of 256 bins, represented by the 256 bits in gaddr0?7 or iaddr0?7. the eight high-order bits of a cyclic redundancy check (crc) checksum are used to index into the hash table. the high-order three bits of this 8-bit field are used to select one of the eight registers in either the individual or group hash table. the low-order five bits select a bit within the 32-bit register. a value of 0 in the high-order three bits selects iaddr0/gaddr0. the same process is used if the ethernet controller receives a frame. if the crc checksum selects a bit that is set in the group/individual hash table, the frame is accepted. if 32 group addresses are stored in the hash table and random group addresses are received, the hash table prevents roughly 224/256 (87.5%) of the group address frames from reaching memory. software must further filter those that reach memory to determine if they contain the correct addresses. better performance is achieved by using the group and individual hash tables in combination. for instance, if 32 group and 32 physical addresses are stored in their respective hash tables, because 87.5% of all group addresses and 87.5% of all individual address are rejected, then 87.5% of all frames are prevented from reaching memory. the effectiveness of the hash table declines as the number of addresses increases. for instance, as the number of addresses stored in the 256-bin hash table increases, the vast majority of the hash table bits are set, preventing only a small fraction of frames from reaching memory. 21.6.2.5.3 crc computation examples there are many algorithms for calculating the crc value of a number. refer to the rfc 3309 standard, which can be found at http://www.faqs.org/rfcs/rfc3309.html, to compute the crc value
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-58 freescale semiconductor 10/100 fast ethernet controller for the purposes of fec. the rfc 3309 algorithm uses the following polynomial to calculate the crc value: x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x1+x0 or 0x04c11db7. given a destination mac address of da=01000ccccccc, the algorithm results in a crc remainder value of 0xa29f4bbc. bit-reversing the low-order byte of the crc value (0xbc) yields br_crc = 0x3d = 0b00 111101 the high-order 3-bits of the new br_crc value are used to select which 32-bit register (of the 8) to use. this example maps the da to register 1. high-order 3 bits of br_crc: ho_crc = 0b001 = 1 the low-order 5 bits are used to select which bit to set in the given register (with a value of 0 setting 0x8000_0000 and 31 setting 0x0000_0001). therefore, the example da maps to bit 29 of register 1. low-order 5 bits of br_crc: lo_crc = 0b11101 = 29 therefore, gaddr1 is ored with the value 0x0000_0004. additional calculated examples follow: example 1:  destination mac address: da = 01005e000128  crc remainder value: crc = 0x821d6cd3  bit-reversed least-significant byte of crc value: br_crc = 0xcb = 0b11001011  high-order 3 bits of br_crc: ho_crc = 0b110 = 6  low-order 5 bits of br_crc: lo_crc = 0b01011 = 11  gaddr6 = 0x0010_0000 example 2:  destination mac address: da = 0004f0604f10  crc remainder value: crc = 0x1f5a66b5  bit-reversed least-significant byte of crc value: br_crc = 0xad = 0b10101101  high-order 3 bits of br_crc: ho_crc = 0b101 = 5  low-order 5 bits of br_crc: lo_crc = 0b01101 = 13  gaddr5 = 0x0004_0000
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-59 21.6.2.6 flow control because collisions cannot occur in full-duplex mode, the fec can operate at the maximum rate. when the rate becomes too fast for a station?s receiver, the station?s transmitter can send flow-control frames to reduce the rate. flow-control instructions are transferred by special frames of minimum frame size. the length/type fields of these frames have a special value. table 21-43 shows the flow control frame structure. when flow-control mode is enabled (maccfg1[rx_flow] is set) and the receiver identifies a pause-flow control frame, transmission stops for the time specified in the control frame. during this pause, only a control frame can be sent (tctrl[tfc_pause] is set). normal transmission resumes after the pause timer stops counting. if another pause-control frame is received during the pause, the period changes to the new value received. 21.6.2.7 interrupt handling the following describes what usually occurs within a fec interrupt handler:  when an interrupt occurs, read ievent to determine interrupt sources. ievent bits to be handled in this interrupt handler are normally cleared at this time. table 21-43. flow control frame structure size [octets ] description value comment 7 preamble 1 sfd start frame delimiter 6 destination address 01-80c2-00-00-01 multicast address reserved for use in mac frames 6 source address 2 length/type 88-08 control frame type 2 mac opcode 00-01 pause command 2 mac parameter pause period measured in slot times, most-significant octet first with a two time-slot resolution. note: because the pause period has a resolution of two time slots, the value programmed in this field is rounded up to the nearest even number before being used, as follows: mac parameter value 0 1 or 2 3 or 4 ? pause period none 2 slot time 4 slot time ? 42 reserved ? 4 fcs frame check sequence (crc)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-60 freescale semiconductor 10/100 fast ethernet controller  process the txbds to reuse them if the ievent[txb] or ievent[txe] were set. if the transmit speed is fast or the interrupt delay is long, more than one transmit buffer may have been sent by the fec. thus, it is important to check more than just one txbd during the interrupt handler. one common practice is to process all txbds in the interrupt handler until one is found with r set. see table 21-44 .  obtain data from the rxbd if ievent[rxc], ievent[rxb], or ievent[rxf] is set. if the receive speed is fast or the interrupt delay is long, the fec may have received more than one receive buffer. thus, it is important to check more than just one rxbd during interrupt handling. typically, all rxbds in the interrupt handler are processed until one is found with bit e set. because the fec pre-fetches bds, the bd table must be big enough so that there is always another empty bd to pre-fetch. see table 21-45 .  clear any set halt bits in tstat and rstat registers, or dmactrl[gts] and dmactrl[grs].  continue normal execution. table 21-44. non-error transmit interrupts interrupt description action taken by fec gtsc graceful transmit stop complete: transmitter is put into a pause state after completion of the frame currently being transmitted. none txc transmit control: instead of the next transmit frame, a control frame was sent. none txb transmit buffer: a txbd, that is not the last one in the frame, was updated. programmable write-with-response txbd to memory before setting ievent[txb]. txf transmit frame: a frame was transmitted and the last txbd of that frame was updated. programmable write-with-response to memory on the last txbd before setting ievent[txf]. table 21-45. non-error receive interrupts interrupt description action taken by fec grsc graceful receive stop complete: receiver is put into a pause state after completion of the frame currently being received. none rxc receive control: a control frame was received. as soon as the transmitter finishes sending the current frame, a pause operation is performed lasting for the duration specified in the received pause control frame and beginning when the frame was first received. none rxb receive buffer: an rxbd, that is not the last one of the frame, was updated. programmable write-with-response rxbd to memory before setting ievent[rxb]. rxf receive frame: a frame was received and the last rxbd of that frame was updated. programmable write-with-response to memory on the last rxbd before setting ievent[rxf].
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-61 21.6.2.8 inter-packet gap time when a station needs to transmit, it waits until the lan becomes silent for a specified period (inter-packet gap). when a station starts sending, it continually checks for collisions on the lan. if a collision is detected, the station forces a jam signal (all ones) on its frame and stops transmitting. collisions usually occur close to the beginning of a packet. the station then waits a random time period (back-off) before attempting to send again. when the back-off completes, the station waits for silence on the lan and then begins retransmission on the lan. this process is called a retry. if the packet is not successfully sent within specified number of retries, an error is indicated. the minimum inter-packet gap time for back-to-back transmission is 96 serial clocks. the receiver receives back-to-back packets with this minimum spacing. in addition, after waiting a required number of clocks (based on the back-off algorithm), the transmitter waits for carrier sense to be negated before retransmitting the packet. retransmission begins 36 serial clocks after carrier sense is negated for at least 60 serial clocks. 21.6.2.9 internal and external loop back setting maccfg1[loop_back] causes mac transmit outputs to be looped back to the mac receive inputs. clearing it results in normal operation. this bit is cleared by default. 21.6.2.10 error-handling procedure the ethernet controller reports frame reception and transmission error conditions using the channel bds, the error counters, and the ievent register. transmission errors are described in table 21-46 . table 21-46. transmission errors error response transmitter underrun the fec sends 32 bits that ensure a crc error, terminates buffer transmission, sets txbd[un], closes the buffer, sets ievent[xfun] and ievent[txe]. the controller resumes transmission after tstat[thlt] is cleared (and dmactrl[gts] is cleared). retransmission attempts limit expired the fec terminates buffer transmission, sets txbd[rl], closes the buffer, sets ievent[crl/xda] and ievent[txe]. transmission resumes after tstat[thlt] is cleared (and dmactrl[gts] is cleared). late collision the fec terminates buffer transmission, sets txbd[lc], closes the buffer, sets ievent[lc] and ievent[txe]. the controller resumes transmission after tstat[thlt] is cleared (and dmactrl[gts] is cleared). memory read error a system bus error occurred during a dma transaction. the fec sets ievent[eberr], dma stops sending data to the fifo which causes an underrun error but ievent[xfun] is not set. the tstat[thlt] is set. transmits are continued once tstat[thlt] is cleared.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-62 freescale semiconductor 10/100 fast ethernet controller babbling transmit error a frame is transmitted which exceeds the mac?s maximum frame length and maccfg2[huge frame] is a 0. the fec sets ievent[babt] and continues without interruption. txbd[txtrunc] is set in the last txbd (txbd[l] is set) of the frame. table 21-46. transmission errors (continued) error response
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-63 reception errors are described in table 21-47 . 21.6.3 buffer descriptors the fec buffer descriptor (bd) is modeled after the mpc8260 fast ethernet controller bd for ease of reuse. drawing from the mpc8260 fec bd programming model, the fec descriptor base registers point to the beginning of bd rings. there is an 8-byte data bd format designed to be similar to the existing mpc8260 bd model. the fec is capable of placing extracted data directly into the l2 cache memory. this allows the processor to quickly access critical frame information as soon as the processor is ready without having to first fetch the data from main memory. this results in substantial improvement in throughput and hence reduction in latency. data buffers are used in the transmission and reception of ethernet frames (see figure 21-44 ). data bds encapsulate all information necessary for the fec to transmit or receive an ethernet frame. within each data bd there is a status field, a data length field, and a data pointer. the bd completely describes an ethernet packet by centralizing status information for the data packet in the status field of the bd and by containing a data bd pointer to the location of the data buffer. software is responsible for setting up the bds in memory. because of prefetching, at least two buffer descriptors per ring are required. this applies to both the transmit and the receive descriptor rings. software also must have the data pointer pointing to memory. an ownership bit in the status field defines the current state of the buffer (pointed to by the data pointer). other status field bits table 21-47. reception errors error description overrun error the fec maintains an internal fifo buffer for receiving data. if a receiver fifo buffer overrun occurs, the controller sets rxbd[ov], sets rxbd[l], closes the buffer, and sets ievent[rxf], the receiver then enters hunt mode (seeking start of a new frame). busy error a frame is received and discarded due to a lack of buffers. the fec sets ievent[bsy]. in addition, rstat[rhlt] is set. the halted queue resumes reception once the user clears rstat[rhlt]. non-octet error (dribbling bits) the ethernet controller handles a nibble of dribbling bits if the receive frame terminates as non-octet aligned and it checks the crc of the frame on the last octet boundary. if there is a crc error, the frame non-octet aligned (rxbd[no]) error is reported, ievent[rxf] is set, and the alignment error counter increments. the fec relies on the statistics collector block to increment the receive alignment error counter (raln). if there is no crc error, no error is reported. crc error if a crc error occurs, the fec sets rxbd[cr], closes the buffer, and sets ievent[rxf]. this fec relies on the statistics collector block to record the event. after receiving a frame with a crc error, the receiver then enters hunt mode. memory read error a system bus error occurred during a dma transaction. the fec sets ievent[eberr] and discards the frame . also, rstat[rhlt] is set. the halted queue resumes reception once rstat[rhlt] is cleared. babbling receive error a frame is received that exceeds the mac?s maximum frame length. the fec sets ievent[babr] and continues.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-64 freescale semiconductor 10/100 fast ethernet controller in the buffer descriptor communicate status/control information between the fec and the software driver. because there is no next bd pointer in the transmit/receive bd (see figure 21-45 ), all bds must reside sequentially in memory. the fec increments the current bd location appropriately to the next bd location to be processed. there is a wrap bit in the last bd that informs the fec to loop back to the beginning of the bd chain. software must initialize the tbase and rbase registers that point to the beginning transmit and receive bds for the fec. figure 21-44. example of fec memory structure for bd figure 21-45. buffer descriptor ring status & control data length buffer pointer status & control data length buffer pointer rx buffer descriptor s tx buffer descriptors rxbd table txbd table txbd table pointer rxbd table pointer (tbase) (rbase) memory map system memory tx buffer rx buffer beginning bd pointer 1 3 0 2 4 w=1
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-65 21.6.3.1 transmit data buffer descriptor (txbd) data is presented to the fec for transmission by arranging it in memory buffers referenced by the txbds. in the txbd the user initializes the r, pad/crc, w, l, and tc bits and the length (in bytes) in the first word, and the buffer pointer in the second word. the fec clears the r bit in the first word of the bd after it finishes using the data buffer. the transfer status bits are then updated. additional transmit frame status can be found in statistic counters in the mib block. figure 21-46 describes the txbd. the txbd fields are detailed in table 21-48 . 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 offset + 0 r pad/crc w i l t c def to 1 hfe/lc rl rc u n txtrunc offset + 2 data length offset + 4 tx data buffer pointer offset + 6 figure 21-46. transmit buffer descriptor table 21-48. transmit data buffer descriptor (txbd) field descriptions offset bits name description offset + 0 0 r ready. written by the fec and user. 0 the data buffer associated with this bd is not ready for transmission. the user is free to manipulate this bd or its associated data buffer. the fec clears this bit after the buffer is transmitted or after an error condition is encountered. 1 the data buffer, which is prepared for transmission by the user, was not transmitted or is currently being transmitted. no fields of this bd may be written by the user once this bit is set. offset + 0 1 pad/crc pad/crc. padding and crc attachment for frames. (valid only while it is set in the first bd and maccfg2[pad/crc] is cleared.) if maccfg2[pad/crc] is set, this bit is ignored. 0 do not add padding to short frames. no crc is appended unless txbd[tc] is set. 1 add pad/crcs to frames. pad bytes are inserted until the length of the transmitted frame equals 64 bytes. unlike the mpc8260 which pads up to minflr value, the fec pads always up to the ieee minimum frame length of 64 bytes. crc is always appended to frames. offset + 0 2 w wrap. written by user. 0 the next buffer descriptor is found in the consecutive location. 1 the next buffer descriptor is found at the location defined in tbase. offset + 0 3 i interrupt. written by user. 0 no interrupt is generated after this buffer is serviced. 1 ievent[txb] or ievent[txf] are set after this buffer is serviced. these bits can cause an interrupt if they are enabled (that is, ievent[txben] or ievent[txfen] are set).
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-66 freescale semiconductor 10/100 fast ethernet controller offset + 0 4 l last in frame. written by user. 0 the buffer is not the last in the transmit frame. 1 the buffer is the last in the transmit frame. offset + 0 5 tc tx crc. written by user. (valid only while it is set in first bd and txbd[pad/crc] is cleared and maccfg2[pad/crc] is cleared and maccfg2[crc en] is cleared.) if maccfg2[pad/crc] is set or maccfg2[crc en] is set, this bit is ignored. 0 end transmission immediately after the last data byte with no hardware generated crc appended, unless txbd[pad/crc] is set. 1 transmit the crc sequence after the last data byte. offset + 0 6 def defer indication. hardware updates this bit if an excessive defer condition occurs. 0 this frame was not deferred. 1 if hafdup[excess_defer]=1, this frame did not have a collision before it was sent but it was sent late because of deferring. if hafdup[excess_defer]=0, this frame was aborted and not sent. offset + 0 7 to1 transmit software ownership. this read/write bit may be utilized by software, as necessary. its state does not affect the hardware nor is it affected by the hardware. offset + 0 8 hfe/lc huge frame enable (written by user)/late collision (written by the fec) huge frame enable. written by user. valid only while it is set in first bd and the maccfg2[huge frame] is cleared. if maccfg2[huge frame] is set, this bit is ignored. 0 truncate transmit frame if its length is greater than the mac?s maximum frame length register. 1 do not truncate the transmit frame. late collision. written by the fec. 0 no late collision. 1 a collision occurred after 64 bytes are sent. the fec terminates the transmission and updates lc. offset + 0 9 rl retransmission limit. written by the fec. 0 transmission before maximum retry limit is hit. 1 the transmitter failed (maximum retry limit + 1) attempts to successfully send a message due to repeated collisions. the fec terminates the transmission and updates rl. offset + 0 10?13 rc retry count. written by the fec. 0 the frame is sent correctly the first time or if rl is set then the retry limit has been reached x one or more attempts where needed to send the transmit frame. if this field is 15, then 15 or more retries were needed. the ethernet controller updates rc after sending the buffer. offset + 0 14 un underrun. written by the fec. 0 no underrun encountered (data was retrieved from external memory in time to send a complete frame). 1 the ethernet controller encountered a transmitter underrun condition while sending the associated buffer. the fec terminates the transmission and updates un. table 21-48. transmit data buffer descriptor (txbd) field descriptions (continued) offset bits name description
functional description MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-67 21.6.3.2 receive buffer descriptor (rxbd) in the rxbd the user initializes the e, i, and w bits in the first word and the pointer in second word. if the data buffer is used, the fec modifies the e, l, f, m, bc, mc, lg, no, sh, cr, ov, and tr bits and writes the length of the used portion of the buffer in the first word. the m, bc, mc, lg, no, sh, cr, ov, and tr bits in the first word of the buffer descriptor are modified by the fec only if the l bit is set. the first word of the rxbd contains control and status bits. figure 21-47 describes the rxbd. table 21-49 describes the fields of the rxbd. offset + 0 15 txtrunc tx truncation. set in the last txbd (txbd[l] is set) when ievent[babt] occurs for the frame. offset + 2 0?15 data length data length is the number of octets the fec transmits from this bd?s data buffer. it is never modified by the fec. this field must be greater than zero. this field must be greater than zero. offset + 4 0?31 tx data buffer pointer the transmit buffer pointer contains the address of the associated data buffer. there are no alignment requirements for this address. 0123456789101112131415 offset + 0 e ro1w i l f 0 m bcmclgnoshcrov tr offset + 2 data length offset + 4 rx data buffer pointer offset + 6 figure 21-47. receive buffer descriptor table 21-49. receive buffer descriptor field descriptions offset bits name description offset + 0 0 e empty. written by the fec (when cleared) and by the user (when set). 0 the data buffer associated with this bd is filled with received data, or data reception is aborted due to an error condition. status and length fields have been updated as required. 1 the data buffer associated with this bd is empty, or reception is currently in progress. offset + 0 1 ro1 receive software ownership bit. this field is reserved for use by software. this read/write bit is not modified by hardware, nor does its value affect hardware. offset + 0 2 w wrap. written by user. 0 the next buffer descriptor is found in the consecutive location. 1 the next buffer descriptor is found at the location defined in rbase. table 21-48. transmit data buffer descriptor (txbd) field descriptions (continued) offset bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-68 freescale semiconductor 10/100 fast ethernet controller offset + 0 3 i interrupt. written by user. 0 no interrupt is generated after this buffer is serviced. 1 ievent[rxb] or ievent[rxf] are set after this buffer is serviced. this bit can cause an interrupt if enabled (imask[rxben] or imask[rxfen]). if the user wants to be interrupted only if rxf occurs, then the user must disable rxb (imask[rxben] is cleared) and enable rxf (imask[rxfen] is set). offset + 0 4 l last in frame. written by the fec. 0 the buffer is not the last in a frame. 1 the buffer is the last in a frame. offset + 0 5 f first in frame. written by the fec. 0 the buffer is not the first in a frame. 1 the buffer is the first in a frame. offset + 0 6 ? reserved offset + 0 7 m miss. written by the fec. (this bit is valid only if l is set and the fec is in promiscuous mode.) this bit is set by the fec for frames that were accepted in promiscuous mode, but were flagged as a ?miss? by the internal address recognition; thus, while in promiscuous mode, the user can use bit m to quickly determine whether the frame was destined to this station. 0 the frame was received because of an address recognition hit. 1 the frame was received because of promiscuous mode. offset + 0 8 bc broadcast. written by the fec. (only valid if l is set.) is set if the da is broadcast (ff-ff-ff-ff-ff-ff). offset + 0 9 mc multicast. written by the fec. (only valid if l is set.) is set if the da is multicast and not bc. offset + 0 10 lg rx frame length violation. written by the fec (only valid if l is set). a frame length greater than maximum frame length was recognized while maccfg2[huge frame] was set. note, if maccfg2[huge frame] is cleared, the frame is truncated to the value programmed in the maximum frame length register. offset + 0 11 no rx non?octet-aligned frame. written by the fec (only valid if l is set). a frame that contained a number of bits not divisible by eight was received. offset + 0 12 sh short frame. written by the fec (only valid if l is set). a frame length that was less than the minimum length defined for this channel (minflr) was recognized, provided rctrl[rsf] is set. offset + 0 13 cr rx crc error. written by the fec (only valid if l is set). this frame contains a crc error and is an integral number of octets in length.this bit is also set if a receive code group error is detected. offset + 0 14 ov overrun. written by the fec (only valid if l is set). a receive fifo overrun occurred during frame reception. if this bit is set, the other status bits, m, lg, no, sh, cr, and cl lose their normal meaning and are zero. offset + 0 15 tr truncation. written by the fec (only valid if l is set). is set if the receive frame is truncated. this can happen if a frame length greater than maximum frame length was received and the maccfg2[huge frame] is cleared. if this bit is set, the frame must be discarded and the other error bits must be ignored as they may be incorrect. table 21-49. receive buffer descriptor field descriptions (continued) offset bits name description
application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-69 21.6.4 data extraction to the l2 cache some applications require the ability to identify selected portions of data within a frame?s data payload. this process is called extraction although the data is not truly removed. rather than literarily extracting a section of the data and copying it into a new memory location, the data is placed in the l2 cache. this allows the processor to quickly access critical frame information as soon as the processor is ready without having to first fetch the data from main memory. this reduction in latency can result in a substantial improvement in packet processing throughput. extraction functionality is controlled and configured with attr and attreli. see section 21.5.3.8.1, ?attribute register (attr),? and section 21.5.3.8.2, ?attribute extract length and extract index register (attreli),? for specific register information. 21.7 application information 21.7.1 interface mode configuration this section describes how to configure the fec in the mii mode. the pinout, the data registers that must be initialized, as well as speed selection options are described. offset + 2 0?15 data length data length. written by the fec. data length is the number of octets written by the fec into this bd?s data buffer if l is cleared (the value is equal to mrbl), or the length of the frame including crc, if l is set. offset + 4 0?31 rx data buffer pointer receive buffer pointer. written by user. the receive buffer pointer, which always points to the first location of the associated data buffer, must be 64-byte aligned. the buffer must reside in memory external to the fec. table 21-49. receive buffer descriptor field descriptions (continued) offset bits name description
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-70 freescale semiconductor 10/100 fast ethernet controller 21.7.1.1 mii interface mode table 21-50 shows the signal configuration needed for mii interface mode table 21-50. mii interface mode signal configuration mii interface frequency [mhz] 25 voltage[v] 3.3 signals i/o # of signals fec_tx_clk i 1 fec_txd[0] o 1 fec_txd[1] o 1 fec_txd[2] o 1 fec_txd[3] o 1 fec_tx_en o 1 fec_tx_er o 1 fec_rx_clk i 1 fec_rxd[0] i 1 fec_rxd[1] i 1 fec_rxd[2] i 1 fec_rxd[3] i 1 fec_rx_dv i 1 fec_rx_er i 1 fec_col i 1 fec_crs i 1 sum 16
application information MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor 21-71 table 21-51 describes the register initializations required to reconfigure the phy to mii mode following intial auto-negotiation. table 21-51. mii mode register initialization steps set soft_reset, maccfg1[1000_0000_0000_0000_0000_0000_0000_0000] clear soft_reset, maccfg1[0000_0000_0000_0000_0000_0000_0000_0000] initialize maccfg2, for mii, half duplex operation. set i/f mode bit to nibble mode, maccfg2[0000_0000_0000_0000_0111_0001_0000_0100] (this example has full duplex = 0, preamble count = 7, pad/crc append = 1) initialize mac station address, macstnaddr2[0110_0000_0000_0010_0000_0000_0000_0000] set station address to 02_60_8c_87_65_43, for example. (note that phy configuration register addresses are not necessarily consistent in all phys.) initialize mac station address, macstnaddr1[0100_0011_0110_0101_1000_0111_1000_1100] set station address to 02_60_8c_87_65_43, for example. (note that phy configuration register addresses are not necessarily consistent in all phys.) check auto-negotiation attributes in the phy as necessary. clear ievent register, ievent[0000_0000_0000_0000_0000_0000_0000_0000] initialize imask, (optional) imask[0000_0000_0000_0000_0000_0000_0000_0000] initialize iaddr n, (optional) iaddr n [0000_0000_0000_0000_0000_0000_0000_0000] initialize gaddr n, (optional) gaddr n [0000_0000_0000_0000_0000_0000_0000_0000] initialize rctrl, (optional) rctrl[0000_0000_0000_0000_0000_0000_0000_0000] initialize dmactrl, (optional) dmactrl[0000_0000_0000_0000_0000_0000_0000_0000] initialize fifo_pause_ctrl, fifo_pause_ctrl[0000_0000_0000_0000_0000_0000_0000_0010] initialize (empty) transmit descriptor ring and fill buffers with data. initialize tbase, tbase[llll_llll_llll_llll_llll_llll_llll_l000] initialize (empty) receive descriptor ring and fill with empty buffers. initialize rbase, rbase[llll_llll_llll_llll_llll_llll_llll_l000] enable rx and tx, maccfg1[0000_0000_0000_0000_0000_0000_0000_0101]
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 21-72 freescale semiconductor 10/100 fast ethernet controller
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-1 appendix a revision history this appendix provides a list of the major differences between revisions of the MPC8540 powerquicc iii integrated host processor reference manual, revision 0 and MPC8540 powerquicc iii integrated host processor reference manual, revision 1. a.1 changes from revision 0 to revision 1 major changes to the MPC8540 powerquicc iii integrated host processor reference manual between revision 0 to revision 1 are as follows: section, page changes chapters 4, 16, 18, 20 throughout all applicable chapters, correctly state the debug mode source id (formerly documented to be visible on signals pci_ad[63:59]) to be visible on signals pci_ad[62:58]. 2.4, 2-18 in table 2-9, correct the reset value for the i2cdfsrr register to be 0x10. 2.4, 2-27 in table 2-9, add the following rows under the tsec1 fifo control and status registers section: 2.4, 2-27 in table 2-9, correct the reset value for the ostbd register to be 0x0800_0000. 2.4, 2-28 in table 2-9, correct the maccfg1 register from having r/w, r access to r/w access. 2.4, 2-28 in table 2-9, correct the reset value for the ifstat register to be 0x0000_0000. 2.4, 2-31 in table 2-9, correct the car1 and car2 registers from having r access to r/w access. also, remove the ?cleared on read? footnote designation from the car1 and car2 registers. 0x2_404c fifo_pause_ctrl?fifo pause control register r/w 0x0000_0000 14.5.3.2.1/14-30 0x2_4050? 0x2_4088 reserved r 0x0000_0000 ?
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-2 freescale semiconductor revision history 2.4, 2-32 in table 2-9, add the following two rows under ?fifo control and status registers?: 2.4, 2-35 in table 2-9, correct the attr and attreli registers from having r access to r/w access. 2.4, 2-35 in table 2-9, correct the offset for the reserved addresses after the eoi register to be 0x4_00c0?0x4_0ff0. 2.4, 2-47 in table 2-9, correct the reset value for the gpindr register to be 0x nnnn _0000. 2.4, 2-48 in table 2-9, correct the name of the register with offset 0xe_1094 from pmlcb5 to pmlcb8. 2.4, 2-42?46 in table 2-9, correct the access designation for all rapidio registers listed as ?special? to read ?r/w?. 4.3.1.3, 4-7 replace the second sentence of the first paragraph to read: ?the first instruction executed by the e500 core is always address 0xffff_fffc, which must be a branch to an address within the 4-kbyte boot page.? 4.4.3.3, 4-13 insert the following sentence at the start of the first paragraph: ?the first instruction executed by the e500 core is always address 0xffff_fffc, which must be a branch to an address within the 4-kbyte boot page.? 4.4.3.3, 4-14 add the following sentence to the end of the last paragraph: ?if enabled, this translation only affects cpu accesses to 0xffff_f nnn .? 4.4.4.1, 4-22 append the end of the first paragraph of section 4.4.4.1, with the following sentence: ?note that the divide-by-two ccb clock divider and the divide-by- n ccb clock divider, shown in figure 4-6, are located in the ddr and local bus blocks, respectively.? 0x2_604c fifo_pause_ctrl?fifo pause control register r/w 0x0000_0000 21.5.3.2.1/21-22 0x2_6050? 0x2_6088 reserved r 0x0000_0000 ?
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-3 4.4.4.1, 4-23 replace the existing figure 4-6 with the following figure (note the addition of the ccb clock dividers prior to the ddr dll and the lbc dll): 4.4.4.4, 4-25 in figure 4-8, replace the sentence: ?watchdog timer events based on one of the 64 tb bits selected by tcr[wp] concatenated with the eis-defined tcr[wpext] (wp||wpext).? with the following sentence: ?watchdog timer events based on one of the 64 tb bits selected by concatenating tcr[wpext] with the eis-defined tcr[wp] (wpext||wp).? 4.4.4.4, 4-25 in figure 4-8, replace the sentence: ?fixed-interval timer events based on one of the 64 tb bits selected by tcr[fp] concatenated with the eis-defined tcr[fpext] (fp||fpext).? with the following sentence: ?fixed-interval timer events based on one of the 64 tb bits selected by concatenating tcr[fpext] with the eis-defined tcr[fp] (fpext||fp).? lclk2 core pll device pll dll dll msync_in lsync_in lsync_out lclk0 lclk1 msync_out mck[0:5] mck [0:5] core_clk e500 core ccb_clk to rest of the device sysclk/ pci_clk ccb_clk cfg_sys_pll[0:3] cfg_core_pll[0:1] MPC8540 2 4 6 6 ddr controller lbc 2 n
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-4 freescale semiconductor revision history 5.5, 5-13 prior to section 5.5.1, insert a new section, ?initial instruction fetch,? consisting of the following text (former section 5.5.1 now becomes section 5.5.2.): ?the e500 core begins execution at fixed virtual address 0xffff_fffc. the mmu has a default page translation which maps this to the identical physical address. so, the instruction at physical address 0xffff_fffc must be a branch to another address within the 4-kbyte boot page.? 5.6, 5-18 remove the registers iac3 and iac4 from figure 5-6. 5.14, 5-33 in table 5-8, replace the hid1 implementation description of hid1[rfxe] with the following: 6.1.1, 6-2 iac3 and iac4 are not supported and should be removed from figure 6-1. hid1[rfxe] controls whether assertion of core_fault_in causes a machine check interrupt. assertion of core_fault_in can result from uncorrectable data error, such as an l2 multibit ecc error. it can also occur for a system error if logic on the integrated device signals a fault for nonfatal errors (read data is corrupt (or zero), but the transaction can complete without corrupting other system state, making it unnecessary to take a machine check (for example, a master abort of a pci transaction). if rfxe is 0, and core_fault_in is asserted, any data on the ccb is dropped, either stalling the load/store unit and causing the e500 pipeline to stall until an interrupt occurs (typically generated by the programmable interrupt controller (pic) in response to the fault) or allowing processingtto continue with the bad data until the interrupt occurs. because core_fault_in cannot cause a machine check if rfxe is 0, it is critical that the system be configured to generate the appropriate interrupt, as described below. it is also possible to hang the processor (requiring a hard reset to recover) if a guardedtload hits in the l2 cache and gets an uncorrectable ecc error. because of this, avoid defining memory as cacheable but guarded. if this combination is required, rfxe must be enabled, in which case an error causes both a machine check interrupt and an external interrupt when a bus fault condition is detected unless interrupts are masked for all sources of bus faults. if rfxe is 0, conditions that cause the assertion of core_fault_in cannot directly cause the e500 to generate a machine check; however, powerquicc iii devices must be configured to detect and enable such conditions. the following describes how error bits should be configured:  ecm mapping errors: eeer[laee] must be set. see section 8.2.1.4, ?ecm error enable register (eeer).?  l2 multiple-bit ecc errors: l2errdis[mbeccdis] must be cleared to ensure that error can be detected. l2errinten[mbeccinten] must be set. see section 7.3.1.5, ?l2 error registers.?  ddr multiple-bit ecc errors. err_disable[mbed] and err_int_en[mbee] must be zero and ddr_sdram_cfg[ecc_en] must be one to ensure that an interrupt is generated. see section 9.4.1, ?register descriptions.?  pci. the appropriate parity detect and master-abort bits in err_dr must be cleared and the corresponding enable bits in err_en must be set to ensure that an interrupt is generated. section 16.3.1.4, ?pci/x error management registers.?  local bus controller parity errors. ltedr[pard] must be cleared and lteir[pari] must be set to ensure that an parity errors can generate an interrupt. see section 13.3.1.11, ?transfer error check disable register (ltedr),? and section 13.3.1.12, ?transfer error interrupt enable register (lteir).?  rapidio. pcr[cce] must be set to ensure that an interrupt is generated due to a crc error. see section 17.3.2.1.2, ?port configuration register (pcr).? rfxe must also be set if software requires that code execution stop immediately when a bus fault occurs rather than continuing with the bad data until the interrupt arrives. again, this results in both a machine check interrupt and an external interrupt when a bus fault is detected, unless all possible sources for bus fault have their interrupts masked.tthe machine check interrupt can then reenable normal interrupts and wait for the interrupt due to the fault to be received before returning from the machine check.
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-5 6.6.1, 6-14 in table 6-8, change the second sentence of the description for bits 32?33 of the tcr register to the following: wpext[0?3] || wp[0?1] = 0b00_0000 selects tbu[32] (the msb of the tb) wpext[0?3] || wp[0?1] = 0b11_1111 selects tbl[63] (the lsb of the tb) 6.6.1, 6-14 in table 6-8, change the description of tcr[wrc] as follows: 01 a second timeout is ignored, regardless of the value of msr[me]. 6.6.1, 6-15 in table 6-8, change the second sentence of the description for bits 38?39 of the tcr register to the following: fpext[0?3] || fp[0?1] = 0b00_0000 selects tbu[32] (the msb of the tb) fpext[0?3] || fp[0?1] = 0b11_ 1111 selects tbl[63] (the lsb of the tb) 6.7.2.4, 6-22 in table 6-12, change the bit range ?43?46? to ?36?46?. 6.10.2, 6-27 in table 6-17, replace the description of hid1[rfxe] with the following: read fault exception enable. controls whether assertion of core_fault_in causes a machine check interrupt. the assertion of core_fault_in can result from an l2 multibit ecc error. it can also occur for a system error if logic on the integrated device signals a fault for nonfatal errors (read data is corrupt (or zero), but the bus transaction can complete without corrupting other system state, making it unnecessary to take a machine check (for example, a master abort of a pci transaction). 0 assertion of core_fault_in cannot cause a machine check. rfxe should be left clear if an interrupt is to be reported by the integrated device through int or c_int for this condition. if rfxe = 0, it is important that the integrated device generates an interrupt if core_fault_in is asserted. if core_fault_in is asserted, any data on the ccb is dropped, stalling the load/store unit and eventually causing the e500 pipeline either to stall until an interrupt occurs (typically generated by the programmable interrupt controller (pic) in response to the fault) or to continue processing with bad data untill the interrupt occurs. because core_fault_in cannot cause a machine check, if rfxe is 0, it is critical that the system be configured to generate the appropriate interrupt. it is also possible to hang the processor (requiring a hard reset to recover) if a guarded load hits in the l2 cache and gets an uncorrectable ecc error. because of this, avoid defining memory as cacheable but guarded. if this combination is required, rfxe must be enabled, in which case an error causes both a machine check interrupt and an external interrupt when a bus fault condition is detected unless interrupts are masked for all sources of bus faults, such as dram ecc errors, pci parity errors, local bus parity errors, and others. rfxe must also be set if software requires that code execution stop immediately when a bus fault occurs rather than continuing with the bad data until the interrupt arrives. again, this results in both a machine check interrupt and an external interrupt when a bus fault is detected, unless all possible sources for bus fault have their interrupts masked.tthe machine check interrupt can then reenable normal interrupts and wait for the interrupt due to the fault to be received before returning from the machine check. 1 a machine check can occur due to assertion of core_fault_in . if msr[me] = 1 and a fault is signaled, a machine check interrupt occurs. if msr[me] = 0 and a fault is signaled, a checkstop occurs. note that if rfxe is set and another mechanism is configured to generate an interrupt in response to assertion of core_fault_in , the same event causes two interrupts, the machine check enabled by setting rfxe and the interrupt triggered by the on-chip peripheral or other block; therefore, rfxe should be set only if no other mechanism is configured to generate an interrupt for this case. note that the l2 cache detects any assertion of core_fault_in and ensures that the l2 cache is not corrupted when data is dropped for this type of transaction.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-6 freescale semiconductor revision history 6.11.3, 6-30 in table 6-20, describe bits 34?38 as ?reserved? as is properly expressed in figure 6-35. disregard descriptions associated with bits 34, 35, or 36 in table 6-20. 6.12.2, 6-32 in figure 6-38 and table 6-22, describe bits 59 and 60 as ?reserved?. 6.12.5.3, 6-37 in table 6-28, describe bits 52?56 as ?reserved for implementation-specific use?. 6.13.3, 6-45 remove all references to iac3 and iac4 from this section. 7.3.1.1, 7-8 in table 7-2, change the description for bit 1 from ?accesses to memory-mapped sram are unaffected...? to ?data in memory-mapped sram regions is unaffected...? 7.3.1.1, 7-8 and 7-9 in figure 7-7 and table 7-2, show bit 11 to be reserved. 7.3.1.5.2, 7-16 and 7-17 in table 7-12, change the bit descriptions for bits 27 and 31 of the l2errdet register as follows: bit 27, tparerr: add the following text: ?note that if an l2 cache tag parity error occurs on an attempt to write a new line, the l2 cache must be flash invalidated. l2 functionality is not guaranteed if flash invalidation is not performed after a tag parity error.? bit 31, l2cfgerr: add the following text to the 1st line of description, ?reports inconsistencies between the l2siz, l2blksz, and l2sram settings of the l2 control register (l2ctl).? 7.7.4, 7-25 add the following note after the second paragraph: note there is a scenario in which a lock clear operation appears to fail to clear a lock in the l2 cache. this occurs only when the attempt to set the lock results in a bus error (for example, pci returns an error condition). assume the following scenario: 1. the e500 attempts to set a lock in the l2 cache (by executing a dcbtls or icbtls instruction with ct = 1). the line is not already present in the cache, so it must be read from external memory. this read encounters an error which, depending on the chip configuration, will be reported to the core (probably as an interrupt). 2. at (or near) the same time, a cache external write to the same cache line is being mastered by the ecm.
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-7 3. very soon after the cache external write, a transaction to clear the lock occurs. this can be caused by the processor executing a dcblc or icblc instruction with ct = 1, or by the ecm mastering a lock clear transaction. if this scenario occurs within a tight timing window, the cache line may unexpectedly remain locked at the end of the sequence. the interrupt handler may want to clear the erroneously remaining lock in this case. 7.9, 7-28 add new section 7.9.2, ?flash invalidation of l2 cache? as follows: ?the l2 cache may be completely invalidated by setting the l2i bit of the l2 control register (l2ctl). note that no data is lost in this process because the l2 cache is a write-through cache and contains no modified data. flash invalidation of the cache is necessary when the cache is initially enabled and may be necessary to recover from some error conditions such as a tag parity error. the invalidation process requires several cycles to complete. the l2i bit remains set during this procedure and is then cleared automatically when the procedure is complete. the l2 cache controller issues retries for all transactions on the e500 core complex bus (ccb) while the flash invalidation process is in progress. note that the contents of memory-mapped sram regions of the data array are unaffected by a flash invalidation of the l2 cache regions fo the array. 7.10, 7-32 add new section 7.10, ?initialization/application information,? with the following sections: section 7.10.1, ?initialization,? with new subsections section 7.9.1.1, ?l2 cache initialization,? and section 7.9.1.2, ?memory-mapped sram initialization.? 7.9.1.1 l2 cache initialization after power-on reset, the valid bits in the l2 cache status array are in random states. therefore, it is necessary to perform a flash invalidate operation before using the array as an l2 cache. this is done by writing a 1 to the l2i bit of the l2 control register (l2ctl). this can be done before or simultaneously with the write that enables the l2 cache. that is, the l2e and l2i bits of l2ctl can be set simultaneously. the l2i bit clears automatically, so no further writes are necessary.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-8 freescale semiconductor revision history 7.9.1.2 memory-mapped sram initialization after power-on reset, the contents of the data and ecc arrays and are random, so all sram data must be initialized before it is read. if the cache is initialized by the core or any other device that uses sub-cacheline transactions, ecc error checking should be disabled during the initialization process to avoid false ecc errors generated during the read-modify-write process used for sub-cacheline writes to the sram array. this is done by setting the multi- and single-bit ecc error disable bits of the l2 error disable register (l2errdis[mbeccdis, sbeccdis]). see section 7.3.1.9.2, ?error control and capture registers.? if the array is initialized by a dma engine using cache-line writes, then ecc checking can remain enabled during the initialization process. also, add new section 7.10.2, ?managing errors,? with subsections section 7.10.2.1, ?ecc errors,? and section 7.10.2.2, ?tag parity errors.? 7.10.2.1 ecc errors an individual soft error that causes a single- or mulit-bit ecc error can be cleared from the l2 array simply by executing a dcbf instruction for the address captured in the l2erraddr register. this will invalidate the line in the l2 cache. when the load that caused the ecc error is performed again, the data will be re-allocated into the l2 with ecc bits set properly again. if the threshold for single bit errors set in the l2errctl register is exceeded, then the l2 cache should be flash invalidated to clear out all single-bit errors. note that no data is lost by executing dcbf instructions or flash invalidate operations because the l2 cache is write-through and contains no modified data. 7.10.2.2 tag parity errors a tag parity error must be fixed by flash invalidating the l2 cache. note that executing a dcbf instruction for the address that caused the error to be reported is not sufficient because a tag parity error is seen as an l2 miss and does not cause invalidation of the bad tag. proper l2 operation cannot be
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-9 guaranteed if an l2 tag parity error is not repaired by a flash invalidation of the entire array. 9.3.2.1, 9-6 in table 9-3, change the timing description for the ma[0:14] signals to read: ?assertion/negation?the address is always driven when the memory controller is active. it is valid when a transaction is driven to dram (when mcs n is negated). high-impedance?when the memory controller is idle.? 9.3.2.1, 9-6 in table 9-3, change the timing description for the mcas signal to read: ?assertion/negation?assertion and negation timing is directed by the values described in section 9.4.1.3, ?ddr sdram timing configuration 1 (timing_cfg_1).? high-impedance?mcas is always driven unless the memory controller is idle.? 9.3.2.1, 9-7 in table 9-3, change the timing description for the mras signal to read: ?assertion/negation?timing is directed by the values described in section 9.4.1.3, ?ddr sdram timing configuration 1 (timing_cfg_1).? high-impedance?mras is always driven unless the memory controller is idle.? 9.3.2.1, 9-7 in table 9-3, change the timing description for the mwe signal to read: ?assertion/negation?similar timing as mras and mcas . used for write commands. high-impedance?mwe is always driven unless the memory controller is idle.? 9.3.2.2, 9-8 in table 9-4, correct the ?mcke? signal name to read ?mcke[0:1]?. also, change the first full sentence of the mcke[0:1] signal description to read: ?two identical output signals (each hereafter referred to simply as mcke) used as the clock enable to one or more sdrams.? 9.3.2.2, 9-8 in table 9-4, change the timing description for the mcke[0:1] signal to read: ?assertion/negation?similar timing to ma n . high-impedance?always driven.?
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-10 freescale semiconductor revision history 9.4.1.1, 9-10 in table 9-6, change the cs n _bnds[ea n ] field description to read: ?ending address for chip select (bank) n . this value is compared against the 8 msbs of the address.? 9.4.1.4, 9-13 in table 9-9, replace all instances of |caslat| with . 9.4.1.5, 9-14 in table 9-10, change the setting of the mbee bit in the ddr_sdram_cfg[ecc_en] description to read as follows: ?ecc enable. note that uncorrectable read errors may cause the assertion of core_fault_in, which causes the core to generate a machine check interrupt unless it is disabled (by clearing hid1[rfxe]). if rfxe is zero and this error occurs, err_disable[mbed] must be zero and err_int_en[mbee] and ecc_en must be one to ensure an interrupt is generated. see section 6.10.2, ?hardware implementation-dependent register 1 (hid1) . 0 no ecc errors are reported. no ecc interrupts are generated. 1 ecc is enabled.? 9.4.1.7, 9-16 in table 9-12, add the following last sentence to the ddr_sdram_interval[refint] field description: ?note that refint must be set to a non-zero value in order for the ddr to enter sleep mode. see section 18.5.1.5.3, ?sleep mode ,? for additional details.? 9.4.1.15, 9-21 change the setting of mbee bit in the err_disable[mbed] description to read as follows: multiple-bit ecc error disable 0 multiple-bit ecc errors are detected if ddr_sdram_cfg[ecc_en] is set. they are reported if err_int_en[mbee] is set. note that uncorrectable read errors cause the assertion of core_fault_in , which causes the core to generate a machine check interrupt, unless it is disabled (by clearing hid1[rfxe]). if rfxe is zero and this error occurs, mbed must be zero and err_int_en[mbee] and ecc_en must be one to ensure that an interrupt is generated. 1 multiple-bit ecc errors are not detected or reported. 9.4.1.16, 9-21 change the setting of the mbee bit in the err_int_en[mbee] description to read as follows: ?multiple-bit ecc error interrupt enable. note that uncorrectable read errors may cause the assertion of core_fault_in , which causes the core to caslat
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-11 generate a machine check interrupt, unless it is disabled (by clearing hid1[rfxe]). if rfxe is zero and this error occurs, err_disable[mbed] must be zero and mbee and ddr_sdram_cfg[ecc_en] must be set to ensure that an interrupt is generated. for more information, see section 6.10.2, ?hardware implementation-dependent register 1 (hid1).? 0 multiple-bit ecc errors cannot generate interrupts. 1 multiple-bit ecc errors generate interrupts.? 9.5, 9-25 replace figure 9-21 with the figure below: 9.5, 9-25 remove the last sentence of the fourth paragraph. 9.5.1.1, 9-30 in the first two columns of table 9-26, change ?mbytes? to ?mbits? and ?gbytes? to ?gbits?. 9.5.1.1, 9-30 delete the second-to-last paragraph of this sentence that starts with the words, ?if a disabled bank...? address decode r equest from master input staging queue physical bank, logical bank, row row open address control ddr sdram memory array: ma[0:14] mbaa[0:1] debug signals: msrcid[0:4] mdval ddr sdram memory contro l: mcs [0:3] mcas mras mwe mdm[0:8] mcke[0:1] data strobes: mdqs[0:8] data signals: mdq[0:63] mecc[0:7] address from master sdram control row open table delay chain neg dq ecc error signals dq dq ecc rmw ecm to e r ro r management data from sdram data from master en en clocks: mck [0:5] mck[0:5] msync_out msync_in dll fifo pos fifo
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-12 freescale semiconductor revision history 9.5.4?9.5.7, 9-35?9-39 in all burst examples, re-number the data beats in the figures to be d0, d1, d2, d3, d0, d1, d2, d3. 9.5.4, 9-35 in the last paragraph, change the phrase, ?see figure 9-26 for a single-beat read operation,? to read ?see figure 9-26 for a back-to-back burst read operation,?. 9.5.4, 9-36 change the title of figure 9-28 to ?ddr sdram burst write timing?acttorw = 4?. 9.5.6, 9-38 change the last sentence of this section to read ?figure 9-31 shows the registered ddr sdram dimm back-to-back burst write timing.? 9.5.7, 9-39 replace the existing figure 9-32 with the figure below: 9.5.8, 9-40 in the paragraph preceding section 9.5.8.1, change the reference to ?two sets of auto refresh commands...? to read ?three sets of auto refresh commands...?. also, change the reference to ?...commands are also staggered in two groups...? to read ?... commands are also staggered in three groups...? acttorw row col sdram clock mcs mcas ma[13:0] mwe mras 00 mdq[0:63] mdqs mdm[0:7] 1/4 delay col mdq[0:63] mdqs mdm[0:7] 1/2 delay 01 2345 67 89101112 d0 d1 d2 d3 d4 d5 d6 d7 d0 d1 d2 d3 d4 d5 d6 d7 00
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-13 9.5.8.1, 9-40 in figure 9-33, remove the annotation of ?0 or 3? in clock 12. 9.5.8.2, 9-41 after the second paragraph, add the following paragraph: ?all open pages are precharged before self refresh mode is entered.? also, correct the last sentence of the fifth paragraph to read: ?this mode is controlled with ddr_sdram_cfg[dyn_pwr].? 9.5.9, 9-43 replace the third and fourth sentences of this section with the following: ?if ecc is enabled for a sub-doubleword write transaction, a full read-modify-write is performed to properly update ecc bits. if ecc is disabled then no read-modify-write is required for sub-doubleword writes, and the data masks (mdm[0:8]) are used to prevent writing unwanted data to sdram.? 9.5.11, 9-44 add the following sentences before the second-to-last sentence of the second paragraph: ?this read-modify-write operation is performed as an atomic transaction in the ddr controller. the write command is then issued 3-5 memory clocks after the completion of the read, depending on various system parameters.? 9.5.12, 9-46 in the last paragraph, delete the three sentences that start and end with, ?for all memory select errors...? and ?...to show the transaction is not real.? 9.6.1, 9-48 in the second sentence, replace ?after the dll has locked? with the following: ?after the memory clocks are stable (that is, the dll has locked or initialization is complete of all clock related configuration registers).? replace the last sentence of the first paragraph with the following: ?after mem_en has been set, the ddr memory controller automatically performs the jedec-compliant initialization sequence to initialize memories according to the information in the sdmode and esdmode fields of the ddr_sdram_mode register. the initialization sequence is as follows:? after the numbered list, add the following sentence: ?note that the ba0 and ba1 bits are automatically driven appropriately during the mode register set commands.? then the final sentence should be changed to, ?after this automatic initialization is complete the memory array is ready for access and the memory controller begins processing memory transactions as they arrive.?
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-14 freescale semiconductor revision history 10.2.2, 10-7 in table 10-5, delete the last sentence in the timing/negation section for irq[0:11] signals about edge-sensitive interrupts. 10.3.5.3, 10-29 append the last sentence of the first paragraph to read: ?reading the corresponding message register or writing a 1 to a status bit clears the corresponding message interrupt and the status bit.? 10.3.7, 10-36 in table 10-35, correct the who am i register name from ?whoami0? to ?whoami.? 10.4.1, 10-41 add the following new paragraph after the first paragraph: ?note that the ipr, is, and irr are internal registers that are not accessible to the programmer.?
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-15 10.4.1, 10-41 replace the existing figure 10-37, with the figure below: 11.3, 11-4 in table 11-3, correct the i2cdfsrr reset value to be 0x10. pic configuration and status registers interrupt pending register internal, external, and interrupt selector in-service register int iack eoi cint mask critical interrupt xidr[ci] external pin xidr[ep] irq_out global timers (4) inter-processor message interrupts (is) to processor core note: all signal lines represent buses except for int , cint , and irq_out . the behavior of the pic unit is not defined if both the ep and ci bits of the same interrupt destination register are set. interrupt router to processor core end of interrupt register highest priority interrupt (isr) processor?s task priority register interrupt request register pipeline latch (irr) activity bit (ipr)
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-16 freescale semiconductor revision history 11.4.5.2, 11-18 insert the following two sentences after the eighth sentence of the first paragraph: ?the boot sequencer expects the address offset to be a 32-bit (word) offset, that is, the 2 low-order bits are not included in the boot sequencer command. for example, to access lawbar0 (byte offset of 0x00c08), the boot sequencer addr[0:17] should be set to 0x00302.? 11.4.5.2, 11-18 insert the following sentence after the polynomial used for crc calculation in the fourth paragraph: ?crc values are calculated using the above polynomial with a start value of 0xffff_ffff and an xor with 0x0000_0000.? 12.3.1.9, 12-15 in table 12-16, change the second sentence of the asserted (?1?) description for the ulsr[bi] to read: ?a break condition is expected to last at least two character lengths and a new character is not loaded until sin returns to the mark state (logic 1) and a valid start is detected.? chapter 13 correct all instances of ?upwait? to ?lupwait.? 13.1.3.1, 13-3 change the third sentence of the first paragraph to read: ?in addition to establishing the frequency of the external local bus clock, clkdiv also affects the resolution of signal timing shifts in gpcm mode, and the interpretation of upm array words in upm mode.? 13.1.3.1, 13-4 in the last sentence, change ?lclk[0:3]? to ?lclk[0:2].? 13.2, 13-5 delete the reset state (outputs) column (and references to it) of table 13-1. 13.2, 13-6, 13-7, and 13-9 in table 13-2, change all instances of ?ras? to ?ras ? and all instances of cas to cas . 13.3.1.2.3, 13-16 and 17 in table 13-7, table 13-8, figure 13-4, and figure 13-5, change bits 17?18 to reserved. 13.4.4, 13-61 insert the following footnote associated with the word ?signals? in the second sentence of the section: ?if the lgpl4/lgta/lupwait/lpbse signal is used as both an input and an output, a weak pullup is required. refer to the hardware specification for details regarding termination options . ?
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-17 13.4.4.2, 13-65 add the following third paragraph: ?note that the upm memory region must be cache-inhibited or write-through (the mmu page must have the i or w bit set) during the time that the upm array is being written. if the memory is to be cacheable and/or copyback, the mmu must be set accordingly after the upm array is initialized.? 13.4.7.3, 13-55 in the section title, change ?cas? to ?cas ?. chapter 14, 21 for consistency, change all instances of ?hfe?, ?huge_frame?, and ?huge frame? to ?huge frame?. 14.2, 14-7 in the first bullet item of the tsec features list, change ?820.3x? to ?802.3x.? 14.2, 14-7 change the fifth element of the second bullet item in the tsec features list to read: ?? 10/100 mbps rmii? 14.5.2, 14-14 in table 14-3, add the following as the first row under the tsec1 fifo control and status registers section: 14.5.2, 14-15 in table 14-3, correct the reset value for the ostbd register to 0x0800_0000. 14.5.2, 14-16 in table 14-3, correct the maccfg1 register from having r/w, r access to r/w access. 14.5.2, 14-16 in table 14-3, correct the ifstat register from having r access to r/w access. 14.5.2, 14-16 in table 14-3, change the reset value for the tsec ifstat register to be 0x0000_0000. 14.5.2, 14-18 in table 14-3, correct the car1 and car2 registers from having r access to r/w access. 14.5.2, 14-18 in table 14-3, remove the incorrect "cleared on read" footnote designation from the car1 and car2 registers. 14.5.2, 14-19 in table 14-3, correct the attr and attreli registers from having r access to r/w access. 14.5.3.1.1, 14-20 in table 14 -4, correct the ievent[rxc] bitfield description to read as follows: ?receive control interrupt. a control frame was received. if maccfg1[rx_flow] is set, a pause operation is performed lasting for the 0x2_404c fifo_pause_ctrl?fifo pause control register r/w 0x0000_0000 14.5.3.2.1/a-19
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-18 freescale semiconductor revision history duration specified in the received pause control frame and beginning when the frame was received. 0control frame not received 1 control frame received? 14.5.3.1.1, 14-20 replace the last two sentences of the first paragraph with: ?clearing the ievent bit clears the interrupt signal. the bit in the ievent register is cleared if a 1 is written to that bit position. a write of 0 has no effect.? 14.5.3.1.1, 14-21 in table 14-4, replace the eberr field description with: ?ethernet bus error. this bit indicates that a system bus error for a memory read ocurred while a dma transaction was underway. if the eberr is set while transmission is in progress, the dma stops sending data to the tx fifo which eventually causes an underrun error (xfun) and tstat[thlt] is set. if the eberr is set while receiving a frame, the dma discards the frame and rstat[qhlt] is set. 0 no system bus error occurred. 1 system bus error occurred.? 14.5.3.1.2, 14-22 replace the last sentence in the first paragraph with: ?the interrupt signal can be cleared by clearing the corresponding ievent bit.? 14.5.3.1.3, 14-24 undocument bitfields txedis, crl/xdadis, and xfundis. 14.5.3.1.7, 14-27 and 28 remove bitfield dmactrl[tod] from figure 14-12 and table 14-10. this bit position (29) is now reserved. 14.5.3.1.7, 14-28 in table 14-10, add the following paragraph after the second paragraph of the wop field description: ?a buffer descriptor is considered not ready when its txbd[ready] field is clear or its txbd[data length] field is zero. it is considered ready when both txbd[ready] is set and txbd[data length] is non-zero.? 14.5.3.1.7, 14-28 in table 14-10, change the second sentence of the third paragraph (which becomes the fourth paragraph after incorporating of the above errata) of the wop field description to read: ?if the txbd becomes ready, tsec continues to process the frame.?
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-19 14.5.3.2.1, 14-30 insert the following section as the first subsection of section 14.5.3.2: 14.5.3.2.1 fifo pause control register (fifo_pause_ctrl) fifo_pause_ctrl, shown in figure 14-20, is writable by the user to configure the properties of the tsec fifo. table 14-20 describes the fields of the fifo_pause_ctrl register. 14.5.3.3.1, 14-32 in table 14-15, repla ce the bitfield description of tctrl[tfc_pause] with the following: ?transmit flow control pause frame. use this bit to transmit a pause frame. to transmit a flow control pause frame, first set fifo_pause_ctrl[tfc_pause_en]. next, set maccfg1[gts]. if tfc_pause is then set, the mac stops transmission of data frames after the current transmission completes. the gtsc interrupt in the ievent register is asserted. with transmission of data frames stopped, the mac transmits a mac control pause frame with the duration value obtained from the ptv register. the txc interrupt occurs after sending the control 0 15 r00000000000000 0 0 w reset 0000_0000_0000_0000 16 29 30 31 r00000000000000 tfc_pause_en 0 w reset 0000_0000_0000_0000 offset tsec1:0x2_404c; tsec2:0x2_504c figure 14-14 fifo_pause_ctrl register definition table 14-12 fifo_pause_ctrl field descriptions bits name description 0?29 ? reserved 30 tfc_pause_en tfc_pause enable. this bit enables the ability to transmit a pause control frame by setting the tctrl[tfc_pause] bit. this bit is cleared at reset. 0 pause control frame transmission disabled. 1 pause control frame transmission enabled. 31 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-20 freescale semiconductor revision history pause frame. next, the mac clears tfc_pause and resumes transmitting data frames. note that if the transmitter is paused due to user assertion of gts or reception of a pause frame, the mac may still transmit a mac control pause frame. 0 no outstanding pause frame transmission request. 1 pause frame transmission requested.? 14.5.3.3.6, 14-35 change the last sentence in the first paragraph to read: ?although not necessary in most applications, the user can modify this register when the transmitter has been gracefully stopped or halted, as indicated by ievent[gtsc] or tstat[thlt].? 14.5.3.3.8, 14-38 in table 14-22, add the following sentence to the ostbdlen field description: ?this field must be greater than zero in order for a transfer to take place.? 14.5.3.4.2, 14-40 in table 14-25, change the description for the rstat[qhlt] field to read: ?rxbd queue is halted. when ievent[bsy] or ievent[eberr] is set during reception of a packet, rstat[qhlt] is also set. in order to begin receiving packets again, the user must clear rstat[qhlt]. this bit is set whenever the tsec reads an rxbd with its empty field cleared or encounters a system bus error while processing an rx packet. it is a hardware-initiated stop indication (dma_ctrl[grs] being set by the user does not cause this bit to be set.). the current frame and all other frames directed to the halted queue are discarded. a write with a value of 1 re-enables the queue for receiving. 0 rxbd queue is enabled for ethernet reception. (that is, it is not halted.) 1 all ethernet controller receive activity to rxbd queue is halted.? 14.5.3.4.2, 14-39 replace figure 14-27 with the following figure: 0 789 31 r0 0000000 qhlt 000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4304; tsec2:0x2_5304
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-21 14.5.3.6.1, 14-47 replace figure 14-34 with the following figure: 14.5.3.6.1, 14-48 in table 14-32, add the following sentence to the maccfg1[rx_en] field description: ?if set, prior to clearing this bit, set dmactrl[grs] then confirm subsequent occurrence of the graceful receive stop interrupt (ievent[grsc] is set).? 14.5.3.6.1, 14-48 in table 14-32, add the following sentence to the maccfg1[tx_en] field description: ?if set, prior to clearing this bit, set dmactrl[gts] then confirm subsequent occurrence of the graceful transmit stop interrupt (ievent[gtsc] is set).? 14.5.3.6.6, 14-52 in table 14-37, clarify the bit description of the mgmt clock select field of the miimcfg register so that instead of concluding with ?... divided by eight.? the third sentence concludes with ?... divided first by eight and then futher divided by the following value:?. 14.5.3.6.12, 14-55 delete the first sentence and replace figure 14-45 with the following figure (exposing the link fail status field): 0 1 11 12 13 14 15 r soft_reset 00000 0 0 0 0 0 0 reset rx mc reset tx mc reset rx fun reset tx fun w reset 0000_0000_0000_0000 16 22 23 24 25 26 27 28 29 30 31 r 0 00000 0 loop back 00 rx_flow tx_flow sync?d rx en rx_en sync?d tx en tx_en w reset 0000_0000_0000_0000 offset tsec1:0x2_4500; tsec2:0x2_5500 0 21 22 23 28 31 r 000000000000000000000 0 excess defer 0 0000 link fail 00 0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_453c; tsec2:0x2_553c
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-22 freescale semiconductor revision history 14.5.3.6.12, 14-56 in table 14-43, replace the last row with the following rows: 14.5.3.6.12, 14-55 in figure 14-45, correct the reset value for the ifstat register to be 0x0000_0000. 14.5.3.7.44, 14-79 correct the first sentence to read: "carry register bits are cleared when written with a one." 14.5.3.7.45, 14-80 correct the first sentence to read: "carry register bits are cleared when written with a one." 14.5.3.7.47, 14-83 in figure 14-94, change bit 30 to be ?reserved?. 14.5.3.8.1, 14-84 change the third sentence of the first paragraph to read: ?when the da field of a receive frame is processed through a 32-bit crc generator, the 8 high-order bits (0?7) of the crc remainder are mapped to one of the 256 entries.? 14.5.3.8.1, 14-85 in table 14-93, add the following sentence to the iaddr n field description: ?for instance, the msb of iaddr0 correlates to entry 0 and the lsb of iaddr7 correlates to entry 255.? 14.5.3.8.2, 14-85 in table 14-94, add the following sentence to the gaddr n field description: ?for instance, the msb of gaddr0 correlates to entry 0 and the lsb of gaddr7 correlates to entry 255.? 14.5.3.9.2, 14-87 replace figure 14-98 with the following figure to correspond to table 14-96: 23?27 ? reserved 28 link fail link fail. this bit indicates the status of signal detection. 0 the100x module has detected a ?signal detect? for longer than 330 ms. 1 the100x module has detected a ?signal detect? for less than 330 ms or not at all. 29?31 ? reserved 0 1 2 15 16 17 18 31 r0 0 el 00 ei w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_4bfc; tsec2:0x2_5bfc
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-23 14.6.2.2, 14-108 replace the existing procedure list with the following list: ?following is a procedure to gracefully reset and reconfigure the mac: 1. set gts bit in dmactrl register 2. poll gtsc bit in ievent register until detected as set 3. clear both rx_en and tx_en bits in maccfg1 4. set grs bit in dmactrl register 5. poll grsc bit in ievent register until detected as set 6. set soft_reset bit in maccfg1 register 7. clear soft_reset bit in maccfg1 register 8. load tbase with new txbd pointer 9. load rbase with new rxbd pointer 10. set up other mac registers (maccfg1, maxfrm, and so on) 11. set wwr, wop, tod bits in dmactrl register 12. clear thlt bit in tstat register and qhlt bit in rstat register by writing 1 to these bits 13. clear grs/gts bits in dmactrl (do not change other bits) 14. enable tx_en/rx_en in maccfg1 register? 14.6.2.2, 14-108 insert the following step between steps 3 and (formerly) 4: "4. wait for a period of 9.6 kbytes worth of data on the interface (~8ms worst case)." 14.6.2.2, 14-109 correct step 11 of the graceful reset procedure to read: "11. set wwr and wop bits in dmactrl register" 14.6.2.3, 14-109 replace the second paragraph with the following: "if the user has a frame ready to transmit, a transmit-on-demand function may be emulated while in polling mode by using the graceful-transmit-stop feature. first, clear the imask[gtscen] bit to mask the graceful-transmit-stop complete interrupt. next set, then immediately clear the dmactrl[gts] bit. clear the resulting ievent[gtsc] bit. finally, the imask[gtscen] bit may be set once again." 14.6.2.3, 14-110 insert the following sentence between the third and (formerly) fourth sentences of the sixth paragraph: "the pause duration is defined by the received pause control frame and begins when the frame was first received."
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-24 freescale semiconductor revision history 14.6.2.6.2, 14-114 in the first paragraph, replace the third and fourth sentences with the following: ?the eight high-order bits of a cyclic redundancy check (crc) checksum are used to index into the hash table.? 14.6.2.6.3, 14-114 add the follo wing section after section 14 .6.2.6.2: 14.6.2.6.3 crc computation examples there are many algorithms for calculating the crc value of a number. refer to the rfc 3309 standard, which can be found at http://www.faqs.org/rfcs/rfc3309.html, to compute the crc value for the purposes of tsec. the rfc 3309 algorithm uses the following polynomial to calculate the crc value: x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x1+x0 or 0x04c11db7. given a destination mac address of da=01000ccccccc, the algorithm results in a crc remainder value of 0xa29f4bbc. bit-reversing the low-order byte of the crc value (0xbc) yields br_crc = 0x3d = 0b00 111101 the high-order 3-bits of the new br_crc value are used to select which 32-bit register (of the 8) to use. this example maps the da to register 1. high-order 3 bits of br_crc: ho_crc = 0b001 = 1 the low-order 5 bits are used to select which bit to set in the given register (with a value of 0 setting 0x8000_0000 and 31 setting 0x0000_0001). therefore, the example da maps to bit 29 of register 1. low-order 5 bits of br_crc: lo_crc = 0b11101 = 29 therefore, gaddr1 is ored with the value 0x0000_0004. additional calculated examples follow: example 1: destination mac address: da = 01005e000128 crc remainder value: crc = 0x821d6cd3 bit-reversed least-significant byte of crc value: br_crc = 0xcb = 0b11001011 high-order 3 bits of br_crc: ho_crc = 0b110 = 6
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-25 low-order 5 bits of br_crc: lo_crc = 0b01011 = 11 gaddr6 = 0x0010_0000 example 2: destination mac address: da = 0004f0604f10 crc remainder value: crc = 0x1f5a66b5 bit-reversed least-significant byte of crc value: br_crc = 0xad = 0b10101101 high-order 3 bits of br_crc: ho_crc = 0b101 = 5 low-order 5 bits of br_crc: lo_crc = 0b01101 = 13 gaddr5 = 0x0004_0000 14.6.2.8, 14-116 in table 14-115, c orrected the rxc description to read as follows: ?receive control: a control frame was received. as soon as the transmitter finishes sending the current frame, a pause operation is performed lasting for the duration specified in the received pause control frame and beginning when the frame was first received.? 14.6.2.11, 14-118 insert the following paragraph after the first paragraph: ?programming note: when the tsec encounters a halt condition (tstat[thlt] is set), it stops processing the frame at the current txbd. the tsec relies on the user to manage the buffer descriptor pointer, tbptr, or the buffer descriptor queue before resuming transmissions. once the tsec resumes, it fetches the txbd pointed to by tbptr.? 14.6.3, 14-120 between the second and third paragraph, add the following: ?the status field of the bd is 16-bit field, as is the length field. the data buffer pointer is a 32-bit field. therefore, the bds should be accessed with the following c structure: typedef unsigned short uint_16; /* choose 16-bit native type */ typedef unsigned int uint_32; /* choose 32-bit native type */ typedef struct bd_struct { uint_16 flags; uint_16 length; uint_32 bufptr; };?
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-26 freescale semiconductor revision history 14.6.3.2, 14-124 in table 14-120, change the lg bitfield description to read as follows: ?rx frame length violation. written by tsec. (only valid if l is set.) a frame length greater than maximum frame length was recognized while maccfg2[huge frame] was set. note, if maccfg2[huge frame] is cleared, the frame is truncated to the value programmed in the maximum frame length register.? 14.6.4, 14-125 change the first paragraph to read: ?some applications require the ability to identify selected portions of data within a frame?s data payload. this process is called extraction, although the data is not truly removed. rather than literarily extracting a section of the data and copying it into a new memory location, the data is placed in the l2 cache. this allows the processor to quickly access critical frame information as soon as the processor is ready without having to first fetch the data from main memory. this results in substantial improvement in throughput and hence reduction in latency.? 14.7.1.1, 14-129 i n table 14-123, add the following step immediately following the optional dmactrl initialization step: 14.7.1.2, 14-129 change the title of table 14-124 to read ?gmii interface mode signal configuration.? 14.7.1.2, 14-129 in table 14-124, remove the tx_clk signal from the list of gmii interface signals and reduce the total number of signals listed at the bottom to 22. 14.7.1.2, 14-132 in table 14-126, add the following step immediately following the optional dmactrl initialization step : 14.7.1.3, 14-136 in table 14-129, add the following step immediately following the optional dmactrl initialization step : 14.7.1.4, 14-137 change the title of table 14?130 to read ?rgmii interface mode signal configuration.? initialize fifo_pause_ctrl, fifo_pause_ctrl[0000_0000_0000_0000_0000_0000_0000_0010] initialize fifo_pause_ctrl, fifo_pause_ctrl[0000_0000_0000_0000_0000_0000_0000_0010] initialize fifo_pause_ctrl, fifo_pause_ctrl[0000_0000_0000_0000_0000_0000_0000_0010]
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-27 14.7.1.4, 14-140 in table 14-132, add the following step immediately following the optional dmactrl initialization step: 14.7.1.5, 14-144 in table 14-135, add the following step immediately following the optional dmactrl initialization step : chapter 15 correct the dma signal enumeration for consistency as in the following example: ?dma0_dreq? to ?dma_dreq0? 15.2.2, 15-5 and 15.4.1.3, 15-32 in the third bullet of the list of signals defined for the external control interface, clarify that the falling edge of dma_dreq sets mr n [cs] and for dma_ddone with the following: ?dma_ddone assertion indicates that the dma engine has completed the transfer. sr n [cb] is clear. note, however, that write data may still be queued at the target interface or in the process of transfer on an external interface.? 15.3.1, 15-7 in table 15-4, designate the following memory locations as ?reserved?: 0x2_112c 0x2_1148?0x2_117c 0x2_11ac 0x2_11c8?0x2_11fc 0x2_122c 0x2_1248?0x2_127c 0x2_12ac 0x2_12c8?0x2_12fc 15.3.2.5.1, 15-17 change the designation for the source address register when used for rapidio maintenance transactions from ?sarm n ? to ?sar n for rapidio maintenance transactions,? reflecting the fact that any single sar n register can assume one of two formats. 15.3.2.7.1, 15-20 change the designation for the destination address register when used for rapidio maintenance transactions from ?darm n ? to ?dar n for rapidio initialize fifo_pause_ctrl, fifo_pause_ctrl[0000_0000_0000_0000_0000_0000_0000_0010] initialize fifo_pause_ctrl, fifo_pause_ctrl[0000_0000_0000_0000_0000_0000_0000_0010]
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-28 freescale semiconductor revision history maintenance transactions,? reflecting the fact that any single dar n register can assume one of two formats. 15.3.2.10, 15-22 in figure15-17, correct the offset value for clsdar2 to 0x2_1234. 15.3.2.11, 15-23 in figure15-18, correct the offset value for the nlsdar n ?dma 2 next list descriptor address register to 0x2_123c. 15.5.1.1.1, 15-27 change step 1 in the sequence to read, ?poll the channel state (see table 15-21 "channel state table") to confirm that the specific dma channel is idle.? 15.5.1.1.2, 15-28 change step 1 in the sequence to read, ?poll the channel state (see table 15-21 "channel state table") to confirm that the specific dma channel is idle.? 15.5.1.1.3, 15-29 change step 2 in the sequence to read, ?poll the channel state (see table 15-21 "channel state table") to confirm that the specific dma channel is idle.? 15.5.1.1.4, 15-29 change step 3 in the sequence to read, ?poll the channel state (see table 15-21 "channel state table") to confirm that the specific dma channel is idle.? 15.5.1.2.3, 15-30 change step 2 in the sequence to read, ?poll the channel state (see table 15-21 "channel state table") to confirm that the specific dma channel is idle.? 15.5.1.2.4, 15-31 change step 3 in the sequence to read, ?poll the channel state (see table 15-21 "channel state table") to confirm that the specific dma channel is idle.? 15.4.1.3, 15-32 replace figure 15-22 with the following, showing more flexible negation of dreq : dreq clock dack ddone transfer start transfer in progress transfer done transfer start transfer pause transfer restart emp_en
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-29 15.5.1.2, 15-42 remove the last sentence of the second paragraph. 16.2, 16-12 in table 16-2, add the following to the timing description for the pci_perr signal: ? note: if a parity error occurs on the last data beat of a pci-x transaction with inbound data (outbound read with split completion data or inbound write), the MPC8540 asserts perr longer than permitted by the pci-x specification. this condition may cause a subsequent transaction to erroneously detect a parity error. the condition may be remedied by placing a stronger pull-up resistors on the perr signal. for example: 1 kohm for 133 mhz point-to-point operation 2 kohm for 66 mhz operation 4 kohm for 33 mhz operation. these values are stronger than the specification allows (5 kohm minimum for pull-up resistors).? 16.3.1.2, 16-20 add the following sentence to the end of the third paragraph: ?note that outbound translation windows must not overlap the configuration access registers.? 16.3.1.2.4, 16-22 in figure 16?9, add a footnote to en field (bit 0) that states, ? for powar0, translation is always enabled. the enable field (en) may be read and written, but the value is ignored.? 16.3.1.2.4, 16-22 in table 16?10, add the following to the description for bit 0 (en), ?note that for powar0, translation is always enabled. the enable field (en) may be read and written, but the value is ignored.? 16.3.1.2.4, 16?23 in table 16?10, add the following to the description for bits 26?31 (ows), ?also note that for powar0, setting ows to less than 4 gbytes causes addresses that miss in the other outbound windows to be aliased to the smaller address range defined by powar0[ows] and potar0.? 16.3.1.4, 16?27 insert the following between the second and third paragraphs: ?note that some errors are reported in two bits?one in the pci/x error detect register (err_dr) and another in the pci bus status register in the pci/x configuration header. these bits must be cleared separately; that is, clearing one does not clear the other. for example, clearing the err_dr[mstr abort error] does not clear the received master abort bit in the pci bus status register. in these cases, both bits must be cleared before further error reporting can occur. refer to table 16-57 for pci mode error actions and table 16-64 for pci-x mode error actions. likewise, some
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-30 freescale semiconductor revision history errors are enabled by programming two bits?one in the pci/x error enable register and another in the pci bus command register in the pci/x configuration header.? 16.3.1.4, 16?28 insert the following between the fourth and fifth paragraphs: ?if a data parity error occurs during an inbound configuration write access, the error is reported and captured. however, the erroneous data is written to the register specified in the transaction. therefore, pci data parity error recovery routines must include reinitialization of the pci/x configuration register if the error occurred during a configuration write.? 16.3.1.4.7, 16?32 add the following sentence before figure 16-21: ?note that for inbound reads that have data parity errors, only the address (err_addr and err_ext_addr) and attributes (err_attrib) are captured. the data is not captured.? 16.3.1.4.7, 16?32 add the following immediately before figure 16-21: ?also note that pci-x split completion error messages for outbound dword writes are incorrectly reported in the pci/x error data low capture register (err_dl).? 16.3.1.4.8, 16-33 add the following sentence before figure 16-22: ?note that for inbound reads that have data parity errors, only the address (err_addr and err_ext_addr) and attributes (err_attrib) are captured. the data is not captured.? 16.3.2, 16-35 insert the following after figure 16-26: ?note that software must be restricted from accessing any reserved or undefined register space on the MPC8540; doing so may hang the device.? 16.3.2.3, 16-37 in table 16-27, add the following sentence to the description of the bus master bit field: ?note that the bus master bit in the MPC8540?s pci bus command register must be set before any outbound configuration access is attempted.? 16.3.2.4, 16?37 insert the following between the first and second paragraphs: ?note that some errors are reported in two bits?one in the pci bus status register and another in the pci/x error detect register (err_dr). these bits must be cleared separately; that is, clearing one does not clear the other. for example, clearing the err_dr[mstr abort error] does not clear the received master abort bit in the pci bus status register. in these cases, both bits must be cleared before further error reporting can occur. refer to table 16-57 for pci mode error actions and table 16-64 for pci-x mode
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-31 error actions. likewise, some errors are enabled by programming two bits?one in the pci bus command register and another in the pci/x error enable register (err_en).? 16.3.2.9, 16-40 in figure 16-35, change the reset value from ?0000_0000? to ?0000_0000 (pci); 0000_1000 (pci-x)?. 16.3.2.19, 16-47 in table 16-46, change the description for bit 0 to read as follows: ?pci agent/host. read-only. indicates the reset value of the pci host/agent configuration signal, lwe3 . 0 pci interface is in host mode 1 pci interface is in agent mode? 16.4.1, 16-51 replace the second and third sentences of the third paragraph with the following: ?the state of the reset signal is reflected in bit 15 (read-only) of the pci bus arbitration control register (pbacr[pad]). note that pad is the inverse of the arbiter configuration signal; that is, when pad = 0 the arbiter is enabled, and when pad = 1 the arbiter is disabled.? 16.4.1.3, 16-53 add the following to the end of the first paragraph: ?note that the pci-x bus arbiter does not support the broken master lockout function.? 16.4.2.11.1, 16-69 insert the following between the first and second sentences in the first paragraph: ?note that the bus master bit in the MPC8540?s pci bus command register must be set before an outbound configuration access is attempted.? 16.4.2.11.2?16.4.2.11.3, 16-69?16-71 replace the existing sections with the following: 16.4.2.11.2 accessing the pci configuration space in host mode to access the configuration space, a 32-bit value must be written to the pci cfg_addr register that specifies the target pci bus, the target device on that bus, and the configuration register to be accessed within that device. note that the bus master bit in the MPC8540?s pci bus command register must be set before an outbound configuration access is attempted. device 0 on pci/x bus 0 is the MPC8540 itself; thus, device 0, bus 0 is used to access the internal pci/x configuration header. when the MPC8540 detects an access to pci cfg_data, it checks the enable flag and the device number in the pci cfg_addr register. if the
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-32 freescale semiconductor revision history enable bit is set, and the device number is not 0b1_1111, the MPC8540 performs a configuration cycle translation function and runs a configuration-read or configuration-write transaction on the pci bus. if the bus number corresponds to the local pci bus (bus number = 0x00), the MPC8540 performs a type 0 configuration cycle translation. if the bus number indicates a remote pci bus (that is, nonlocal), the MPC8540 performs a type 1 configuration cycle translation. the device number 0b1_ 1111 is used for performing interrupt-ac knowledge and special-cycle transactions. see section 16.4.2.12, ?other bus transactions,? for more information. see section 16.3.1.1, ?pci/x configuration address register (cfg_addr),? for details on pci cfg_addr and section 16.3.1.1.2, ?pci/x configuration data register (cfg_data),? for details on pci cfg_data. note that because all pci/x registers are intrinsically little-endian, in the following examples, the data in the configuration register is shown in little-endian order. powerpc processor accesses to the pci cfg_data register should use the load/store with byte-reversed instructions. external pci masters that use the local address map to access configuration space do not need to reverse bytes since byte lane redirection from the little-endian pci bus is performed internally. example: configuration sequence, 4-byte data read from the revision id/standard programming interface/subclass code/class code registers at address offset 0x08 of the pci/x configuration header (device 0 on the pci/x bus 0 is the MPC8540 itself). initial values: r0 contains 0x8000_0008 r1 contains ccsrbar + 0x0_8000 (address of pci cfg_addr register) r2 contains ccsrbar + 0x0_8004 (address of pci cfg_data register) r3 contains 0xffff_ffff register at 0x08 contains 0x0b20_0002 (0x0b to 0x08) code sequence: stw r0, 0 (r1) lwbrx r3, 0 (r2) results: address ccsrbar + 0x0_8000 contains 0x8000_0008 register r3 contains 0x0b20_0002
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-33 example: configuration sequence, 4-byte data write to pci/x register at address offset 0x14 of device 1 on pci/x bus 0. initial values: r0 contains 0x8000_0814 r1 contains ccsrbar + 0x0_8000 (address of pci cfg_addr register) r2 contains ccsrbar + 0x0_8004 (address of pci cfg_data register) r3 contains 0x1122_3344 register at 0x14 contains 0xffff_ffff (0x17 to 0x14) code sequence: stw r0, 0 (r1)// update pci cfg_addr register to point to //register offset 0x14 of device 1. stwbrx r3, 0 (r2) results: address ccsrbar + 0x0_8000 contains 0x8000_0814 register at 0x14 contains 0x1122_3344 (0x17 to 0x14) example: configuration sequence, 2-byte data write to pci register at address offset 0x1c of device 1 on pci/x bus 0. initial values: r0 contains 0x8000_081c r1 contains ccsrbar + 0x0_8000 r2 contains ccsrbar + 0x0_8004 r3 contains 0xddcc_bbaa register at 0x1c contains 0xffff_ffff (0x1f to 0x1c) code sequence: stw r0, 0 (r1) sthbrx r3, 0 (r2) results: address ccsrbar + 0x0_8000 contains 0x8000_081c register at 0x1c contains 0xffff_bbaa (0x1f to 0x1c) 16.4.2.11.3 pci configuration in agent and agent lock modes in general, agents should not access the configuration space of other external pci devices. configuration of agents is a function usually reserved for the host. when the MPC8540 is in agent mode, it responds to remote host-generated pci/x configuration cycles. this occurs when a configuration command is decoded along with the idsel input signal being asserted. when the MPC8540 is in agent lock mode, it retries all externally-generated pci/x configuration cycles until the acl bit in the pci bus function register (0x44) is set. see section 16.5.1, ?power-on reset configuration modes,? for more information.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-34 freescale semiconductor revision history in either agent or agent lock mode, access to the internal pci/x configuration header by the processor core is handled as described in section 16.4.2.11.2, ?accessing the pci configuration space in host mode,? using device = 0 and bus = 0 in pci cfg_addr to indicate the internal pci/x header. 16.4.2.13, 16-75 delete the second and third sentences in the first paragraph. 16.4.2.13.1, 16-75 delete the last paragraph. 16.4.2.13.2, 16-76 add the following between the first and second paragraphs: ?note that some errors are enabled by programming two bits?one in the pci bus command register and another in the pci/x error enable register (err_en). likewise, some errors are reported in two bits?one in the pci bus status register and another in the pci/x error detect register (err_dr). these bits must be cleared separately; that is, clearing one does not clear the other. for example, clearing the err_dr[mstr abort error] does not clear the received master abort bit in the pci bus status register. in these cases, both bits must be cleared before further error reporting can occur.? 16.4.3.6.4, 16-88 add the following new section that describes the pci-x split completion message: 16.4.3.6.4 split completion messages for pci-x split completion transactions that include a split completion error or split completion message, the transaction has a single dword data phase with the format shown in figure 16-78. figure 16-78. pci-x split completion message format table 16-62 describes the fields of the pci-x split completion message. message class message index 0 remaining lower address 31 28 27 20 19 18 16 remaining lower address (cont.) remaining byte count 15 12 11 0
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-35 16.4.3.7, 16-88 add the following two paragraphs at the beginning of the section: ?pci-x configuration transactions are similar to pci configuration transaction as described in section 16.4.2.11, ?configuration cycles.? the exceptions are noted in this section. there is a rare situation where an internal access (originating from either the processor core, or other i/o ports on the device) to the 256-byte pci-x configuration header may be corrupted by concurrent outbound pci-x data transactions. the corruption does not occur if the pci-x configuration transactions and the outbound pci-x data transactions are not concurrent. the corruption does not occur with inbound pci-x traffic. this is an issue for any system that mixes internally generated pci-x configuration transactions with outbound pci-x data transactions. there are two ways to avoid the situation: table 16-62. pci-x split completion message summary ad name description 31:28 message class a split completion message can be one of the following classes: 0x0 write completion 0x1 pci-x bridge error 0x2 completer error 0x3?0xfreserved 27:20 message index the message index identifies the type of message within the message class. for write completion message class: 0x00 normal completion for pci-x bridge error message class: 0x00 master-abort 0x01 target-abort 0x02 write data parity error for completer error message class: 0x00 byte count out-of-range error 0x01 split write data parity error 0x8n device-specific error 19 ? reserved 18:12 remaining lower address if the split request was a burst memory read transaction, the remaining lower address is the least significant seven bits of the first byte of data that has not been sent. if the split request was a dword transaction, the completer places all zeroes in this field. 1 1 note that the pci-x 1.0 specification states that if the split request is a dword transaction, the completer sets the remaining lower address field (bits 18?12) of the split completion message to zero. however, the MPC8540 deviates from the specification when the split request is a dword read transaction to the upper 32 bits of a quad word (that is, the address ends with 1xx); in this case, bit 14 of the split completion message is set to 1. 11:0 remaining byte count if the split request was a burst memory read transaction, the remaining byte count is the number of bytes that have not been sent. if the split request was a dword transaction, the completer places 0x004 in this field.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-36 freescale semiconductor revision history ensure that pci-x configuration transactions are completed before starting pci-x data transactions. ensure that all pci-x outbound data traffic is quiesced before attempting pci-x configuration transactions. the programmer must ensure all of the following: non-configuration transactions to pci-x from the processor core are quiesced. the core is not fetching instructions from pci-x. dma transactions to pci-x are quiesced. rapidio bridging transactions to pci-x are quiesced.? 16.4.3.7, 16-88 add the following before the first sentence: ?as is the case for pci configuration accesses, the bus master bit in the MPC8540?s pci bus command register must be set before an outbound configuration access is attempted.? 16.4.3.8.1, 16-91 add the following between the first and second paragraphs: ?note that some errors are enabled by programming two bits?one in the pci bus command register and another in the pci/x error enable register (err_en). likewise, some errors are reported in two bits?one in the pci bus status register and another in the pci/x error detect register (err_dr). these bits must be cleared separately; that is, clearing one does not clear the other. for example, clearing the err_dr[mstr abort error] does not clear the received master abort bit in the pci bus status register. in these cases, both bits must be cleared before further error reporting can occur.? 16.4.3.8.1, 16?93 add the following after table 16-64: ?when an outbound pci-x read transaction has been split and the split completion transaction indicates a master-abort or a target-abort, the split-completion error message (scem) data field contains information for setting the received master-abort or received target-abort bit in the pci bus status register (bits 13 and 12, respectively). however, for misaligned reads (that is, reads not aligned on a 64-bit boundary), the error is not reflected in the pci status register. the error is reported in the pci error detection register (err_dr) at 0x0_8e00. the master-abort or target-abort can be inferred from the error data capture register (err_dl). drivers that require this information can read the err_dr register rather than the pci bus status register.?
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-37 16.5.4, 16?95 add the following new section: 16.5.4 pci-x inbound reads that cross window boundaries for rev. 1 of the MPC8540, inbound pci-x read requests can cross a window boundary. for rev. 2, if an inbound pci-x read request crosses a window boundary, the MPC8540 responds with a split completion message indicating an error but does not return any data. this is a deviation from the pci-x specification which describes that data is returned up to the window boundary. 16.5.5, 16?95 add the following new section: 16.5.5 bridging between rapidio and pci/x the MPC8540 does not support bridging from rapidio according to the rapidio interoperability specification. if an external rapidio device tries to target the MPC8540 with a rapidio nwrite-r transaction or with any rapidio write at a priority level higher than 0, and the rapidio inbound atmu routes the transaction to the pci/pci-x interface, the MPC8540 could deadlock internally. therefore, the use of rapidio nwrite-r transactions must be avoided in bridging applications to the pci/x controller, and all rapidio writes targeting the pci/x controller must be of priority level 0. this means transaction ordering is relaxed because read responses will not necessarily push posted writes in the bridge, and writes will never bypass read requests. note that this specifically precludes the topology where two MPC8540s communicating with each other via pci or pci-x may deadlock when two rapidio devices (one on each MPC8540) are simultaneously performing priority-1 writes to targets on the remote MPC8540 through the pci/x link between the devices. to support such a topology, rapidio write transactions that bridge to the other MPC8540 must be priority 0. 17.3, 17-9?2-13 in table 17-6, correct the access designation for all rapidio registers listed as ?special? to ?r/w?.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-38 freescale semiconductor revision history 17.3.1.5, 17-16 in table 17-11, correct the pefcar[ctls] bitfield state description to read as follows: ?0 the rapidio controller does not support the large common transport route field. 1 the rapidio controller supports the large common transport route field." 17.3.1.20, 17-30 in table 17-26, add the following cross-reference to the field description for plmreqcsr[c]: ?see table 17-85 for command symbol formats.? 17.4.1, 17-83 in table 17-83, add the following to the "comments" field for "maintenance class" reads: "although possible to execute, rapidio maintenance reads from memory locations outside of the rapidio architectural memory space (0xc_0000?0xc_fffc) return unreliable data." 17.4.1, 17-86 in table 17-85, add the following to the "comments" field of the symbol type 5 (link request) control symbol format description: "note that the rapidio controller causes a checkstop if a software-initiated send training link request command collides with an inbound send training link request which is immediately followed by an inbound training pattern." 18.4, 18-4 in table 18-3, change the reset value of the gpindr register to be 0x nnnn _0000. 18.4.1.9, 18-11 in figure 18-9, change the reset value of the gpindr register to be nnnn _ nnnn_nnnn_nnnn_ 0000_0000_0000_0000. 18.4.1.14, 18-17 in table 18-17, change the bit ranges ?32?47? to ?0?15? and ?48?63? to ?16?31?. 18.5.1.5.3, 18-23 add the following sentence to the end of the first paragraph: ?note that the ddr controller does not shut down unless ddr_sdram_interval[refint] is set to a non-zero value. see section 9.4.1.7, ?ddr sdram interval configuration (ddr_sdram_interval) ,? for details.? 19.3.1, 19-4 in table 19-1, correct the name of the register with offset 0xe_1094 from pmlcb5 to pmlcb8.
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-39 20.2.1, 20-7 in table 20-2, add the following signals: 20.2.2.3, 20-9 in table 20-5, add the following signal descriptions: 20.3.1.2, 20-13 change the last sentence in the first paragraph to, ?note that the transaction address is qualified with the bits described in section 20.3.1.3, ?watchpoint monitor address mask register (wmamr),? before being compared with wmar. note also that the contents of wmar are not qualified with wmamr.? 20.3.1.3, 20-13 change the last part of the first sentence to be ?...contains the mask that is applied to a transaction address before the address is compared with wmar.? 20.3.2.2, 20-18 in the first sentence, replace ?tbcr[amd]? with ?tbcr0[amd]?. also, replace the last sentence of the first paragraph with the following, ?the transaction address is qualified with the bits described in section 20.3.2.3, ?trace buffer address mask register (tbamr), ? before being compared with tbar. note that the contents of tbar are not qualified with tbamr.? 20.3.2.3, 20-18 change the last part of the first sentence to be ?...contains the mask that is applied to a transaction address before the address is compared with tbar.? 20.3.2.4, 20-19 in the last sentence of the first paragraph, replace ?tbcr[tmd]? with ?tbcr0[tmd]?. lssd_ mode test test factory test. refer to the MPC8540 integrated processor hardware specifications for proper treatment. i20-9 l1_tstclk test test factory test. refer to the MPC8540 integrated processor hardware specifications for proper treatment. i20-9 l2_tstclk test test factory test. refer to the MPC8540 integrated processor hardware specifications for proper treatment. i20-9 lssd_mode i used for factory test. refer to the MPC8540 integrated processor hardware specifications for proper treatment. l1_tstclk i used for factory test. refer to the MPC8540 integrated processor hardware specifications for proper treatment. l2_tstclk i used for factory test. refer to the MPC8540 integrated processor hardware specifications for proper treatment.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-40 freescale semiconductor revision history 20.4.6.1, 20-29 in table 20-27, replace the ?function? description of the cmdbc field with the following: ?byte count. range: 32 to 1 where a value of 0 indicates 32 bytes. 00000 = 32 bytes 00001 = 1 byte 00010 = 2 bytes ... 11110 = 30 bytes 11111 = 31 bytes? 20.4.6.1, 20-30 and 20-31 change all instances of ?trsel? and ?trsel1? to ?ifsel? and all instances of ?tbcr? to ?tbcr1?. 21.2, 21-5 in the first bullet item of the fec features list, change ?820.3x? to ?802.3x.? 21.5.2, 21-10 in table 21-3, add the following row: 21.5.2, 21-11 in table 21-3, change the reset value for the fec ifstat register to be 0x0000_0000. 21.5.3.1.1, 21-14 in table 21 -4, correct the ievent[rxc] bitfield description to read as follows: ?receive control interrupt. a control frame was received. if maccfg1[rx_flow] is set, a pause operation is performed lasting for the duration specified in the received pause control frame and beginning when the frame was received. 0 control frame not received 1 control frame received? 21.5.3.1.1, 21-14 in table 21-4, replace the eberr field description with: ?ethernet bus error. this bit indicates that a system bus error for a memory read ocurred while a dma transaction was underway. if the eberr is set while transmission is in progress, the dma stops sending data to the tx fifo which eventually causes an underrun error (xfun) and tstat[thlt] is set. if the eberr is set while receiving a frame, the dma discards the frame and rstat[qhlt] is set. 0 no system bus error occurred. 1 system bus error occurred.? 0x2_604c fifo_pause_ctrl?fifo pause control register r/w 0x0000_0000 14.5.3.2.1/a-19
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-41 21.5.3.1.2, 21-16 replace the last sentence in the first paragraph with: ?the interrupt signal can be cleared by clearing the corresponding ievent bit.? 21.5.3.1.3, 21-17 undocument bitfields txedis, crl/xdadis, and xfundis. 21.5.3.1.6, 21-20 remove all references to bitfield dmactrl[tod]. this bit position (29) is now reserved. 21.5.3.2.1, 21-21 insert the following section as the first subsection of section 21. 5.3.2: 21.5.3.2.1 fifo pause control register (fifo_pause_ctrl) fifo_pause_ctrl, shown in figure 21-11, is writable by the user to configure the properties of the fec fifo. table 21-10 describes the fields of the fifo_pause_ctrl register. 21.5.3.3.1, 21-24 in table 21-13, repla ce the bitfield description of tctrl[tfc_pause] with the following: ?transmit flow control pause frame. use this bit to transmit a pause frame. to transmit a flow control pause frame, first set fifo_pause_ctrl[tfc_pause_en]. next, set maccfg1[gts]. if 0 15 r000000000000 0 0 0 0 w reset 0000_0000_0000_0000 16 29 30 31 r000000000000 0 0 tfc_pause_en 0 w reset 0000_0000_0000_0000 offset 0x2_604c figure 21-11fifo_pause_ctrl register definition table21-10fifo_pause_ctrl field descriptions bits name description 0?29 ? reserved. 30 tfc_pause_en tfc_pause enable. this bit enables the ability to transmit a pause control frame by setting the tctrl[tfc_pause] bit. this bit is cleared at reset. 0 pause control frame transmission disabled. 1 pause control frame transmission enabled. 31 ? reserved.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-42 freescale semiconductor revision history tfc_pause is then set, the mac stops transmission of data frames after the current transmission completes. the gtsc interrupt in the ievent register is asserted. with transmission of data frames stopped, the mac transmits a mac control pause frame with the duration value obtained from the ptv register. the txc interrupt occurs after sending the control pause frame. next, the mac clears tfc_pause and resumes transmitting data frames. note that if the transmitter is paused due to user assertion of gts or reception of a pause frame, the mac may still transmit a mac control pause frame. 0 no outstanding pause frame transmission request. 1 pause frame transmission requested.? 21.5.3.4.2, 21-31 in table 21-22, replace the description for the rstat[qhlt] field with the following: ?rxbd queue is halted. when ievent[bsy] or ievent[eberr] is set during reception of a packet, rstat[qhlt] is also set. in order to begin receiving packets again, the user must clear rstat[qhlt]. this bit is set whenever the fec reads an rxbd with its empty field cleared or encounters a system bus error while processing an rx packet. it is a hardware-initiated stop indication (dma_ctrl[grs] being set by the user does not cause this bit to be set.). the current frame and all other frames directed to the halted queue are discarded. a write with a value of 1 re-enables the queue for receiving. 0 rxbd queue is enabled for ethernet reception. (that is, it is not halted.) 1 all ethernet controller receive activity to rxbd queue is halted.? 21.5.3.4.2, 21-30 replace figure 21-23 with the following figure: 21.5.3.6.1, 21-37 in table 21-28, add the following sentence to the maccfg1[rx_en] field description: ?if set, prior to clearing this bit, set dmactrl[grs] then confirm subsequent occurrence of the graceful receive stop interrupt (ievent[grsc] is set).? 0789 31 r0 0000000 qhlt 0 0 0 00000000000000000000 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset 0x2_6304
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-43 21.5.3.6.1, 21-37 in table 21-28, add the following sentence to the maccfg1[tx_en] field description: ?if set, prior to clearing this bit, set dmactrl[gts] then confirm subsequent occurrence of the graceful transmit stop interrupt (ievent[gtsc] is set).? 21.5.3.6.6, 21-41 in figure 21-34, change the reset value for the fec ifstat register to be 0x0000_0000. 21.5.3.6.6, 21-40 and 21-41 delete the first sentence and replace figure 21-35 with the following figure (exposing the link fail status field): 21.5.3.6.6, 21-41 in table 21-34, replace the last row with the following rows: 21.5.3.7.1, 21-43 change the second sentence of the first paragraph to read: ?when the da field of a receive frame is processed through a 32-bit crc generator, the 8 high-order bits (0?7) of the crc remainder are mapped to one of the 256 entries.? 21.5.3.7.1, 21-43 in table 21-36, add the following sentence to the iaddr n field description: ?for instance, the msb of iaddr0 correlates to entry 0 and the lsb of iaddr7 correlates to entry 255.? 21.5.3.7.2, 21-44 in table 21-37, add the following sentence to the gaddr n field description: ?for instance, the msb of gaddr0 correlates to entry 0 and the lsb of gaddr7 correlates to entry 255.? 0 21 22 23 28 31 r 000000000000000000000 0 excess defer 0 0000 link fail 00 0 w reset 0000_0000_0000_0000_0000_0000_0000_0000 offset tsec1:0x2_453c; tsec2:0x2_553c 23?27 ? reserved 28 link fail link fail. this bit indicates the status of signal detection. 0 the100x module has detected a ?signal detect? for longer than 330 ms. 1 the100x module has detected a ?signal detect? for less than 330 ms or not at all. 29?31 ? reserved
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-44 freescale semiconductor revision history 21.6.2.2, 21-48 replace the soft reset steps with the following: 1.set gts bit in dmactrl register. 2.poll gtsc bit in ievent register until detected as set. 3.clear both rx_en and tx_en bits in maccfg1. 4.wait for a period of 9.6 kbytes worth of data on the interface (~8ms worst case). 5.set grs bit in dmactrl register. 6.poll grsc bit in ievent register until detected as set. 7.set soft_reset bit in maccfg1 register. 8.clear soft_reset bit in maccfg1 register. 9.load tbase with new txbd pointer. 10.load rbase with new rxbd pointer. 11.set up other mac registers (maccfg2, maxfrm, and so on). 12.set wwr and wop bits in dmactrl register. 13.clear thlt bit in tstat register and qhlt bit in rstat register by writing 1 to these bits. 14.clear grs/gts bits in dmactrl. (do not change other bits.) 15.enable tx_en/rx_en in maccfg1 register. 21.6.2.3, 21-49 replace the second paragraph with the following: "if the user has a frame ready to transmit, a transmit-on-demand function may be emulated while in polling mode by using the graceful-transmit-stop feature. first, clear the imask[gtscen] bit to mask the graceful-transmit-stop complete interrupt. next set, then immediately clear the dmactrl[gts] bit. clear the resulting ievent[gtsc] bit. finally, the imask[gtscen] bit may be set once again." 21.6.2.3, 21-50 insert the following sentence between the third and (formerly) fourth sentences of the sixth paragraph: "the pause duration is defined by the received pause control frame and begins when the frame was first received." 21.6.2.5.2, 21-54 replace the third and fourth sentences of the first paragraph with the following: ?the eight high-order bits of a cyclic redundancy check (crc) checksum are used to index into the hash table.?
changes from revision 0 to revision 1 MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor a-45 21.6.2.5.3, 21-54 add the follo wing section after section 21.6.2.5.2: 21.6.2.5.3 crc computation examples there are many algorithms for calculating the crc value of a number. refer to the rfc 3309 standard, which can be found at http://www.faqs.org/rfcs/rfc3309.html, to compute the crc value for the purposes of tsec. the rfc 3309 algorithm uses the following polynomial to calculate the crc value: x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x1+x0 or 0x04c11db7. given a destination mac address of da=01000ccccccc, the algorithm results in a crc remainder value of 0xa29f4bbc. bit-reversing the low-order byte of the crc value (0xbc) yields br_crc = 0x3d = 0b00 111101 the high-order 3-bits of the new br_crc value are used to select which 32-bit register (of the 8) to use. this example maps the da to register 1. high-order 3 bits of br_crc: ho_crc = 0b001 = 1 the low-order 5 bits are used to select which bit to set in the given register (with a value of 0 setting 0x8000_0000 and 31 setting 0x0000_0001). therefore, the example da maps to bit 29 of register 1. low-order 5 bits of br_crc: lo_crc = 0b11101 = 29 therefore, gaddr1 is ored with the value 0x0000_0004. additional calculated examples follow: example 1: destination mac address: da = 01005e000128 crc remainder value: crc = 0x821d6cd3 bit-reversed least-significant byte of crc value: br_crc = 0xcb = 0b11001011 high-order 3 bits of br_crc: ho_crc = 0b110 = 6 low-order 5 bits of br_crc: lo_crc = 0b01011 = 11 gaddr6 = 0x0010_0000 example 2: destination mac address: da = 0004f0604f10 crc remainder value: crc = 0x1f5a66b5
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 a-46 freescale semiconductor revision history bit-reversed least-significant byte of crc value: br_crc = 0xad = 0b10101101 high-order 3 bits of br_crc: ho_crc = 0b101 = 5 low-order 5 bits of br_crc: lo_crc = 0b01101 = 13 gaddr5 = 0x0004_0000 21.6.2.7, 21-56 in table 21-44, c orrected the rxc description to read as follows: ?receive control: a control frame was received. as soon as the transmitter finishes sending the current frame, a pause operation is performed lasting for the duration specified in the received pause control frame and beginning when the frame was first received.? 21.6.3.2, 21-63 in table 21-48, change the lg bitfield description to read: ?rx frame length violation. written by tsec. (only valid if l is set.) a frame length greater than maximum frame length was recognized while maccfg2[huge frame] was set. note, if maccfg2[huge frame] is cleared, the frame is truncated to the value programmed in the maximum frame length register.? 21.6.4, 21-64 replace the first paragraph with the following: ?some applications require the ability to identify selected portions of data within a frame?s data payload. this process is called extraction although the data is not truly removed. rather than literarily extracting a section of the data and copying it into a new memory location, the data is placed in the l2 cache. this allows the processor to quickly access critical frame information as soon as the processor is ready without having to first fetch the data from main memory. this results in substantial improvement in throughput and hence reduction in latency.? 21.7.1.1, 21-66 in table 21-50, remove the sixth initialization step. 21.7.1.1, 21-66 i n table 21-50, add the following step immediately following the optional dmactrl initialization step: initialize fifo_pause_ctrl, fifo_pause_ctrl[0000_0000_0000_0000_0000_0000_0000_0010]
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor glossary-1 glossary of terms and abbreviations the glossary contains an alphabetical list of terms, phrases, and abbreviations used in this reference manual. a architecture. a detailed specification of requirements for a processor or computer system. it does not specify details of how the processor or computer system must be implemented; instead it provides a template for a family of compatible implementations . atomic access. a bus access that attempts to be part of a read-write operation to the same address uninterrupted by any other access to that address (the term refers to the fact that the transactions are indivisible). the powerpc architecture implements atomic accesses through the lwarx / stwcx. instruction pair. autobaud. the process of determining a serial data rate by timing the width of a single bit. b beat. a single state on the bus interface that may extend across multiple bus cycles. a transaction can be composed of multiple address or data beats . big endian. a byte-ordering method in memory where the address n of a word corresponds to the most-significant byte . in an addressed memory word, the bytes are ordered (left to right) 0, 1, 2, 3, with 0 being the most-significant byte . see little endian . boundedly undefined. a characteristic of certain operation results that are not rigidly prescribed by the powerpc architecture. boundedly- undefined results for a given operation may vary among implementations and between execution attempts in the same implementation. although the architecture does not prescribe the exact behavior for when results are allowed to be boundedly undefined, the results of executing instructions in contexts where results are allowed to be boundedly undefined are constrained to ones that could have been achieved by executing an arbitrary sequence of defined instructions, in valid form, starting in the state the machine was in before attempting to execute the given instruction. breakpoint . a programmable event that forces the core to take a breakpoint exception.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 glossary-2 freescale semiconductor burst. a multiple-beat data transfer whose total size is typically equal to a cache block. bus clock. clock that causes the bus state transitions. bus master. the owner of the address or data bus; the device that initiates or requests the transaction. c cache. high-speed memory containing recently accessed data or instructions (subset of main memory). cache block. a small region of contiguous memory that is copied from memory into a cache . the size of a cache block may vary among processors; the maximum block size is one page . in powerpc processors, cache coherency is maintained on a cache-block basis. note that the term ?cache block? is often used interchangeably with ?cache line.? cache coherency. an attribute wherein an accurate and common view of memory is provided to all devices that share the same memory system. caches are coherent if a processor performing a read from its cache is supplied with data corresponding to the most recent value written to memory or to another processor?s cache. cache flush. an operation that removes from a cache any data from a specified address range. this operation ensures that any modified data within the specified address range is written back to main memory. this operation is generated typically by a data cache block flush ( dcbf ) instruction. caching-inhibited. a memory update policy in which the cache is bypassed and the load or store is performed to or from main memory. cast out. a cache block that must be written to memory when a cache miss causes a cache block to be replaced. changed bit. one of two page history bits found in each page table entry (pte). the processor sets the changed bit if any store is performed into the page . see also page access history bits and referenced . clean. an operation that causes a cache block to be written to memory, if modified, and then left in a valid, unmodified state in the cache. clear. to cause a bit or bit field to register a value of zero. see also set .
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor glossary-3 completer. in pci-x, a completer is the device addressed by a transaction (other than a split completion transaction). if a target terminates a transaction with a split response, the completer becomes the initiator of the subsequent split completion. context synchronization. an operation that ensures that all instructions in execution complete past the point where they can produce an exception , that all instructions in execution complete in the context in which they began execution, and that all subsequent instructions are fetched and executed in the new context. context synchronization may result from executing specific instructions (such as isync or rfi ) or when certain events occur (such as an exception). copy-back operation. a cache operation in which a cache line is copied back to memory to enforce cache coherency. copy-back operations consist of snoop push-out operations and cache cast-out operations. d direct-mapped cache. a cache in which each main memory address can appear in only one location within the cache; operates more quickly when the memory request is a cache hit. double data rate. memory that allows data transfers at the start and end of a clock cycle. thereby doubling the data rate. e effective address (ea). the 32-bit address specified for a load, store, or an instruction fetch. this address is then submitted to the mmu for translation to either a physical memory or an i/o address. exclusive state. mei state (e) in which only one caching device contains data that is also in system memory. f frame-check sequence (fcs). specifies the standard 32-bit cyclic redundancy check (crc) obtained using the standard ccitt-crc polynomial on all fields except the preamble, sfd, and crc. fetch. retrieving instructions from either the cache or main memory and placing them into the instruction queue. flush. an operation that causes a cache block to be invalidated and the data, if modified, to be written to memory.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 glossary-4 freescale semiconductor g general-purpose register (gpr). any of the 32 registers in the general-purpose register file. these registers provide the source operands and destination results for all integer data manipulation instructions. integer load instructions move data from memory to gprs and store instructions move data from gprs to memory. guarded. the guarded attribute pertains to out-of-order execution. when a page is designated as guarded, instructions and data cannot be accessed out-of-order. h harvard architecture. an architectural model featuring separate caches and other memory management resources for instructions and data. i ieee 754. a standard written by the institute of electrical and electronics engineers that defines operations and representations of binary floating-point numbers. illegal instructions. a class of instructions that are not implemented for a particular powerpc processor. these include instructions not defined by the powerpc architecture. in addition, for 32-bit implementations, instructions that are defined only for 64-bit implementations are considered to be illegal instructions. for 64-bit implementations instructions that are defined only for 32-bit implementations are considered to be illegal instructions. implementation. a particular processor that conforms to the powerpc architecture, but may differ from other architecture-compliant implementations for example in design, feature set, and implementation of optional features. the powerpc architecture has many different implementations. imprecise exception . a type of synchronous exception that is allowed not to adhere to the precise exception model (see precise exceptions ). the powerpc architecture allows only floating-point exceptions to be handled imprecisely. inbound atmu windows . mappings that perform address translation from the external address space to the local address space, attach attributes and transaction types to the transaction, and map the transaction to its target interface. inter-packet gap. the gap between the end of one ethernet packet and the beginning of the next transmitted packet.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor glossary-5 integer unit. an execution unit in the core responsible for executing integer instructions. in-order. an aspect of an operation that adheres to a sequential model. an operation is said to be performed in-order if, at the time that it is performed, it is known to be required by the sequential execution model. instruction latency. the total number of clock cycles necessary to execute an instruction and make ready the results of that instruction. k kill. an operation that causes a cache block to be invalidated without writing any modified data to memory. l latency. the number of clock cycles necessary to execute an instruction and make ready the results of that execution for a subsequent instruction. l2 cache. level-2 cache. see secondary cache . least-significant bit (lsb). the bit of least value in an address, register, field, data element, or instruction encoding. least-significant byte (lsb). the byte of least value in an address, register, data element, or instruction encoding. little endian. a byte-ordering method in memory where the address n of a word corresponds to the least-significant byte . in an addressed memory word, the bytes are ordered (left to right) 3, 2, 1, 0, with 3 being the most-significant byte . see big endian . local access window. mapping used to translate a region of memory to a particular target interface, such as the ddr sdram controller or the pci controller. the local memory map is defined by a set of eight local access windows. the size of each window can be configured from 4 kbytes to 2 gbytes. m media access control (mac) sublayer . sublayer that provides a logical connection between the mac and its peer station. its primary responsibility is to initialize, control, and manage the connection with the peer station. medium-dependent interface (mdi) sublayer ?sublayer that defines different connector types for different physical media and pmd devices.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 glossary-6 freescale semiconductor media-independent interface (mii) sublayer. sublayer that provides a standard interface between the mac layer and the physical layer for 10/100-mbps operations. it isolates the mac layer and the physical layer, enabling the mac layer to be used with various implementations of the physical layer. mei (modified/exclusive/invalid). cache coherency protocol used to manage caches on different devices that share a memory system. note that the powerpc architecture does not specify the implementation of a mei protocol to ensure cache coherency. memory access ordering. the specific order in which the processor performs load and store memory accesses and the order in which those accesses complete. memory-mapped accesses. accesses whose addresses use the page or block address translation mechanisms provided by the mmu and that occur externally with the bus protocol defined for memory. memory coherency. an aspect of caching in which it is ensured that an accurate view of memory is provided to all devices that share system memory. memory consistency. refers to agreement of levels of memory with respect to a single processor and system memory (for example, on-chip cache, secondary cache, and system memory). memory management unit (mmu). the functional unit that is capable of translating an effective (logical) address to a physical address, providing protection mechanisms, and defining caching methods. modified state. mei state (m) in which one, and only one, caching device has the valid data for that address. the data at this address in external memory is not valid. most-significant bit (msb). the highest-order bit in an address, registers, data element, or instruction encoding. most-significant byte (msb). the highest-order byte in an address, registers, data element, or instruction encoding. n nan. an abbreviation for not a number; a symbolic entity encoded in floating-point format. there are two types of nans?signaling nans and quiet nans. no-op. no-operation. a single-cycle operation that does not affect registers or generate bus activity.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor glossary-7 o ocean (on-chip network). non-blocking crossbar switch fabric. enables full duplex port connections at 128gb/s concurrent throughput and independent per port transaction queuing and flow control. permits high bandwidth, high performance, as well as the execution of multiple data transactions. outbound atmu windows. mappings that perform address translations from local 32-bit address space to the address spaces of rapidio or pci/pci-x, which may be much larger than the local space. outbound atmu windows also map attributes such as transaction type or priority level. p packet. a unit of binary data that can be routed through a network. sometimes packet is used to refer to the frame plus the preamble and start frame delimiter (sfd). page. a region in memory. the oea defines a page as a 4-kbyte area of memory aligned on a 4-kbyte boundary. page access history bits. the changed and referenced bits in the pte keep track of the access history within the page. the referenced bit is set by the mmu whenever the page is accessed for a read or write operation. the changed bit is set when the page is stored into. see changed bit and referenced bit . page fault. a page fault is a condition that occurs when the processor attempts to access a memory location that does not reside within a page not currently resident in physical memory . on powerpc processors, a page fault exception condition occurs when a matching, valid page table entry (pte[v] = 1) cannot be located. page table. a table in memory is comprised of page table entries , or ptes. it is further organized into eight ptes per pteg (page table entry group). the number of ptegs in the page table depends on the size of the page table (as specified in the sdr1 register). page table entry (pte). data structures containing information used to translate effective address to physical address on a 4-kbyte page basis. a pte consists of 8 bytes of information in a 32-bit processor and 16 bytes of information in a 64-bit processor. physical coding sublayer (pcs). sublayer responsible for encoding and decoding data stream to and from the mac sublayer. medium (1000basex) 8b/10b coding is used for fiber. medium (1000baset) 8b1q coding is used for unshielded twisted pair (utp).
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 glossary-8 freescale semiconductor physical medium attachment (pma) sublayer. sublayer responsible for serializing code groups into a bit stream suitable for serial bit-oriented physical devices (serdes) and vice versa. synchronization is also performed for proper data decoding in this sublayer. the pma sits between the pcs and the pmd sublayers. physical medium dependent (pmd) sublayer. sublayer responsible for signal transmission. the typical pmd functionality includes amplifier, modulation, and wave shaping. different pmd devices may support different media. physical memory. the actual memory that can be accessed through the system?s memory bus. pipelining. a technique that breaks operations, such as instruction processing or bus transactions, into smaller distinct stages or tenures (respectively) so that a subsequent operation can begin before the previous one has completed. precise exceptions. a category of exception for which the pipeline can be stopped so instructions that preceded the faulting instruction can complete and subsequent instructions can be flushed and redispatched after exception handling has completed. see imprecise exceptions . primary opcode. the most-significant 6 bits (bits 0?5) of the instruction encoding that identifies the type of instruction. program order. the order of instructions in an executing program. more specifically, this term is used to refer to the original order in which program instructions are fetched into the instruction queue from the cache. protection boundary. a boundary between protection domains . protection domain. a protection domain is a segment, a virtual page, a bat area, or a range of unmapped effective addresses. it is defined only when the appropriate relocate bit in the msr (ir or dr) is 1. q quad word . a group of 16 contiguous locations starting at an address divisible by 16. quiesce. to come to rest. the processor is said to quiesce when an exception is taken or a sync instruction is executed. the instruction stream is stopped at the decode stage and executing instructions are allowed to complete to create a controlled context for instructions that may be affected by out-of-order, parallel execution. see context synchronization .
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor glossary-9 r ra. the r a instruction field is used to specify a gpr to be used as a source or destination. rb. the r b instruction field is used to specify a gpr to be used as a source. rd. the r d instruction field is used to specify a gpr to be used as a destination. rs. the r s instruction field is used to specify a gpr to be used as a source. rapidio. high-performance, packet-switched, interconnect architecture that provides reliability, increased bandwidth, and faster bus speeds in an intra-system interconnect. designed to be compatible with integrated communications processors, host processors, and networking digital signal processors, record bit. bit 31 (or the rc bit) in the instruction encoding. when it is set, updates the condition register (cr) to reflect the result of the operation. reconciliation sublayer. sublayer that maps the terminology and commands used in the mac layer into electrical formats appropriate for the physical layer entities. referenced bit. one of two page history bits found in each page table entry . the processor sets the referenced bit whenever the page is accessed for a read or write. see also page access history bits . requester. in pci-x, a requester is an initiator that first introduces a transaction into the pci-x domain. if a transaction is terminated with a split response, the requester becomes the target of the subsequent split completion. reservation. the processor establishes a reservation on a cache block of memory space when it executes an lwarx instruction to read a memory semaphore into a gpr. reservation station. a buffer between the dispatch and execute stages that allows instructions to be dispatched even though the results of instructions on which the dispatched instruction may depend are not available. risc (reduced instruction set computing). an architecture characterized by fixed-length instructions with nonoverlapping functionality and by a separate set of load and store instructions that perform memory accesses.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 glossary-10 freescale semiconductor s secondary cache. a cache memory that is typically larger and has a longer access time than the primary cache. a secondary cache may be shared by multiple devices. also referred to as l2, or level-2, cache. sequence. in pci-x, a sequence is one or more transactions associated with carrying out a single logical transfer by a requester. each transaction in the same sequence carries the same unique sequence id. set ( v ) . to write a nonzero value to a bit or bit field; the opposite of clear . the term ?set? may also be used to generally describe the updating of a bit or bit field. set ( n ) . a subdivision of a cache . cacheable data can be stored in a given location in one of the sets, typically corresponding to its lower-order address bits. because several memory locations can map to the same location, cached data is typically placed in the set whose cache block corresponding to that address was used least recently. see set associative . set associative. aspect of cache organization in which the cache space is divided into sections, called sets . the cache controller associates a particular main memory address with the contents of a particular set, or region, within the cache. slave. the device addressed by a master device. the slave is identified in the address tenure and is responsible for supplying or latching the requested data for the master during the data tenure. snooping. monitoring addresses driven by a bus master to detect the need for coherency actions. snoop push. response to a snooped transaction that hits a modified cache block. the cache block is written to memory and made available to the snooping device. stall. an occurrence when an instruction cannot proceed to the next stage. sticky bit . a bit that when set must be cleared explicitly. superscalar machine. a machine that can issue multiple instructions concurrently from a conventional linear instruction stream. supervisor mode. the privileged operation state of a processor. in supervisor mode, software, typically the operating system, can access all control registers and can access the supervisor memory space, among other privileged operations.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor glossary-11 synchronization. a process to ensure that operations occur strictly in order . see context synchronization . synchronous exception. an exception that is generated by the execution of a particular instruction or instruction sequence. there are two types of synchronous exceptions, precise and imprecise . system memory. the physical memory available to a processor. t time-division multiplex (tdm). a single serial channel used by several channels taking turns. tenure. the period of bus mastership. there can be separate address bus tenures and data bus tenures. tlb (translation lookaside buffer). a cache that holds recently-used page table entries . throughput. the measure of the number of instructions that are processed per clock cycle. transaction. a complete exchange between two bus devices. a transaction is typically comprised of an address tenure and one or more data tenures, which may overlap or occur separately from the address tenure. a transaction may be minimally comprised of an address tenure only. transfer termination. signal that refers to both signals that acknowledge the transfer of individual beats (of both single-beat transfer and individual beats of a burst transfer) and to signals that mark the end of the tenure. u user mode. the operating state of a processor used typically by application software. in user mode, software can access only certain control registers and can access only user memory space. no privileged operations can be performed. also referred to as problem state. v virtual address. an intermediate address used in the translation of an effective address to a physical address. virtual memory. the address space created using the memory management facilities of the processor. program access to virtual memory is possible only when it coincides with physical memory .
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 glossary-12 freescale semiconductor w way. a location in the cache that holds a cache block, its tags, and status bits. word. a 32-bit data element. write-back. a cache memory update policy in which processor write cycles are directly written only to the cache. external memory is updated only indirectly, for example, when a modified cache block is cast out to make room for newer data. write-through. a cache memory update policy in which all processor write cycles are written to both the cache and memory.
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor index 1-1 index 1 register index (memory-mapped registers) a aicar (rapidio assembly information capability register), 17-15 aidcar (rapidio assembly identity capability register), 17-14 altcar (alternate configuration attribute address register), 4-6 altcbar (alternate configuration base address register), 4-6 ana (tsec an advertisement register), 14-94 anlpanp (tsec an link partner ability next page register), 14-99 anlpbpa (tsec an link partner base page ability register), 14-96 annpt (tsec an next page transmit register), 14-98 attr (fec attribute register), 21-46 attr (tsec attribute register), 14-89 attreli (fec attribute extract length and extract index register), 21-47 attreli (tsec attribute extract length and extract index register), 14-90 b bcr n (dma 0?3 byte count registers), 15-23 bdidcsr (rapidio base device id command and status register), 17-25 bptr (boot page translation register), 4-8 br n (lbc base registers 0?7), 13-11 c cam1 (tsec carry mask register 1), 14-85 cam2 (tsec carry mask register 2), 14-86 capture_address (ddr memory error address capture register), 9-24 capture_attributes (ddr memory error attributes capture register), 9-23 capture_data_hi (ddr memory data path read capture high register), 9-19 capture_data_lo (ddr memory data path read capture low register), 9-20 capture_ecc (ddr memory data path read capture ecc register), 9-20 car1 (tsec carry register 1), 14-82 car2 (tsec carry register 2), 14-84 ccidr (current context id register), 20-24 ccsrbar (configuration, control, and status registers base address register), 4-4-4-5 cfg_addr (pci/x configuration address register), 16-18 cfg_data (pci/x configuration data register), 16-19 cisr0 (pic critical interrupt summary register 0), 10-27 cisr1 (pic critical interrupt summary register 1), 10-28 clkocr (clock out select register), 18-18 clndar n (dma 0?3 current link descriptor address registers), 15-14 clsdar n (dma 0?3 current list-alternate base descriptor address registers), 15-24 cr (rapidio configuration register), 17-34 cr (tsec control register), 14-92 crbptr (fec current receive buffer descriptor pointer register), 21-33 crbptr (tsec current receive buffer descriptor pointer register), 14-44 cs n bnds (ddr chip select 0?3 bounds registers), 9-10 cs n config (ddr chip select 0?3 configuration registers), 9-10 ctbptr (fec current transmit buffer descriptor pointer register), 21-27 ctbptr (tsec current transmit buffer descriptor pointer register), 14-36 ctcsr (rapidio component tag command and status register), 17-26 ctpr0 (pic per-cpu processor current task priority register), also mapped as global ctpr, 10-40 d dar n (dma 0?3 destination address registers), 15-21 dar n (dma 0?3 destination address registers for rapidio maintenance writes), 15-22 data_err_inject_hi (ddr memory data path error injection mask high register), 9-17 data_err_inject_lo (ddr memory data path error injection mask low register), 9-18 datr n (dma 0?3 destination attributes registers), 15-19 ddr_sdram_cfg (ddr sdra m control configuration register), 9-14 ddr_sdram_interval (ddr sdram interval configuration register), 9-16
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 index 1-2 freescale semiconductor e?i ddr_sdram_mode (ddr sdram mode configuration register), 9-16 ddrdllcr (ddr dll control register), 18-19 devdisr (device disable control register), 18-13 dgsr (dma general status register), 15-26 dicar (rapidio device information capability register), 17-14 didcar (rapidio device identity capability register), 17-13 dmactrl (fec dma control register), 21-20 dmactrl (tsec dma control register), 14-28 dmr (rapidio doorbell mode register), 17-77 docar (rapidio destination operations capability register), 17-19 dqdpar (rapidio doorbell queue dequeue pointer address register), 17-79 dqepar (rapidio doorbell queue enqueue pointer address register), 17-80 dsr (rapidio doorbell status register), 17-78 dsr n (dma 0?3 destination stride registers), 15-26 e ecc_err_inject (ddr memory data path error injection mask ecc register), 9-18 ecntrl (tsec ethernet control register), 14-25 edis (fec error disabled register), 21-18 edis (tsec error disabled register), 14-24 eeadr (ecm error address capture register), 8-8 eeatr (ecm error attributes capture register), 8-7 eebacr (ecm ccb address configuration register), 8-3 eebpcr (ecm ccb port configuration register), 8-4 eedr (ecm error detect register), 8-5 eeer (ecm error enable register), 8-6 eidr n (pic external interrupt destination registers 0?11), 10-33 eivpr n (pic external interrupt vector/priority registers 0?11), 10-32 eoi0 (pic per-cpu processor end of interrupt register) also mapped as global eoi, 10-42 err_addr (pci/x error address capture register), 16-33 err_attrib (pci/x error attributes register), 16-32 err_cap_dr (pci/x error capture disable register), 16-30 err_detect (ddr memory error detect register), 9-21 err_dh (pci/x error data high capture register), 16-34 err_disable (ddr memory error disable register), 9-21 err_dl (pci/x error data low capture register), 16-34 err_dr (pci/x error detect register), 16-29 err_en (pci/x error enable register), 16-31 err_ext_addr (pci/x error extended address capture register), 16-34 err_int_en (ddr memory error interrupt enable register), 9-22 err_sbe (ddr single-bit ecc memory error management register), 9-25 exst (tsec extended status register), 14-100 f fifo_tx_starve (fec fifo transmit starve register), 21-24 fifo_tx_starve (tsec fifo transmit starve register), 14-32 fifo_tx_starve_shutoff (fec fifo transmit starve shutoff register), 21-24 fifo_tx_starve_shutoff (tsec fifo transmit starve shutoff register), 14-32 fifo_tx_thr (fec fifo transmit threshold register), 21-23 fifo_tx_thr (tsec fifo transmit threshold register), 14-31 frr (pic feature reporting register), 10-16 g gaddr n (fec group address registers 0?7), 21-46 gaddr n (tsec group address registers 0?7), 14-88 gas_timr (pci/x gasket timer register), 16-35 gcr (pic global configuration register), 10-17 gpindr (general-purpose input data register), 18-12 gpiocr (gpio control register), 18-10 gpoutdr (general-purpose output data register), 18-11 gpporcr (general-purpose por configuration register), 18-9 gtbcr n (pic global timer 0?3 base count registers), 10-21 gtccr n (pic global timer 0?3 current count registers), 10-21 gtdr n (pic global timer 0?3 destination registers), 10-23 gtvpr n (pic global timer 0?3 vector/priority registers), 10-22 h hafdup (fec half-duplex register), 21-41 hafdup (tsec half-duplex register), 14-53 hbdidlcsr (rapidio host base device id lock command and status register), 17-26 i i2cadr (i 2 c address register), 11-5 i2ccr (i 2 c control register), 11-6 i2cdfsrr (i 2 c digital filter sampling rate register), 11-10 i2cdr (i 2 c data register), 11-9 i2cfdr (i 2 c frequency divider register), 11-5 i2csr (i 2 c status register), 11-7
j?m MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor index 1-3 iack0 (pic per-cpu processor interrupt acknowledge register), also mapped as global iack, 10-41 iaddr n (fec individual address registers 0?7), 21-45 iaddr n (tsec individual address registers 0?7), 14-88 ievent (fec interrupt event register), 21-13 ievent (tsec interrupt event register), 14-20 ifqdpar (rapidio inbound frame queue dequeue pointer address register), 17-75 ifqepar (rapidio inbound frame queue enqueue pointer address register), 17-76 ifstat (fec interface status register), 21-43 ifstat (tsec interface status register), 14-58 iidpr n (pic internal interrupt destination registers 0?31), 10-35 iivpr n (pic internal interrupt vector/priority registers 0?31), 10-34 imask (fec interrupt mask register), 21-16 imask (tsec interrupt mask register), 14-23 imr (rapidio inbound mailbox mode register), 17-72 int_ack (pci/x interrupt acknowledge register), 16-20 ipgifg (fec inter-packet gap/inter-frame gap register), 21-41 ipgifg (tsec inter-packet gap/inter-frame gap register), 14-52 ipidr n (pic per-cpu interprocessor interrupt dispatch registers 0?3), 10-39 ipivpr n (pic ipi vector/priority registers 0?3), 10-19 irqsr0 (pic irq_out summary register 0), 10-26 irqsr1 (pic irq_out summary register 1), 10-27 isr (rapidio inbound mailbox status register), 17-74 j jd (tsec jitter diagnostics register), 14-101 l l2captdatahi (l2 error capture data high register), 7-15 l2captdatalo (l2 error capture data low register), 7-15 l2captecc (l2 error syndrome register), 7-13, 7-16 l2cewar n (l2 cache external write address registers 0?3), 7-10 l2cewcr n (l2 cache external write control registers 0?3), 7-10 l2ctl (l2 control register), 7-7 l2erraddr (l2 error address capture register), 7-15, 7-20 l2errattr (l2 error attributes capture register), 7-15, 7-19 l2errctl (l2 error control register), 7-15, 7-20 l2errdet (l2 error detect register), 7-15, 7-16 l2errdis (l2 error disable register), 7-15, 7-17 l2errinjctl (l2 error injection mask control register), 7-13, 7-14 l2errinjhi (l2 error injection mask high register), 7-13 l2errinjlo (l2 error injection mask low register), 7-13, 7-14 l2errinten (l2 error interrupt enable register), 7-15, 7-18 l2srbar n (l2 memory-mapped sram base address registers 0?1), 7-11 lawar n (local access window 0?7 attributes registers), 2-6 lawbar n (local access window 0?7 base address registers), 2-6 lbcr (lbc configuration register), 13-31 lbdllcr (lbc dll control register), 18-20 lcrr (lbc clock ratio register), 13-32 lcsba1csr (rapidio local configuration space base address 1 command and status register), 17-24 lsdmr (lbc sdram mode register), 13-22 lsrt (lbc sdram refresh timer), 13-25 ltear (lbc transfer error address register), 13-30 lteatr (lbc transfer error attributes register), 13-29 ltedr (lbc transfer error disable register), 13-27 lteir (lbc transfer error interrupt register), 13-28 ltesr (lbc transfer error status register), 13-26 lurt (upm refresh timer), 13-24 m maccfg1 (fec mac configuration register 1), 21-38 maccfg1 (tsec mac configuration register 1), 14-49 maccfg2 (fec mac configuration register 2), 21-40 maccfg2 (tsec mac configuration register 2), 14-51 macstnaddr1 (fec station address part 1 register), 21-43 macstnaddr1 (tsec station address part 1 register), 14-59 macstnaddr2 (fec station address part 2 register), 21-44 macstnaddr2 (tsec station address part 2 register), 14-60 mar (upm address register), 13-18 maxfrm (fec maximum frame length register), 21-42 maxfrm (tsec maximum frame length register), 14-54 mcpsumr (machine check summary register), 18-16 mdr (upm data register), 13-22 mer (pic message enable register), 10-31 midr n (pic messaging interrupt destination registers 0?3), 10-37 miimadd (tsec mii management address register), 14-56 miimcfg (tsec mii management configuration register), 14-54 miimcom (tsec mii management command register), 14-55 miimcon (tsec mii management control register), 14-57 miimind (tsec mii management indicator register), 14-58 miimstat (tsec mii management status register), 14-57
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 index 1-4 freescale semiconductor n?p minflr (fec minimum frame length register), 21-18 minflr (tsec minimum frame length register), 14-26 mivpr n (pic messaging interrupt vector/priority registers 0?3), 10-36 mrblr (fec maximum receive buffer length register), 21-34 mrblr (tsec maximum receive buffer length register), 14-44 mr n (dma 0?3 mode registers), 15-10 mrtpr (lbc memory refresh timer prescaler register), 13-21 msgr n (pic message registers 0?3), 10-30 msr (pic message status register), 10-31 msr (rapidio mailbox command and status register), 17-22 m x mr (lbc upm a?c mode registers), 13-19-13-21 n nlndar n (dma 0?3 next link descriptor address registers), 15-23 nlsdar n (dma 0-3 next list descriptor address register), 15-25 o odatr (rapidio outbound destination attributes register), 17-70 odcr (rapidio outbound double-word count register), 17-71 odpr (rapidio outbound destination port register), 17-70 odqdpar (rapidio outbound descriptor queue dequeue pointer address register), 17-68 odqepar (rapidio outbound descriptor queue enqueue pointer address register), 17-72 omr (rapidio outbound mode register), 17-65 or n (lbc options registers 0?7), 13-12-13-18 osar (rapidio outbound source address register), 17-69 osr (rapidio outbound status register), 17-67 ostbd (fec out-of-sequence txbd register), 21-29 ostbd (tsec out-of-sequence txbd register), 14-38 ostbdp (fec out-of-sequence tx data buffer pointer register), 21-31 ostbdp (tsec out-of-sequence tx data buffer pointer register), 14-40 p pccsr (rapidio port control command and status register), 17-33 pci configuration header registers, 16-36-16-53 see also general index pcidr (programmed context id register), 20-24 pcix_timr (pci-x split completion timer register), 16-36 pcr (rapidio port configuration register), 17-35 pecr (rapidio port error control register), 17-52 pecr x (rapidio packet error registers) see pepr1 x and pepr2 x pefcar (rapidio processing element features capability register), 17-15 peir (rapidio port error injection register), 17-35 pellccsr (rapidio processing element logical layer control command and status register), 17-24 pepcsr0 (rapidio port error packet/control symbol register 0), 17-52 pepr1 (rapidio port error packet register 1), 17-53 pecr1t1 (packet error capture register 1, type 1), 17-53 pecr1t10 (packet error capture register 1, type 10), 17-56 pecr1t11 (packet error capture register 1, type 11), 17-57 pecr1t13 (packet error capture register 1, type 13), 17-58 pecr1t2 (packet error capture register 1, type 2), 17-54 pecr1t5 (packet error capture register 1, type 5), 17-54 pecr1t6 (packet error capture register 1, type 6), 17-55 pecr1t8r (packet error capture register 1, type 8 response), 17-56 pecr1t8rq (packet error capture register 1, type 8 request), 17-55 pepr2 (rapidio port error packet register 2), 17-58 pecr2t10 (packet error capture register 2, type 10), 17-60 pecr2t11 (packet error capture register 2, types 11 and 13), 17-61 pecr2t125 (packet error capture register 2, types 1, 2, and 5), 17-58 pecr2t6 (packet error capture register 2, type 6), 17-59 pecr2t8r (packet error capture register 2, type 8 response), 17-60 pertr (rapidio port error recovery threshold register), 17-64 pescsr (rapidio port error and status command and status register), 17-31 pgccsr (rapidio port general control command and status register), 17-29 pir (pic processor initialization register), 10-18 pitar n (pci/x inbound translation address registers 1?3), 16-25 piwar n (pci/x inbound window attributes registers 1?3), 16-26 piwbar n (pci/x inbound window base address registers 1?3), 16-25 piwbear n (pci/x inbound window base extended address registers 1?3), 16-26 plascsr (rapidio port local ackid status command and status register), 17-31 plmreqcsr (rapidio port link maintenance request command and status register), 17-29
r?r MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor index 1-5 plmrespcsr (rapidio port link maintenance response command and status register), 17-30 pltoccsr (rapidio port link time-out control command and status register), 17-27 pmbh0csr (rapidio 8/16 lp-lvds port maintenance block header 0 command and status register), 17-27 pmc n (performance monitor counters 0?8), 19-9 pmgc0 (performance monitor global control register 0), 19-5 pmlca0 (performance monitor local control register a0), 19-6 pmlca n (performance monitor local control registers a1?a8), 19-6 pmlcb0 (performance monitor local control register b0), 19-7 pmlcb n (performance monitor local control registers b1?b8), 19-8 pm n mr0 (pic performance monitor 0?3 mask registers (lower)), 10-29 pm n mr1 (pic performance monitor 0?3 mask registers (upper)), 10-30 pmuxcr (alternate function signal multiplex control), 18-12 pnfedir (rapidio port notification/fatal error disable register), 17-47 pnfedr (rapidio port notification/fatal error detect register), 17-44 pnfeier (rapidio port notification/fatal error interrupt enable register), 17-49 porbmsr (por boot mode status register), 4-14, 4-15, 4-16, 18-5 pordbgmsr (por debug mode status register), 4-20, 4-21, 18-9 pordevsr (por i/o device status register), 4-16, 4-17, 4-18, 4-19, 4-20, 18-7 porimpscr (por i/o impedance status and control register), 4-19, 18-6 porpllsr (por pll ratio status register), 4-12, 4-13, 18-4 potar n (pci/x outbound translation address registers 0?4), 16-21 potear n (pci/x outbound translation extended address registers 0?4), 16-21 powar n (pci/x outbound window attributes registers 0?4), 16-22 powbar n (pci/x outbound window base address registers 0?4), 16-22 powmgtcsr (power management status and control register), 18-15 predr (rapidio port recoverable error detect register), 17-61 prtoccsr (rapidio port response time-out control command and status register), 17-28 prtr (rapidio port retry threshold register), 17-64 ptv (fec pause time value register), 21-19 ptv (tsec pause time value register), 14-27 pvr (processor version register), 18-17 pwdcsr (rapidio port-write and doorbell command and status register), 17-22 pwmr (rapidio port-write mode register), 17-81 pwqbar (rapidio port-write queue base address register), 17-83 pwsr (rapidio port-write status register), 17-82 r raln (tsec receive alignment error counter register), 14-68 rbase (fec receive descriptor base address register), 21-35 rbase (tsec receive descriptor base address register), 14-45 rbca (tsec receive broadcast packet counter register), 14-66 rbdlen (fec rxbd data length register), 21-33 rbdlen (tsec rxbd data length register), 14-42 rbptr (fec receive buffer descriptor pointer register), 21-35 rbptr (tsec receive buffer descriptor pointer register), 14-45 rbyt (tsec receive byte counter register), 14-64 rcde (tsec receive code error counter register), 14-69 rcse (tsec receive carrier sense error counter register), 14-70 rctrl (fec receive control register), 21-31 rctrl (tsec receive control register), 14-41 rdrp (tsec receive dropped packet counter register), 14-72 rflr (tsec receive frame length error counter register), 14-69 rfrg (tsec receive fragments counter register), 14-71 riwar n (rapidio inbound window attributes registers 0?4), 17-42 riwbar n (rapidio inbound window base address registers 1?4), 17-41 riwtar n (rapidio inbound window translation address registers 0?4), 17-40 rjbr (tsec receive jabber counter register), 14-72 rmca (tsec receive multicast packet counter register), 14-66 rovr (tsec receive oversize packet counter register), 14-71 rowar n (rapidio outbound window attributes registers 0?8), 17-39 rowbar n (rapidio outbound window base address registers 1?8), 17-38
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 index 1-6 freescale semiconductor s?t rowtar n (rapidio outbound window translation address registers 0?8) for maintenance transactions, 17-38 rowtar n (rapidio outbound window translation address registers 0?8) for standard transactions, 17-37 rpkt (tsec receive packet counter register), 14-65 rstat (fec receive status register), 21-32 rstat (tsec receive status register), 14-41 rund (tsec receive undersize packet counter register), 14-70 rxcf (tsec receive control frame packet counter register), 14-67 rxic (tsec receive interrupt coalescing configuration register), 14-43 rxpf (tsec receive pause frame packet counter register), 14-67 rxuo (tsec receive unknown opcode packet counter register), 14-68 s sar n (dma 0?3 source address registers), 15-18 sar n (dma 0?3 source address registers for rapidio maintenance reads), 15-19 satr n (dma 0?3 source attributes registers), 15-16 socar (rapidio source operations capability register), 17-17 spicar (rapidio switch port information capability register), 17-17 sr (tsec status register), 14-93 sr n (dma 0?3 status registers), 15-13 ssr n (dma 0?3 source stride registers), 15-25 svr (pic spurious vector register), 10-19 svr (system version register), 18-18 t tbacr (trace buffer access control register), 20-22 tbadhr (trace buffer access data high register), 20-22 tbadr (trace buffer access data register), 20-23 tbamr (trace buffer address mask register), 20-19 tbar (trace buffer address register), 20-19 tbase (fec transmit descriptor base address register), 21-28 tbase (tsec transmit descriptor base address register), 14-37 tbca (tsec transmit broadcast packet counter register), 14-74 tbcr n (trace buffer control registers 0?1), 20-16 tbdlen (fec txbd data length register), 21-27 tbdlen (tsec txbd data length register), 14-35 tbicon (tsec tbi control register), 14-102 tbipa (tsec tbi physical address register), 14-29 tbptr (fec transmit buffer descriptor pointer register), 21-28 tbptr (tsec transmit buffer descriptor pointer register), 14-37 tbsr (trace buffer status register), 20-21 tbtmr (trace buffer transaction mask register), 20-20 tbyt (tsec transmit byte counter register), 14-73 tcr (pic timer control register), 10-24 tctrl (fec transmit control register), 21-25 tctrl (tsec transmit control register), 14-33 tdfr (tsec transmit deferral packet counter register), 14-75 tdrp (tsec drop frame counter register), 14-79 tedf (tsec transmit excessive deferral packet counter register), 14-76 tfcs (tsec transmit fcs error counter register), 14-80 tfrg (tsec transmit fragment counter register), 14-82 tfrr (pic timer frequency reporting register), 10-20 timing_cfg_1 (ddr sdram timing configuration register 1), 9-11 timing_cfg_2 (ddr sdram timing configuration register 2), 9-13 tjbr (tsec jabber frame counter register), 14-79 tmca (tsec transmit multicast packet counter register), 14-74 tncl (tsec transmit total collision counter register), 14-78 tosr (trigger output source register), 20-25 tovr (tsec transmit oversize frame counter register), 14-81 tpkt (tsec transmit packet counter register), 14-73 tr127 (tsec transmit and receive 65- to 127-byte frame counter register), 14-61 tr1k (tsec transmit and receive 512- to 1023-byte frame counter register), 14-63 tr255 (tsec transmit and receive 128- to 255-byte frame counter register), 14-62 tr511 (tsec transmit and receive 256- to 511-byte frame counter register), 14-62 tr64 (tsec transmit and receive 64-byte frame counter register), 14-61 trmax (tsec transmit and receive 1024- to 1518-byte frame counter register), 14-63 trmgv (tsec transmit and receive 1519- to 1522-byte vlan frame counter register), 14-64 tscl (tsec transmit single collision packet counter register), 14-76 tstat (fec transmit status register), 21-26 tstat (tsec transmit status register), 14-34 tund (tsec transmit undersize frame counter register), 14-81 txcf (tsec transmit control frame counter register), 14-80
u?w MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor index 1-7 txcl (tsec excessive collision packet counter register), 14-78 txic (tsec transmit interrupt coalescing configuration register), 14-35 txpf (tsec transmit pause control frame counter register), 14-75 u uafr n (duart alternate function registers 0?1), 12-17 udlb n (duart divisor least significant byte registers 0?1), 12-7 udmb n (duart divisor most significant byte registers 0?1), 12-7 udsr n (duart dma status registers 0?1), 12-6, 12-18 ufcr n (duart fifo control registers 0?1), 12-11 uier (duart interrupt enable register), 12-9 uiir n (duart interrupt id registers 0?1), 12-10 ulcr n (duart line control registers 0?1), 12-12 ulsr n (duart line status registers 0?1), 12-15 umcr n (duart modem control registers 0?1), 12-14 umsr n (duart modem status registers 0?1), 12-16 urbr n (duart receiver buffer registers 0?1), 12-3, 12-6 uscr n (duart scratch registers 0?1), 12-17 uthr n (duart transmitter holding registers 0?1), 12-3, 12-6 v vir (pic vendor id register), 10-17 w whoami0 (pic per-cpu who am i register?p0) also mapped as global whoami, 10-41 wmamr (watchpoint monitor address mask register), 20-14 wmar (watchpoint monitor address register), 20-13 wmcr n (watchpoint monitor control registers 0?1), 20-11 wmsr (watchpoint monitor status register), 20-16 wmtmr (watchpoint monitor transaction mask register), 20-14
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 index 1-8 freescale semiconductor w?w
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor index 2-1 index 2 general index a accumulator (acc), 6-50 acronyms and abbreviated terms, list, lxxxviii address maps addressing on pci/pci-x bus, 16-59 device address map overview, 1-20 address mask (lbc), 13-13 address multiplexing (lbc sdram), 13-54 address translation and mapping units (atmus) inbound windows, 2-9 illegal interactions between inbound atmus and local access windows, 2-9 pci/pci-x?4 windows, 2-9, 16-24 rapidio?4 windows plus default, 2-9, 17-40-17-43, 17-107-17-109 local access windows, 2-3-2-9 see also local access windows outbound windows, 2-8 pci/pci-x?4 windows, 16-20 rapidio?8 windows plus default, 17-37-17-40, 17-106-17-107 processing across the ocean fabric, 1-20 address translation, see e500 core, memory management unit (mmu) addressing pci bus addressing, 16-60 configuration space, 16-60 i/o space, 16-60 memory space, 16-59 alignment, byte (pci/pci-x), 16-61 application examples, 1-21-1-24 control processing, 1-21 apus accumulator, 6-50 arbitration i 2 c interface arbitration control, 11-14 loss of arbitration?forcing of slave mode, 11-23 procedure for arbitration, 11-14 pci/pci-x, 16-5, 16-53 architecture, overview of device, 1-8 asleep (global utilities asleep) signal, 18-2, 18-24 at m u s , see address translation and mapping units b bbear (branch buffer address register), see e500 core, registers bbtar (branch buffer target address register), see e500 core, registers block diagrams ddr controller, 9-1, 9-25 debug modes, watchpoint monitor, and trace buffer, 20-1 dma controller, 15-1 duart, 12-2 e500 coherency module (ecm), 8-1 e500 core complex, 5-1 fec, 21-5 i 2 c interface, 11-1 interrupt controller (pic), 10-1, 10-43 l2 cache/sram, 7-1 local bus controller (lbc), 13-1 pci/pci-x controller, 16-1 performance monitor, 19-2 tsec, 14-6 book e architecture, see e500 core, book e architecture boot mode cpu holdoff (por), 4-15, 8-4 por status register (porbmsr), 18-5 boot page translation, 4-7 boot rom location (por), 4-14 boot sequencer boot holdoff mode (por), 4-16, 8-4 boot page translation, 4-7 i 2 c interface, 11-2, 11-17-11-19 overview, 1-16, 4-8 por configuration, 4-16 bucsr (branch unit control and status register), see e500 core, registers buffer descriptors see fec controller, buffer descriptors see tsec, buffer descriptors burst operations (pci) see pci/pci-x controller, bus protocol bus operations pci/pci-x, see pci/pci-x controller, bus protocol byte alignment (pci/pci-x), 16-61
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 index 2-2 freescale semiconductor c?d c chaining performance monitor events, 19-27 ckstp_in (global utilities checkstop in) signal, 18-3 ckstp_out (global utilities checkstop out) signal, 18-3 clk_out (global utilities clock out) signal, 18-3, 18-18 clocks clock out (clk_out), see global utilities ddr clock distribution, 9-27, 9-38 device clock signals summary, 4-3 see also signals, clock device clocking operation, 4-23-4-26 ccb (platform) clock, 4-23 ethernet clocks, 4-25 overview, 1-20 rapidio clocks, 4-24 system clock/pci clock, 4-23 e500 core clock multipliers, 5-11 see also clocks, por settings i 2 c clock stretching, 11-17 clock synchronization, 11-16 input synchronization and digital filter, 11-16 lbc bus clocks and clock ratios, 13-4 clock ratio register (lcrr), 13-32 pci/pci-x clocking, 16-57, 16-62 por settings e500 core pll ratio, 4-13 rapidio transmit clock source, 4-18 system/ccb pll ratio, 4-12 tsec inputs and outputs, 14-11 management clock out (ec_mdc), 14-55 coherency rules l1 caches, 5-28 l2 cache, 7-22 commands pci, see pci/pci-x controller configuration ddr, 9-10-9-17, 9-28 ecm ccb address configuration register (eebacr), 8-3 ccb port configuration register (eebpcr), 8-4 lbc configuration register (lbcr), 13-31 sdram configurations supported, 13-51 pci configuration cycles, 16-70 configuration space header, 16-70 host accessing pci configuration space, 16-72 type 0 configuration translation, 16-74 type 1 configuration translation, 16-76 pci-x configuration transactions, 16-93 pic global configuration register, 10-17 por, see power-on-reset (por) rapidio configuration/error injection registers, 17-34-17-36 tsec interfaces, 14-131-14-151 configuration space pci/pci-x addressing, 16-60 configuration, control, and status accessing ccsr memory from external masters, 2-11 accessing ccsrs, 4-4 alternate configuration space (altbar and altcar), 4-5 boot page translation, 4-7 ccsr and rapidio registers, 2-15 ccsr memory map, 2-10-2-16 ccsrbar update guidelines, 4-4 memory map/register definition, 4-3 organization of ccsr memory, 2-11 context id registers, 20-24-20-25 conventions notational, lxxxvii core complex bus (ccb), see e500 core, core complex bus (ccb) cr (condition register), see e500 core, registers critical interrupts see also interrupt controller (pic), critical interrupts see e500 core, critical interrupts csrr0 (critical save/restore register 0), see e500 core, registers csrr1 (critical save/restore register 1), see e500 core, registers ctr (count register), see e500 core, registers cts , see duart_cts [0:1] d dac n (data address compare registers 1?2), see e500 core, registers data cache see also e500 core, l1 caches data cache, see l2 cache/sram data processing with the e500 coherency module (ecm), 1-21 dbcr n (debug control register 0?2), see e500 core, registers dbsr (debug status register), see e500 core, registers ddr controller address signal mappings, 9-4 block diagram, 9-1, 9-25 clock distribution, 9-38 dll operation, 9-27
d?d MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor index 2-3 configuration, example, 9-28 data beat ordering, 9-45 debug mode signal selection (por), 4-20, 4-21 source and target id, 20-4, 20-26 dll control (global utilities), 18-19 error checking and correcting (ecc), 9-46 testing ecc with error injection, 9-17-9-19 error handling, 9-19, 9-48 features, 9-2 functional description, 9-25 initialization/application information, 9-49 interrupts, 9-22 memory map, 9-9 modes of operation, 9-3 overview, 1-14 page mode and logical bank retention, 9-45 performance monitor events, 19-16 register descriptions, 9-9 by acronym, see register index configuration registers, 9-10-9-17 error handling registers, 9-19-9-25 error injection registers, 9-17-9-19 sdram operation, 9-30 address multiplexing, 9-31 initialization sequence, 9-50 jedec standard interface commands, 9-32 mode-set command timing, 9-38 organizations supported, 9-31 refresh operation, 9-41 power-saving modes, 9-43 timing, 9-42 registered dimm mode, 9-39 timing, 9-34 write timing adjustments, 9-40 self-refresh in sleep mode, 9-44 signals summary, 9-3 see also signals, ddr dear (data exception address register), see e500 core, registers debug modes and watchpoint monitor signals summary, 20-6 see also signals, debug and watchpoint monitor/trace buffer block diagram, 20-1 ddr signal selection (por) ecc pins used for debug, 4-21 ddr source id debug modes, 20-4, 20-26 source id on debug signals, 20-28 source id on ecc pins, 20-28 ddr/lbc signal selection (por), 4-20 e500 core registers, 6-42-6-48 features, 20-3 functional description, 20-26 lbc source id debug mode, 13-4, 20-4, 20-26 memory map/register definition, 20-10 modes of operation (set at por), 20-3 overview, 20-2 pci/pci-x debug configuration (por), 4-20 source id debug mode, 20-5, 20-26 performance monitor events, 19-26 por status (global utilities), 18-9 ready negation, 4-2 software debug context id registers, 20-24 trace buffer, see trace buffer watchpoint, see watchpoint monitor dec (decrementer register), see e500 core, registers decar (decrementer auto-reload register), see e500 core, registers delay-locked loops (dlls) ddr dll control, 18-19 lbc dll control, 18-20 dma channel 2 and 3 signal select, 18-12 dma controller block diagram, 15-1 channel operation, 15-28 bandwidth control, 15-36 channel abort, 15-35 channel state, 15-36 stride size and distance, 15-36 descriptor formats, 15-37 error handling, 15-37 features, 15-2 functional description, 15-28 interrupts, 15-10-15-14, 15-16, 15-24, 15-27, 15-37 limitations and restrictions, 15-40 memory map/register definition, 15-6 modes of operation, 15-2 basic mode transfer, 15-29 basic chaining mode, 15-31 basic chaining single-write start mode, 15-31 basic direct mode, 15-29 basic direct single-write start mode, 15-30 channel continue mode for cascading transfer chains, 15-34 basic channel continue mode, 15-35 extended mode, 15-35 extended dma mode transfer, 15-32 extended chaining mode, 15-32 extended chaining single-write start mode, 15-33 extended direct mode, 15-32 extended direct single-write start mode, 15-32 external control mode transfer, 15-33
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 index 2-4 freescale semiconductor e?e overview, 1-18, 15-1 performance monitor events, 19-18 register descriptions, 15-10-15-28 by acronym, see register index signal select?channel 2 and 3, 18-12, 18-29 signals summary, 15-5 see also signals, dma controller system considerations, 15-41 unusual scenarios, 15-43 dma to configuration and control registers, 15-44 dma to duart, 15-44 dma to e500 core, 15-43 dma to ethernet, 15-44 dma to i2c, 15-44 transfer interfaces, 15-37 dma_dack [0:3] (dma acknowledge) signals, 15-6 dma_ddone [0:3] (dma done) signals, 15-6 dma_dreq [0:3] (dma request) signals, 15-6 doorbell message controller see rapidio controller, message unit doze mode, 1-19, 18-23 see also global utilities, power management duart asynchronous communication bits, 12-2 parity bit, 12-22 start bit, 12-21 stop bit, 12-22 baud-rate generator logic, 12-22 block diagram, 12-2 divisor latch access bit (ulcr n [dlab]), 12-4, 12-12 error handling, 12-23 framing error, 12-9, 12-16, 12-21, 12-22, 12-23 overrun error, 12-23 parity error, 12-23 errors detected, 12-3 features, 12-2 functional description, 12-20 initialization/application information, 12-25 interrupts interrupt control logic, 12-25 interrupt enable and control registers, 12-9-12-11 memory map/register definition, 12-4 modes of operation, 12-3 dma mode selection, 12-24 fifo mode, 12-24 interrupts, 12-24 local loop-back mode, 12-22 overview, 1-16, 12-1 pc16450 uart compatibility, 12-2 performance monitor events, 19-27 register descriptions, 12-4, 12-6-12-20 by acronym, see register index uart0 register offsets, 12-4 uart1 register offsets, 12-4 serial interface data format, 12-2 serial interface operation, 12-20-12-22 data transfer, 12-21 start bit, 12-21 stop bit, 12-22 transaction protocol example, 12-21 signals summary, 12-3 see also signals, duart e e500 coherency module (ecm) block diagram, 8-1 ccb arbiter, 8-9 ccb interface, 8-10 configuration ccb address configuration register (eebacr), 8-3 ccb port configuration register (eebpcr), 8-4 error handling error handling registers, 8-5-8-8 features, 8-2 functional description, 8-9 global data multiplexor, 8-10 i/o arbiter, 8-9 initialization/application information, 8-10-8-11 interrupts ecm error enable register (eeer), 8-6 memory map/register definition, 8-2 overview, 1-14, 8-1 performance monitor events, 19-18 register descriptions, 8-3 by acronym, see register index transaction queue, 8-9 e500 core block diagram, 5-1 book e architecture auxiliary processing units (apus), 5-3 branch target buffer (btb) locking, 5-5, 5-13 cache line lock and unlock, 5-5, 5-12 integer select (isel), 5-5 machine check, 5-5, 5-12 performance monitor, 5-5, 5-12, 5-29 single-precision floating-point (spfp), 5-12 future upward compatibility and spe apu, 5-3 legacy support of powerpc architecture, 5-31 exception handling, 5-32 instruction set compatibility, 5-31 little-endian mode, 5-33 memory management unit (mmu) and tlbs, 5-32 reset operation, 5-32 boot mode (por), 4-15
e?e MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor index 2-5 branch operations registers, 6-9-6-11 branch target buffer (btb) registers, 6-25-6-27 branch target buffer (btb) locking, 5-5 instructions, 5-13 cache line lock and unlock apu, 5-5 instructions, 5-12 clock multipliers, 5-11 see also clocks, por settings computational operations registers, 6-8-6-9 core complex bus (ccb), 5-9, 5-29 critical interrupts, 5-22 data cache, see e500 core, l1 caches debug registers, 6-42-6-48 device implementation details, 5-33 exceptions and interrupt handling, 5-20 critical interrupts, 5-22 interrupt classes, 5-21 interrupt latencies (upper bound), 5-22 interrupt registers, 5-22 interrupt types, 5-21 execution units load/store unit, 5-8 multiple-cycle unit (mu), 5-7 features, 5-5 freescale semiconductor book e implementation standards (eis), 5-3 future compatibility warning and spe apu, 1-9, 5-3, 5-33, 6-12 hardware implementation-dependent registers (hid0?1), 6-27-6-30 instruction flow, 5-14 branch detection and prediction, 5-14 execution pipeline, 5-15 instruction pipeline stages complete and write-back, 5-17 decode/dispatch, 5-16 execute, 5-17 instruction fetch, 5-16 issue queues (biq, giq), 5-16 interrupts registers, 6-18-6-24 sources, 10-4 l1 caches, 5-20 cache coherency, 5-9, 5-28 cache control instructions, 5-28 registers, 6-30-6-34 structure, 5-6 machine check apu, 5-5 rfmci instruction, 5-12 memory coherency atomic update memory references, 5-28 memory access ordering, 5-28 memory management unit (mmu), 5-24 address translation, 5-26 registers, 6-34-6-42 mmu assist registers (mas1?mas4, mas6), 5-27 process id registers (pid0?pid2), 5-27 tlb coherency, 5-27 tlb instructions, 5-26, 5-27 two-level mmu structure, 5-25 memory/cache attributes (wimge), 5-29 overview, 1-8, 5-1 performance monitor, 5-29 instructions, 5-12 purposes, 5-5 registers, 6-51-6-54 power management, 5-10 processor control registers, 6-11-6-15 programming model instruction set, 5-12 registers diagram, 5-18 registers bbear (branch buffer address register), 6-25 bbtar (branch buffer target address register), 6-25 bucsr (branch unit control and status register), 6-26 cr (condition register), 6-9 csrr0 (critical save/restore register 0), 6-18 csrr1 (critical save/restore register 1), 6-19 ctr (count register), 6-11 dac n (data address compare registers 1?2), 6-48 dbcr n (debug control register 0?2), 6-42-6-46 dbsr (debug status register), 6-46 dear (data exception address register 0), 6-19 dec (decrementer register), 6-17 decar (decrementer auto-reload register), 6-17 esr (exception syndrome register), 6-20 gprs (general-purpose registers), 6-8 hid0 (hardware implementation-dependent register 0), 6-27 hid1 (hardware implementation-dependent register 1), 6-28 iac n (instruction address compare registers 1?2), 6-47 ivor n (interrupt vector offset registers), 6-19 ivpr (interrupt vector prefix register), 6-19 l1cfg0 (l1 cache configuration register 0), 6-32 l1cfg1 (l1 cache configuration register 1), 6-33 l1csr0 (l1 cache status and control register 0), 6-30 l1csr1 (l1 cache status and control register 1), 6-31 lr (link register), 6-11 mas0?mas6 (mmu assist registers 0?6), 5-27, 6-37-6-42
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 index 2-6 freescale semiconductor f?f mcar (machine check address register), 6-22 mcsr (machine check syndrome register), 6-23 mcsrr0 (machine check save/restore register 0), 6-21 mcsrr1 (machine check save/restore register 1), 6-22 mmucfg (mmu configuration register), 6-35 mmucsr0 (mmu control and status register 0), 6-34 msr (machine state register), 6-12 pid n (process id registers 0?2), 5-27, 6-34 pir (processor id register), 6-14 pmc n (performance monitor counter registers 0?3), 5-30, 6-54 pmgc0 (performance monitor global control register 0), 5-30, 6-52 pmlca n (performance monitor local control registers a0?a3), 5-30, 6-52 pmlcb n (performance monitor local control registers b0?b3), 5-30, 6-53 pvr (processor version register), 5-4, 6-14 spefscr (signal processing and embedded floating-point status and control register), 6-48 sprg n (software-use registers 0?7), 6-24 srr0 (save/restore register 0), 6-18 srr1 (save/restore register 1), 6-18 svr (system version register), 5-4, 6-14 tbl (time base lower register), 6-17 tbu (time base upper register), 6-17 tcr (timer control register), 6-15 tlb0cfg (tlb0 configuration register), 6-35 tlb1cfg (tlb1 configuration register), 6-36 tsr (timer status register), 6-16 upmc n (user performance monitor counter registers 0?3), 5-30, 6-54 upmgc0 (user performance monitor global control register 0), 5-30, 6-52 upmlca n (user performance monitor local control registers a0?a3), 5-30, 6-52 upmlcb n (user performance monitor local control registers b0?b3), 5-30, 6-53 usprg0 (user software-use register 0), 6-24 xer (integer exception register), 6-8 signal processing engine (spe) registers, 6-48 single-precision floating-point (spfp) instructions, 5-12 software-use sprs, 6-24 time base rtc (real time clock) signal options, 4-3, 4-25 timer registers, 6-15-6-18 translation lookaside buffers (tlbs), see e500 core, memory management unit (mmu) ec_gtx_clk125 (tsec gigabit transmit 125 mhz source) signals, 14-10 ec_mdc (tsec management data clock) signals, 14-11 ec_mdio (tsec management data input/output) signals, 14-11 error handling ddr, 9-19-9-25, 9-48 dma, 15-37 duart, 12-3, 12-23 framing error, 12-9, 12-16, 12-21, 12-22, 12-23 overrun error, 12-23 parity error, 12-23 ecm error handling registers, 8-5-8-8 fec, 21-61-21-63 i 2 c interface boot sequencer mode, 11-17, 11-18 l2 cache/sram, 7-35 error handling registers, 7-12 error injection, 7-13 lbc transfer error registers, 13-26-13-30 pci/pci-x address/data parity, 16-66, 16-78, 16-79 error management registers, 16-28-16-35 reporting, 16-79 perr and serr signals, 16-79, 16-96 target-initiated termination, 16-65 retry transactions, 16-66 target-abort, 16-66 target-disconnect, 16-66 pci-x, 16-96 address/data parity, 16-96 reporting, 16-96 rapidio see rapidio controller, error handling tsec, 14-123-14-124 esr (exception syndrome register), see e500 core, registers external system configuration por (lad[0:31]) status, 4-23, 18-9 external writes, see l2 cache/sram, stashing f fast ethernet controller, see fec features, overview of device features, 1-2 fec controller block diagram, 21-5 buffer descriptors, 21-63 receive buffer descriptor (rxbd), 21-67 transmit data buffer descriptor (txbd), 21-65 channel operation, 21-49 flow control, 21-59 frame reception, 21-53 frame recognition, 21-54 destination address recognition, 21-55
g?g MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor index 2-7 frame transmission, 21-52 initialization sequence, 21-50 hardware controlled initialization, 21-50 user initialization, 21-50 inter-packet gap time, 21-61 interrupt handling, 21-59-21-60 clocks operation, 4-25 error handling, 21-61-21-63 features, 21-6 functional description, 21-48 hash function hash table algorithm, 21-57 hash table effectiveness, 21-57 registers, 21-45 interrupts, 21-59 interrupt registers, 21-13-21-18 mac functionality, 21-36-21-45 configuration, 21-36 csma/cd controlling, 21-36 packet collisions, 21-36 packet flow, 21-37 registers, 21-38 memory map/register definition, 21-9 detailed memory map, 21-10-21-13 top level module map, 21-9 modes of operation, 21-7 10 mbps and 100 mbps mii operation, 21-7 address recognition options, 21-7 full and half-duplex operation, 21-7 internal and external loop back, 21-61 overview, 1-16, 21-5 physical interface connections, 21-48 media-independent interface (mii), 21-48 register descriptions, 21-13 by acronym, see register index fifo control and status registers, 21-21-21-25 general control and status registers, 21-13-21-21 hash function registers, 21-45-21-46 mac registers, 21-36-21-45 receive control and status registers, 21-31-21-36 transmit control and status registers, 21-25-21-31 signals, 21-7-21-9 see also signals, fec soft reset and reconfiguring procedure, 21-51 fec_col (fec collision input) signals, 21-8 fec_crs (fec carrier sense input) signals, 21-8 fec_rx_clk (fec receive clock) signals, 21-8 fec_rx_dv (fec receive data valid) signals, 21-8 fec_rx_er (fec receive error) signals, 21-8 fec_rxd[3:0] (fec receive data in) signals, 21-8 fec_tx_clk (fec transmit clock in) signals, 21-8 fec_tx_en (fec transmit data valid in) signals, 21-8 fec_tx_er (fec transmit error in) signals, 21-9 fec_txd[3:0] (fec transmit data out) signals, 21-8 g general-purpose i/o (pci and tsec2) see global utilities global utilities clock out clk_out signal, 18-3, 18-18 clock out control register (clkocr), 18-18 overview, 18-2 ddr dll control register (ddrdllcr), 18-19 dma signal multiplex control register (pmuxcr), 18-12, 18-29 features, 18-1 functional description, 18-21 general-purpose i/o signals (pci and tsec2), 18-1 control register (gpiocr), 18-10 input data register (gpindr), 18-12 operation of, 18-29 output data register (gpoutdr), 18-11 interrupt and local bus signal multiplexing, 18-2, 18-12 operation, 18-29 interrupts and power management, 18-27 lbc dll control register (lbdllcr), 18-20 machine check summary sources of mcp (mcpsumr), 18-16 memory map/register definition, 18-3 overview, 18-1 por configuration boot mode status register (porbmsr), 18-5 debug mode status register (pordbgmsr), 18-9 device status register (pordevsr), 18-7 i/o impedance status register (porimpscr), 18-6 lad[0:31] external system configuration (gpporcr), 4-23, 18-9 pll status register (porpllsr), 18-4 see also power-on reset (por) power management and interrupts, 18-27 and snooping, 18-28 block disable (devdisr), 18-13, 18-22 ckstp_in and core-stopped mode, 18-22 core and device control bits, 18-24 core and device modes, 18-21 device mode control and status register (powmgtcsr), 18-15 doze mode, 18-23 dynamic power management, 18-22 features, 18-1 functional description, 18-21
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 index 2-8 freescale semiconductor h?i nap mode, 18-23 power-down sequence, 18-24 sleep mode, 18-24, 18-28 software considerations, 18-28 processor version register (pvr), 18-17 register descriptions, 18-4 by acronym, see register index signals summary, 18-2 see also signals, global utilities snooping and power management, 18-28 system version register (svr), 18-18 gpcm (lbc general-purpose chip-select machine), 13-38 see also local bus controller (lbc) gprs (general-purpose registers), see e500 core, registers h hash table algorithm, see fec controller, hash function hash table algorithm, see tsec, hash function hid0 (hardware implementation-dependent register 0), see e500 core, registers hid1 (hardware implementation-dependent register 1), see e500 core, registers host/agent configuration (por), pci and rapidio, 4-14 hreset (hard reset) signal, 4-2, 4-9 hreset_req (hard reset request) signal, 4-2, 11-17, 11-18 i i/o impedance lbc and pci/pci-x signals control and status register (global utilities), 18-6 pci/pci-x interface (por), 4-19 i/o requirements, 18-28 i/o space pci/pci-x addressing, 16-60 i 2 c controller overview, 1-15 i 2 c interface arbitration arbitration control, 11-14 loss of arbitration?forcing of slave mode, 11-23 procedure for arbitration, 11-14 block diagram, 11-1 boot sequencer por configuration, 4-16 boot sequencer mode, 11-2, 11-17-11-19 error condition behavior, 11-17, 11-18 calling address match condition, 11-5 clock control, 11-15 clock stretching, 11-17 clock synchronization, 11-16 input synchronization and digital filter, 11-16 master mode, 11-16 slave mode, 11-16 data transfer, 11-12 error handling boot sequencer mode, 11-17, 11-18 features, 11-2 frequency divider frequency divider register (i2cfdr), 11-5 functional description, 11-10 handshaking, 11-15 implementation details, 11-13 address compare, 11-14 control transfer, 11-13 transaction monitoring, 11-13 initialization/application information, 11-20-11-24 boot sequencer mode, see i 2 c interface, boot sequencer mode generation of scl when sda low, 11-22 initialization sequence, 11-20 post-transfer software response, 11-21 repeated start generation, 11-22 start generation, 11-11, 11-21 stop generation, 11-12, 11-22 interrupts calling address match condition, 11-5 flowchart for interrupt service routine, 11-23 interrupt after transfer, 11-21 interrupt enable bit (i2ccr[mien]), 11-7 interrupt on start, 11-21 interrupt pending status bit (i2csr[mif]), 11-9 interrupt-driven byte-to-byte transfers, 11-2 read of last byte, 11-22 slave mode interrupt service routine guidelines, 11-23 for slave transmitter routine, 11-23 loss of arbitration, 11-23 memory map/register definition, 11-4 modes of operation, 11-2 boot sequencer mode, 11-2, 11-17-11-19 interrupt-driven byte-to-byte data transfer, 11-2 master mode, 11-2 slave mode, 11-2 overview, 11-2 register descriptions, 11-4 by acronym, see register index signals summary, 11-3 see also signals, i 2 c transaction protocol, 11-10 handshaking, 11-15 repeated start condition, 11-3, 11-12 slave address transmission, 11-11 start condition, 11-3, 11-11, 11-21 stop condition, 11-3, 11-12, 11-22
i?i MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor index 2-9 iac n (instruction address compare registers 1?2), see e500 core, registers initialization ddr (initialization and application information), 9-49 ecm (initialization and application information), 8-10-8-11 i 2 c interface (initialization and application information), 11-20-11-24 boot sequencer mode, see i 2 c interface, boot sequencer mode generation of scl when sda low, 11-22 initialization sequence, 11-20 post-transfer software response, 11-21 repeated start generation, 11-22 start generation, 11-11, 11-21 stop generation, 11-12, 11-22 l2 cache/sram, 7-34-7-36 lbc (initialization and application information), 13-84-13-121 lbc sdram power-on initialization, 13-52 pci/pci-x (initialization and application information), 16-99-16-101 pic (initialization and application information), 10-48 rapidio (initialization and application information), 17-122 tsec (initialization and application information), 14-131-14-151 see also tsec, configuration watchpoint monitor and trace buffer, 20-33 intel pc133 sdram commands (lbc), 13-52 interrupt controller (pic) block diagram, 10-1, 10-43 configuration (global), 10-17 critical interrupts, 10-7, 10-27, 10-33 destination (interrupt routing), 10-33 critical interrupt to core, 10-7 external interrupt to core, 10-7 irq_out , 10-7 see also e500 core, critical interrupts end of interrupt (eoi), 10-42, 10-46 external interrupts routed to critical interrupt ( cint ), 10-28 routed to irq_out , 10-26 features, 10-3 flow (interrupt processing), 10-43 functional description, 10-43 global timers, 10-20, 10-47 cascading of timers, 10-24, 10-25 clocking of timers, 10-21, 10-25 rtc (real time clock) signal options, 4-3, 4-25, 10-24, 10-25 initialization/application information, 10-48 interrupt acknowledge (iack) signaling, 10-41, 10-46 interrupt routing (mixed mode), 10-7, 10-43 interrupt source priorities, 10-45 memory map/register definition, 10-9 messaging interrupts, 10-26, 10-28, 10-47 modes of operation, 10-5, 10-17 mixed mode, 10-5 pass-through mode (to support external interrupt controllers), 10-6 nesting of interrupts, 10-46 overview, 1-15, 10-2 performance monitor events, 19-20 power management (wake up conditions), 10-4 processor core interrupt sources, 10-4 critical interrupt ( cint ) sources, 10-27 processor current task priority, 10-45 programming guidelines, 10-48 changing interrupt source configuration, 10-50 register descriptions, 10-16 by acronym, see register index, 10-16 global registers, 10-16-10-20 global timer registers, 10-20-10-25 interrupt source configuration registers, 10-20-10-23, 10-32-10-37 message registers, 10-30-10-32 non-accessible registers in-service register (isr), 10-45 interrupt pending register (ipr), 10-43 interrupt request register (irr), 10-43 per-cpu registers, 10-38-10-42 performance monitor mask registers, 10-28-10-30 summary registers, 10-26-10-28 reset of pic, 10-17, 10-47 reset processor from software, 10-18, 10-46 signals summary, 10-8 see also signals, pic simultaneous interrupts, priorities, 10-45 sources of interrupts, 10-6 internal (to pic) interrupt destinations, 10-27, 10-28 internal (to pic) interrupt sources, 10-7 spurious vector generation, 10-19, 10-46 vendor identification, 10-17 interrupts ddr, 9-22 dma, 15-10-15-14, 15-16, 15-24, 15-27, 15-37 duart interrupt control logic, 12-25 interrupt enable and control registers, 12-9-12-11 e500 core registers, 6-18-6-24 ecm interrupt register (ecm error enable register?eeer), 8-6
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 index 2-10 freescale semiconductor j?l fec, 21-59-21-60 interrupt registers, 21-13-21-18 i 2 c interface calling address match condition, 11-5 flowchart for interrupt service routine, 11-23 interrupt after transfer, 11-21 interrupt enable bit (i2ccr[mien]), 11-7 interrupt on start, 11-21 interrupt pending status bit (i2csr[mif]), 11-9 interrupt-driven byte-to-byte transfers, 11-2 read of last byte, 11-22 slave mode interrupt service routine guidelines, 11-23 for slave transmitter routine, 11-23 loss of arbitration, 11-23 irq[9:11] signal select, 18-12, 18-29 lbc interrupt register, 13-28 pci/pci-x error enable register, 16-31 performance monitor (pic), 19-20 power management and interrupts (global utilities), 18-27 rapidio message unit doorbell controller interrupts, 17-121 inbox controller interrupts, 17-118 outbox controller interrupts, 17-116 port notification/fatal error interrupt enable register (pnfeier), 17-49 see also interrupt controller (pic) tsec, 14-120-14-123 interrupt registers, 14-20-14-25 irq[0:11] (interrupt request 0?11) signals, 10-8 irq[9:11] signal select global utilities, 18-12 irq_out (interrupt request out) signal, 10-9, 10-26 ivor n (interrupt vector offset registers), see e500 core, registers ivpr (interrupt vector prefix register), see e500 core, registers j jedec sdram commands (lbc), 13-52 jtag test access port signals summary, 20-6 see also signals, jtag, 20-6 l l1cfg0 (l1 cache configuration register 0), see e500 core, registers l1cfg1 (l1 cache configuration register 1), see e500 core, registers l1csr0 (l1 cache status and control register 0), see e500 core, registers l1csr1 (l1 cache status and control register 1), see e500 core, registers l2 cache/sram allocation of lines, 7-29 block diagram, 7-1 coherency rules, 7-22 configuration and organization, 7-3 error handling ecc errors, 7-35 tag parity errors, 7-36 error handling registers, 7-12 error injection, 7-13 external writes, see stashing flash clearing, instruction and data locks, 7-27 initialization/application information, 7-34-7-36 invalidation, 7-30 locking clearing locks on selected lines, 7-26 entire, 7-25 programmed memory ranges, 7-25 selected lines, 7-25 with stale data, 7-27 memory map/register definition, 7-6 memory-mapped sram coherency rules, 7-24 memory-mapped windows, 2-4 operation, 7-29 organization, 7-3 overview, 1-12, 7-1 performance monitor events, 19-26 plru bit update considerations, 7-28 register descriptions, 7-7-7-20 replacement policy, 7-27 sram features, 7-2 stashing, 7-21 state transitions, 7-30 due to core-initiated transactions, 7-31 due to system-initiated transactions, 7-33 timing, 7-21 la[27:31] (lbc non-multiplexed address) signals, 13-7 lad[0:31] (lbc multiplexed address/data) signals, 13-8 lale (lbc external address latch enable) signal, 13-6, 13-35 lbctl (lbc data buffer control) signal, 13-7, 13-37 lbs [0:3] (lbc upm byte select) signals, 13-6 lck[0:2] (lbc clock) signals, 13-8 lcke (lbc clock enable) signal, 13-8 lcs [0:7] (lbc chip select) signals, 13-6 lcs [5:7] signal select global utilities, 18-12 lcs0 (lbc chip select 0) signal, 13-50 ldp[0:3] (lbc data parity) signals, 13-8, 13-38
l?l MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor index 2-11 lgpl0 (lbc gp line 0) signal, 13-6 lgpl1 (lbc gp line 1) signal, 13-6 lgpl2 (lbc gp line 2) signal, 13-6 lgpl3 (lbc gp line 3) signal, 13-7 lgpl4 (lbc gp line 4) signal, 13-7 lgpl5 (lbc gp line 5) signal, 13-7 lgta (lbc gpcm transfer acknowledge) signal, 13-7, 13-49 local access windows, 2-3-2-9 atm us, see address translation and mapping units (atmus) configuring local access windows, 2-7 distinguishing local access windows from other mapping functions, 2-8 illegal interactions between inbound atmus and local access windows, 2-9 between local access windows and ddr sdram chip selects, 2-8 l2 cache/sram window interactions, 2-4 precedence if overlapping among themselves, 2-7 precedence if overlapping with l2 cache/sram windows, 2-4 registers, 2-6-2-7 by acronym, see register index local address map, 1-20 see also local access windows local bus controller (lbc) address and address space checking, 13-34 address mask field?option registers, 13-13 atomic bus operations, 13-37 block diagram, 13-1 boot chip-select operation, 13-50 bus monitor, 13-38 bus turnaround, 13-87 additional address phases (upm cycles), 13-88 address following read, 13-87 read data following address, 13-88 read-modify-write cycle (parity), 13-88 clocks and clock ratios, 13-4 clock ratio register (lcrr), 13-32 configuration lbc configuration register (lbcr), 13-31 debug mode signal selection (por), 4-20 source and target id, 20-4, 20-26 dll control (global utilities), 18-20 dsp hosts (interface to), 13-103 msc8101 hdi16 interface, 13-103 msc8102 dsi interface, 13-107 ti tms320cxxxx interface, 13-118 error handling transfer error registers, 13-26-13-30 external access termination (lgta ), 13-49 features, 13-2 functional description, 13-33 general-purpose chip-select machine (gpcm), 13-38 chip-select and write enable negation timing, 13-44 chip-select assertion timing, 13-44 extended hold time on read accesses, 13-48 gpcm mode registers, 13-14 output enable timing, 13-48 programmable wait state configuration, 13-44 relaxed timing, 13-45 timing configuration, 13-39 initialization/application information, 13-84-13-121 interrupts transfer error interrupt enable register (lteir), 13-28 lcs [5:7] signal select, 18-12, 18-29 memory map/register definition, 13-9 memory refresh timer prescaler, 13-21 modes of operation, 13-3 bus clock and clock ratios, 13-4 gpcm mode, registers, 13-14 power-down mode, 13-4 sdram mode, registers, 13-17 source id debug mode, 13-4 upm mode, registers, 13-16 output hold configuration (por), 4-22 overview, 1-17, 13-2 parity generation and checking, 13-38, 13-101 performance monitor events, 19-25 peripherals, 13-84 gpcm timing, 13-86 hierarchy for very high speeds, 13-85 hierarchy on the local bus, 13-84 multiplexed address/data, 13-84 port sizes, 13-88 references, other, 13-4 register descriptions, 13-10 by acronym, see register index sdram interface, 13-51-13-61, 13-90 address multiplexing, 13-54 basic capabilities, 13-90 commands (intel pc133 and jedec), 13-52 configurations supported, 13-51 device-specific parameters, 13-55 limitations, 13-92-13-100 maximum sdram supported, 13-91 page hit checking, 13-53 page management, 13-54 parity support, 13-101 power-on initialization, 13-52 refresh, 13-61
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 index 2-12 freescale semiconductor m?m sdram mode registers, 13-17, 13-22 timing, 13-58 activate-to-read/write interval, 13-56 cas latency, 13-56 external buffers, 13-57 mode-set commands, 13-60 precharge-to-activate interval, 13-55 refresh recovery, 13-57 refresh timing, 13-61 write recovery, 13-56 transactions, 13-60 signals summary, 13-5 see also signals, lbc upm interfaces, 13-62-13-83 block diagram, 13-62 example interface, 13-78 extended hold time (reads), 13-77 programming the upms, 13-66 ram array, 13-67 address multiplexing, 13-74 byte select signal timing, 13-72 chip select signal timing, 13-72 data timing, 13-75 general purpose signal timing, 13-73 lgpl [0:5] timing (last), 13-76 loop control, 13-73 ram word definition, 13-68 redo, 13-74 wait mechanism (waen), 13-76 signal timing, 13-66 synchronous upwait (early transfer acknowledge), 13-77 upm mode registers, 13-16, 13-18 upm requests, 13-63 exception requests, 13-66 memory access requests, 13-64 refresh timer requests, 13-65 software requests, 13-65 zbt sram interface, 13-101 loe (lbc gpcm output enable) signal, 13-6 low-voltage differential signaling see rapidio, functionality lists, 8/16 lp-lvds lpbse (lbc parity byte select) signal, 13-7 lr (link register), see e500 core, registers lsda10 (lbc sdram a10) signal, 13-6 lsdcas (lbc sdram cas) signal, 13-7 lsddqm[0:3] (lbc sdram data mask) signal, 13-6 lsdras (lbc sdram ras) signal, 13-6 lsdwe (lbc sdram write enable) signal, 13-6 lsync_in (lbc dll synchronization in) signal, 13-8 lsync_out (lbc dll synchronization out) signal, 13-8 lwe [0:3] (lbc gpcm write enable) signals, 13-6 m ma[0:14] (ddr address bus) signals, 9-6 mac functionality see fec controller, mac functionality see tsec, mac functionality machine check mcp (processor machine check) signal, 10-9 mcp summary register (mcpsumr), 18-16 sreset (soft reset) signal, 4-9 mas0-mas6 (mmu assist registers 0?6), see e500 core, registers mba[0:1] (ddr logical bank address) signals, 9-6 mcar (machine check address register), see e500 core, registers mcas (ddr column address strobe) signal, 9-6 mck [0:5] (ddr clock output complement) signals, 9-8 mck[0:5] (ddr clock output) signals, 9-8 mcke (ddr clock enable) signal, 9-8 mcp (processor machine check) signal, 10-9 mcs [0:3] (ddr chip select) signals, 9-7 mcsr (machine check syndrome register), see e500 core, registers mcsrr0 (machine check save/restore register 0), see e500 core, registers mcsrr1 (machine check save/restore register 1), see e500 core, registers mdm[0:8] (ddr sdram data output mask) signals, 9-7 mdq[0:8] (ddr data bus strobe) signals, 9-5, 9-27 mdval (ddr/lbc debug mode data valid) signal, 4-20, 13-9, 20-4, 20-7 mecc[0:5] (ddr error correcting code) signals as debug, 20-4, 20-8 mecc[0:7] (ddr error correcting code) signals, 4-21, 9-6 memory management unit (mmu), see e500 core, memory management unit (mmu) memory maps ccsr memory, 2-4 accessing ccsr memory from external masters, 2-11 ccsr and rapidio registers, 2-15 ccsr map, complete list of memory-mapped registers (by offset), 2-16 ccsr organization, 2-11 ccsr registers, 2-10-2-16 device-specific utilities, 2-15 general utilities registers, 2-13 programmable interrupt controller (pic) space, 2-14 configuration, control, and status registers, 4-3 ddr controller, 9-9
n?p MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor index 2-13 illegal interaction between local access windows and ddr sdram chip selects, 2-8 debug, watchpoint, and trace buffer registers, 20-10 device memory map address translation and mapping, 2-3 overview and example, 2-1 dma, 15-6 duart, 12-4 ecm, 8-2 fec, 21-9 global utilities, 18-3 i 2 c, 11-4 interrupt controller (pic), 10-9 l2 cache/sram, 7-6 lbc, 13-9 pci/pci-x, 16-15 performance monitor, 19-3 rapidio, 17-9 tsec, 14-13 memory space pci/pci-x addressing, 16-59 memory target queue performance monitor events, 19-17 memory unit, see l2 cache/sram message interrupts, see interrupt controller (pic), message interrupts message unit see rapidio controller, message unit, 17-109 mmucfg (mmu configuration register), see e500 core, registers mmucsr0 (mmu control and status register 0), see e500 core, registers mras (ddr row address strobe) signal, 9-7 msr (machine state register), see e500 core, registers msrcid[0:4] (ddr/lbc debug source id) signals, 4-20, 13-9, 20-4, 20-8 msync_in (ddr dram dll synchronization input) signal, 9-8 msync_out (ddr dram dll synchronization output) signal, 9-8 mwe (ddr write enable) signal, 9-7 n nap mode, 1-19, 18-23 see also global utilities, power management o ocean switch fabric, 1-20 on-chip memory as l2 cache, 1-13 as memory-mapped sram, 1-13 see also l2 cache/sram output hold see power-on reset (por), configuration p page hit checking (lbc sdram), 13-53 page management (lbc sdram), 13-54 pci local bus specification configuration registers see pci/pci-x controller, register descriptions pci/pci-x controller 64-bit/32-bit bus, 16-6 address bus decoding, 16-59 address translation and mapping unit (atmu) inbound windows (4), 2-9, 16-24 outbound windows (4), 16-20 arbiter configuration (por), 4-19, 16-5, 16-6 block diagram, 16-1 burst operations cache wrap mode, 16-59 linear incrementing, 16-59 bus arbitration, 16-5, 16-53 bus protocol, 16-56 burst operation, 16-57 command encodings, 16-57 pci-x-specific protocol, see pci/pci-x controller, pci-x operation clocking, 16-57, 16-62 commands command register, 16-38, 16-72 encodings, 16-57 interrupt-acknowledge transactions, 16-76 pci-x encodings, 16-82 special-cycle, 16-77 configuration cycles, 16-70, 16-71 configuration space addressing, 16-60 host access example, 16-72 type 0 configuration translation, 16-74 type 1 configuration translation, 16-76 data bus width (por), 4-19 debug configuration (por), 4-20 debug mode source and target id (pci_ad[62:58]), 20-5, 20-26 error handling, 16-79 address/data parity, 16-66, 16-78, 16-79 detection and reporting, 16-78, 16-96 error management registers, 16-28-16-35 pci-x, 16-96 address/data parity, 16-96 reporting perr and serr signals, 16-79, 16-96 target-initiated termination, 16-65 retry transactions, 16-66
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 index 2-14 freescale semiconductor p?p target-abort, 16-66 target-disconnect, 16-66 features, 16-4 functional description, 16-53 host/agent configuration (por), 4-14 i/o impedance (por), 4-19 i/o space addressing, 16-60 initialization/application information, 16-99-16-101 initiator/master operation, 16-3 interrupts error enable register, 16-31 latency timer, 16-43, 16-66, 16-72 memory map/register definition, 16-15 memory space addressing, 16-59 modes of operation, 16-5 agent configuration lock mode, 16-100 agent mode, 16-100 cache wrap mode, 16-59 host mode, 16-100 linear incrementing, 16-59 pci-x mode selection (por), 4-20 output hold configuration (por), 4-21 overview, 1-18, 16-2 pci-x operation attribute phase, 16-83 bus protocol, 16-81-16-98 command encodings, 16-82 configuration, 16-93 nonposted writes, 16-100 outbound read transaction alignment, 16-101 terminology, 16-81 transactions, 16-84-16-88, 16-89-16-92 completer attributes, 16-91 completion address, 16-90 split response, 16-89 split transactions, 16-89-16-92 wait state and terminations rules, 16-88 performance monitor events common events, 19-20 pci-specific events, 19-22 por configuration, 16-99 power management special-cycle operations, 16-77 register descriptions configuration header registers, 16-36-16-53, 16-72 32-bit memory base address register, 16-44 64-bit high memory base address register, 16-46 64-bit low memory base address register, 16-45 arbiter configuration register (pbacr), 16-50 base address registers, 16-43-16-46 base class code register, 16-42 bus function register (pbfr), 16-49 bus status register, 16-40, 16-61, 16-65 cache line size register, 16-43 capabilities pointer register, 16-47 command register, 16-38, 16-72 configuration and status register base address (pcsrbar), 16-44 device id register, 16-38 interrupt line register, 16-47 interrupt pin register, 16-48 latency timer register, 16-43 maximum grant (max gnt) register, 16-48 maximum latency (max lat) register, 16-49 pci-x capability pointer register, 16-51 pci-x command register, 16-52 pci-x next capabilities id register, 16-51 pci-x status register, 16-52 programming interface register, 16-41 revision id register, 16-41 subclass code register, 16-42 subsystem id register, 16-46 subsystem vendor id register, 16-46 vendor id register, 16-37 memory-mapped registers, 16-15 atmu inbound registers, 16-24-16-28 atmu outbound registers, 16-20-16-24 by acronym, see register index configuration access registers, 16-18-16-20 error management registers, 16-28-16-35 signals summary, 16-7 see also signals, pci/pci-x target/slave operation, 16-4 target-abort termination, 16-66 target-disconnect cycles, 16-4, 16-66 target-initiated termination target-abort error, 16-66 target-disconnect, 16-4, 16-66 transactions dual address cycles (dacs), 16-68 fast back-to-back transactions, 16-68 interrupt-acknowledge transactions, 16-76 pci-x, see pci/pci-x controller, pci-x operation read transactions, 16-62 retry transactions, 16-66 special-cycle transactions, 16-77 timing diagrams, 16-61 transaction termination, 16-64 bus status register, termination status, 16-66 completion, 16-65 master-abort termination, 16-65 master-initiated, 16-65 target-initiated, 16-65, 16-66
p?p MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor index 2-15 timeout, 16-65 write transactions, 16-61, 16-63 turnaround cycle, 16-61 pci_ad[47:40] signals as gp i/o, see global utilities, general-purpose i/o signals pci_ad[62:58] (high-order pci address) signals as debug, 20-4, 20-8 pci_ad[63:0] (pci address/data bus) signals, 16-8, 16-59 pci_c/be [7:0] (pci command/byte enable) signals, 16-9, 16-57, 16-60, 16-61, 16-78 pci_devsel (pci device select) signal, 16-60 pci_frame (pci frame) signal, 16-57 pci_gnt [4:0] (pci bus grant) signals, 16-10, 16-54 pci_idsel (pci initialization device) signal, 16-10 pci_irdy (pci intitiator ready) signal, 16-11, 16-57 pci_par (pci parity) signal, 16-11, 16-78 pci_par64 (pci upper dword parity) signal, 16-12 pci_perr (pci parity error) signal, 16-12, 16-79, 16-96 pci_req [4:0] (pci bus request) signals, 16-13, 16-54 pci_req64 (pci 64-bit transaction request) signal, 16-13 pci_serr (pci system error) signal, 16-13, 16-79, 16-96 pci_stop (pci stop) signal, 16-14, 16-61 pci_trdy (pci target ready) signal, 16-14, 16-57 pci_trdy (target ready) signal, 16-65 performance monitor (device) block diagram, 19-2 burstiness, 19-13, 19-28 control registers, 19-5-19-9 counters (pmc n ) chaining, 19-12 registers, 19-9 triggering, 19-12 event counting, 19-11 events, 19-15-19-27 chaining, 19-27 ddr controller, 19-16 debug, 19-26 dma controller, 19-18 duart, 19-27 e500 coherency module (ecm), 19-18 interrupt controller (pic), 19-20 l2 cache/sram, 19-26 local bus controller (lbc), 19-25 memory target queue, 19-17 pci/pci-x common events, 19-20 pci-specific events, 19-22 rapidio controller, 19-17 tsec1, 19-22, 19-23 tsec2, 19-24 events triggered by watchpoint monitor, 20-29 examples, 19-27 burstiness event, 19-13 burstiness event counting, 19-28 simple event counting, 19-27, 19-28 threshold event counting, 19-28 triggering event counting, 19-28 external signals, 19-3 features, 19-3 functional description, 19-10 interrupts, 19-10 interrupts (from pic) to generate events, 10-28 masking interrupts (from pic), 10-28 memory map/register definition, 19-3 overflow indication on trig_out, 20-26 overview, 19-1 threshold events, 19-11 performance monitor (e500 core) counter registers, 5-30 phase-locked loops (plls) por status (global utilities), 18-4 pid n (process id registers 0?2), see e500 core, registers pir (processor id register), see e500 core, registers pmc n (performance monitor counter registers 0?3), see e500 core, registers pmgc0 (performance monitor global control register 0), see e500 core, registers pmlca n (performance monitor local control registers a0?a3), see e500 core, registers pmlcb n (performance monitor local control registers b0?b3), see e500 core, registers power management block disable block disable control (devdisr), 18-13, 18-22 lbc, 13-4 ddr interface, 9-43 device low-power modes, 18-21-18-28 control and status register (powmgtcsr), 18-15 ready negation, 4-2 interrupts that cause wake-up, 10-4 overview, 1-19 pci special-cycle operations, 16-77 see also global utilities, power management power-on reset (por) configuration boot rom location, 4-14 boot sequencer configuration, 4-16 clock e500 core pll ratio, 4-13 system/ccb pll ratio, 4-12 cpu boot configuration, 4-15 ddr debug mode (ecc pins used for debug), 4-21, 20-3 general-purpose (external system) configuration?lad[0:31] (gpporcr), 4-23 host/agent configuration (pci and rapidio), 4-14
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 index 2-16 freescale semiconductor r?r memory debug select (ddr or lbc), 4-20, 20-3 output hold lbc output hold, 4-22 pci/pci-x output hold, 4-21 pci data bus width, 4-19 pci debug configuration, 4-20, 20-3 pci i/o impedance, 4-19 pci/pci-x arbiter configuration, 4-19 pci/pci-x, modes of operation, 16-99 pci-x mode selection, 4-20 rapidio device id, 4-18 rapidio transmit clock source, 4-18 tsec data width, 4-16 tsec1 protocol, 4-17 tsec2 protocol, 4-17 configuration reporting global utilities, 18-4, 18-5, 18-6, 18-7, 18-9 debug modes summary, 20-3 hard reset, 4-9 output signal states during reset, 3-17 reset configuration signals, 3-15 sequence of events, 4-9 and ready signal, 4-2, 4-10 processor version (pvr), 18-17 protocols pci, see pci/pci-x controller, bus protocol pvr (processor version register), see e500 core, registers r rapidio controller accept-all mode, 17-6 address translation and mapping unit (atmu), 17-106 inbound atmu translation, 2-9, 17-107 bypass mode, 17-108 errors, boundary crossing, 17-109 inbound windows (4 plus default), 17-40-17-43 lcsrbar window, 17-108 special transactions and requirements, 17-108 outbound atmu translation, 17-106 bypass mode, 17-107 outbound windows (8 plus default), 17-37-17-40 special transactions and requirements, 17-107 assembly identity capability, 17-14 clocks clock selection, transmit clock source (por), 4-18, 17-8 operation, 4-24 command and status registers, 17-22-17-34 configuration configuration/error injection registers, 17-34-17-36 crc checking modes, 17-5 device id (por), 4-18 error handling, 17-102 error checking disable mode, 17-6 error handling registers, 17-43-17-65 message unit doorbell error response conditions, 17-121 inbox error response conditions, 17-118 special outbox error response conditions, 17-117 packet error packet register 1 (pepr1) packet error capture registers (9 types) (pecr1t x ), 17-53-17-58 packet error packet register 2 (pepr2) packet error capture registers (9 types) (pecr2t x ), 17-58-17-61 features, 17-4 features not implemented, 17-5 functional description, 17-83 functionality of rapidio interface, 17-89 functionality lists 8/16 lp-lvds layer, 17-91 logical layer, 17-100 source transaction support list, 17-101 host/agent configuration (por), 4-14 initialization/application information, 17-122 interrupts message unit doorbell controller interrupts, 17-121 inbox controller interrupts, 17-118 outbox controller interrupts, 17-116 port notification/fatal error interrupt enable register (pnfeier), 17-49 low-voltage differential signaling, see rapidio, functionality lists, 8/16 lp-lvds mailbox command and status, 17-22 memory map/register definition, 17-9 message unit data message controller, 17-111 doorbell message controller, 17-119 doorbell controller interrupts, 17-121 doorbell queue entry format, 17-120 error response conditions, 17-121 inbound doorbell reception, 17-120 retry response conditions, 17-121 features, 17-110 inbox controller operation, 17-117 data message controller limitations and restrictions, 17-119 error response conditions, 17-118 inbox controller interrupts, 17-118 retry response conditions, 17-118 messaging, description, 17-111 modes of operation, 17-111 outbound descriptors, 17-72 outbox controller operation, 17-111
r?r MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor index 2-17 chaining mode operation, 17-112 descriptor format, 17-115 direct mode operation, 17-112 interrupts, 17-116 special error case condition, 17-117 switching between modes, 17-115 overview, 1-19, 17-109 port-write controller structure, 17-121 registers, see rapidio controller, registers modes of operation, 17-5 accept-all mode, 17-6 crc checking modes, 17-5 error checking disable mode, 17-6 link response time-out disable mode, 17-6 output port driver disable mode, 17-6 output port enable mode, 17-6 packet response time-out disable mode, 17-6 transmit clock-select mode, 17-5 see also rapidio controller, clocks, 17-5 overview, 1-18, 17-7 performance monitor events, 19-17 registers architectural registers, 17-13-17-34 block header command and status registers, 17-27-17-34 command and status registers, 17-22-17-34 implementation registers, 17-34-17-65 atmu, 17-36-17-43 configuration/error injection, 17-34-17-36 error handling, 17-43-17-65 message unit registers, 17-65-17-83 doorbell registers, 17-77-17-81 inbound message registers, 17-72-17-76 outbound descriptors, 17-72 outbound message registers, 17-65-17-72 port-write registers, 17-81-17-83 signals summary, 17-7 see also signals, rapidio terminology, 17-4 transaction, packet, and control symbols, 17-83 ready signal, 4-2, 4-10, 20-25, 20-26 registers by acronym (memory-mapped registers) see register index configuration, control, and status, 2-10-2-16, 4-3 device-specific utilities, 2-15 general utilities, 2-13 programmable interrupt controller (pic) space, 2-14 context id, 20-24-20-25 ddr configuration registers, 9-10-9-17 dll control, 18-19 error handling registers, 9-19-9-25 error injection registers, 9-17-9-19 e500 core, see e500 core, registers ecm, 8-3 fec fifo control and status registers, 21-21-21-25 general control and status registers, 21-13-21-21 hash function registers, 21-45-21-46 mac registers, 21-36-21-45 receive control and status registers, 21-31-21-36 transmit control and status registers, 21-25-21-31 global utilities, 18-4 por boot mode status, 18-5 por debug mode status, 18-9 por device status, 18-7 por external system configuration, 18-9 por i/o impedance status, 18-6 por pll status, 18-4 i 2 c interface, 11-4 l2 cache/sram registers, 7-6-7-20 lbc, 13-10 dll control, 18-20 local access window registers attributes registers (lawar0?lawar7), 2-6 base address registers (lawbar0?lawbar7), 2-6 pci/pci-x configuration header registers, 16-36-16-53, 16-72 see also pci/pci-x controller, registers memory-mapped registers atmu inbound registers, 16-24-16-28 atmu outbound registers, 16-20-16-24 configuration access registers, 16-18-16-20 error management registers, 16-28-16-35 performance monitor (e500 core) counter registers, 5-30 performance monitor, descriptions, 19-3 pic, 10-16 global registers, 10-16-10-20 global timer registers, 10-20-10-25 interrupt source configuration registers, 10-20-10-23, 10-32-10-37 message registers, 10-30-10-32 non-accessible registers in-service register (isr), 10-45 interrupt pending register (ipr), 10-43 interrupt request register (irr), 10-43 per-cpu registers, 10-38-10-42 performance monitor mask registers, 10-28-10-30 summary registers, 10-26-10-28 processor version register (pvr), 18-17 rapidio architectural registers, 17-13-17-34
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 index 2-18 freescale semiconductor s?s block header command and status registers, 17-27-17-34 command and status registers, 17-22-17-34 implementation registers, 17-34-17-65 atmu, 17-36-17-43 configuration/error injection, 17-34-17-36 error handling, 17-43-17-65 message unit registers, 17-65-17-83 doorbell registers, 17-77-17-81 inbound message registers, 17-72-17-76 outbound descriptors, 17-72 outbound message registers, 17-65-17-72 port-write registers, 17-81-17-83 system version register (svr), 18-18 trace buffer, 20-16-20-23 trigger out source register, 20-25 tsec fifo control and status registers, 14-30-14-33 general control and status registers, 14-20-14-30 hash function registers, 14-87-14-89 mac registers, 14-46-14-60 mib registers, 14-60-14-87 receive control and status registers, 14-40-14-46 ten-bit interface (tbi) registers, 14-91-14-103 transmit control and status registers, 14-33-14-40 watchpoint monitor, 20-11-20-16 reset core reset through pic register, 10-18, 10-46 hard reset actions, 4-9 operations, 4-8 power-on reset (por) configuration, see power-on reset (por), configuration sequence of events, 4-9 signals summary, 4-2 see also signals, reset soft reset actions, 4-9 rio_rclk and rio_rclk (rapidio receive clock and complement) signals, 17-8 rio_rd[0:7] and rio_rd [0:7] (rapidio receive data and complement) signals, 17-8 rio_rframe and rio_rframe (rapidio receive frame and complement) signals, 17-8 rio_tclk and rio_tclk (rapidio transmit clock out and complement) signals, 17-8 rio_td[0:7] and rio_td [0:7] (rapidio transmit data and complement) signals, 17-8 rio_tframe and rio_tframe (rapidio transmit frame and complement) signals, 17-9 rio_tx_clk_in and rio_tx_clk_in (rapidio transmit clock in and complement) signals, 17-9 rtc (real time clock) signal, 4-3, 4-25, 10-24, 10-25, 18-25 rts , see duart_rts [0:1] s scl (i 2 c serial clock) signal, 11-3, 11-4 sda (i 2 c serial data) signal, 11-3, 11-4 sdram interface (lbc), 13-51-13-61 see also local bus controller (lbc), sdram interface serial data/clock, see i 2 c interface, 11-1 signals clock rtc (real time clock), 4-3, 4-25, 10-24, 10-25, 18-25 sysclk (system clock input), 4-3 complete signal listing alphabetical reference, 3-9 configuration signals, sampled at por, 3-15 see also power-on reset (por) figure showing groupings, 3-1 output signal states at power-on reset, 3-17 reference by functional block, 3-4 ddr ma[0:14] (address bus), 9-6 mba[0:1] (logical bank address), 9-6 mcas (column address strobe), 9-6 mck [0:5] (ddr clock output complements), 9-8 mck[0:5] (ddr clock outputs), 9-8 mcke (ddr clock enable), 9-8 mcs [0:3] (chip selects), 9-7 mdm[0:8] (sdram data output mask), 9-7 mdqs[0:8] (data bus strobes), 9-5, 9-27 mdval (debug mode data valid), 4-20, 20-4, 20-7 mecc[0:5] (error correcting code) as debug signals, 20-4, 20-8 mecc[0:7] (error correcting code), 4-21 mecc[0:7] (error correcting codes), 9-6 mras (row address strobe), 9-7 msrcid[0:4] (debug source id), 4-20, 20-4, 20-8 msync_in (dram dll synchronization input), 9-8 msync_out (dram dll synchronization output), 9-8 mwe (write enable), 9-7 dma dma_dack [0:3] (dma acknowledge), 15-6 dma_ddone [0:3] (dma done), 15-6 dma_dreq [0:3] (dma request), 15-6 duart uart_cts [0:1] (duart clear to send), 12-1, 12-3, 12-4 uart_rts [0:1] (duart request to send), 12-1, 12-3, 12-4 uart_sin [0:1] (duart transmitter serial data in), 12-3, 12-4 uart_sout [0:1] (duart transmitter serial data out), 12-3, 12-4 fec
s?s MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor index 2-19 fec_col (fec collision input), 21-8 fec_crs (fec carrier sense input), 21-8 fec_rx_clk (fec receive clock), 21-8 fec_rx_dv (fec receive data valid), 21-8 fec_rx_er (fec receive error), 21-8 fec_rxd[3:0] (fec receive data in), 21-8 fec_tx_clk (fec transmit clock in), 21-8 fec_tx_en (fec transmit data valid in), 21-8 fec_tx_er (fec transmit error in), 21-9 fec_txd[3:0] (fec transmit data out), 21-8 global utilities asleep, 18-2, 18-24 ckstp_in (checkstop in), 18-3 ckstp_out (checkstop out), 18-3 clk_out, 18-3, 18-18 i 2 c scl (serial clock), 11-3, 11-4 sda (serial data), 11-3, 11-4 jtag tck (jtag test clock), 20-9 tdi (jtag test data input), 20-9 tdo (jtag test data output), 20-9 tms (jtag test mode select), 20-9 trst (jtag test reset), 20-10 lbc la[27:31] (non-multiplexed address), 13-7 lad[0:31] (multiplexed address/data), 13-8 lale (external address latch enable), 13-6, 13-35 lbctl (data buffer control), 13-7, 13-37 lbs [0:3] (upm byte select), 13-6 lck[0:2] (clock), 13-8 lcke (clock enable), 13-8 lcs [0:7] (chip select), 13-6 lcs0 (lbc chip select 0), 13-50 ldp[0:3] (data parity), 13-8, 13-38 lgpl0 (gp line 0), 13-6 lgpl1 (gp line 1), 13-6 lgpl2 (gp line 2), 13-6 lgpl3 (gp line 3), 13-7 lgpl4 (gp line 4), 13-7 lgpl5 (gp line 5), 13-7 lgta (gpcm transfer acknowledge), 13-7, 13-49 loe (gpcm output enable), 13-6 lpbse (parity byte select), 13-7 lsda10 (sdram a10), 13-6 lsdcas (sdram cas), 13-7 lsddqm[0:3] (sdram data mask), 13-6 lsdras (sdram ras), 13-6 lsdwe (sdram write enable), 13-6 lsync_in (dll synchronization in), 13-8 lsync_out (dll synchronization out), 13-8 lwe [0:3] (gpcm write enable), 13-6 mdval (debug mode data valid), 4-20, 13-9, 20-4, 20-7 msrcid[0:4] (debug source id), 4-20, 13-9, 20-4, 20-8 ta (data transfer acknowledge), 13-36 upwait (upm wait), 13-7, 13-63 other test_sel (factory test), 20-10 therm[0:1] (thermal resistor access), 20-10 pci/pci-x pci_ad[62:58] (high-order pci address) as debug signals, 20-4, 20-8 pci_ad[63:0] (address/data bus), 16-8, 16-59 pci_c/be [7:0] (command/byte enable), 16-9, 16-57, 16-60, 16-61, 16-78 pci_devsel (device select), 16-60 pci_frame (frame), 16-57 pci_gnt [4:0] (bus grant), 16-10, 16-54 pci_idsel (initialization device), 16-10 pci_irdy (intitiator ready), 16-11, 16-57 pci_par (parity), 16-11, 16-78 pci_par64 (upper dword parity), 16-12 pci_perr (parity error), 16-12, 16-79, 16-96 pci_req [4:0] (bus request), 16-13, 16-54 pci_req64 [4:0] (64-bit transaction request), 16-13 pci_serr (system error), 16-13, 16-79, 16-96 pci_stop (stop), 16-14, 16-61 pci_trdy (target ready), 16-14, 16-57 pic irq[0:11], 10-8 irq_out , 10-9, 10-26 mcp , 10-9 ude , 10-9 rapidio rio_rclk and rio_rclk (receive clock and complement), 17-8 rio_rd[0:7] and rio_rd [0:7] (receive data and complements), 17-8 rio_rframe and rio_rframe (receive frame and complement), 17-8 rio_tclk and rio_tclk (transmit clock out and complement), 17-8 rio_td[0:7] and rio_td [0:7] (transmit data and complement), 17-8 rio_tframe and rio_tframe (transmit frame and complement), 17-9 rio_tx_clk_in and rio_tx_clk_in (transmit clock in and complement), 17-9 reset hreset (hard reset), 4-2, 4-9 hreset_req (hard reset request), 4-2, 11-17, 11-18 ready, 4-2, 20-25, 20-26 sreset (soft reset), 4-2, 4-9 tsec
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 index 2-20 freescale semiconductor t?t ec_gtx_clk125 (tsec gigabit transmit 125 mhz source), 14-10 ec_mdc (tsec management data clock), 14-11 ec_mdio (tsec management data input/output), 14-11 tsec n _col (tsec 1?2 collision input), 14-10 tsec n _crs (tsec 1?2 carrier sense input), 14-10 tsec n _gtx_clk (tsec 1?2 gigabit transmit clock), 14-10 tsec n _rx_clk (tsec 1?2 receive clock), 14-11 tsec n _rx_dv (tsec 1?2 receive data valid), 14-11 tsec n _rx_er (tsec 1?2 receive error), 14-12 tsec n _rxd[7:0] (tsec 1?2 receive data in), 14-11 tsec n _tx_clk (tsec 1?2 transmit clock in), 14-12 tsec n _tx_en (tsec 1?2 transmit data valid in), 14-12 tsec n _tx_er (tsec 1?2 transmit error in), 14-12 tsec n _txd[7:0] (tsec 1?2 transmit data out), 14-12 watchpoint monitor trig_in (watchpoint trigger in), 20-8, 20-12, 20-18 trig_out (watchpoint trigger out), 20-9, 20-25 sleep mode, 1-19, 18-24, 18-28 see also global utilities, power management snooping power management and snooping (global utilities), 18-28 soft reset and reconfiguring for fec, 21-51 soft reset and reconfiguring for tsec, 14-112 spefscr (signal processing and embedded floating-point status and control register), see e500 core, registers sprg n (software-use registers 0?7), see e500 core, registers sram, see l2 cache/sram, 7-22 sreset (soft reset) signal, 4-2, 4-9 srr0 (save/restore register 0), see e500 core, registers srr1 (save/restore register 1), see e500 core, registers stashing, see l2 cache/sram, stashing, 7-21 svr (system version register), see e500 core, registers sysclk (system clock input) signal, 4-3 system version (svr), 18-18 t ta (lbc data transfer acknowledge) signal, 13-36 target-disconnect, see pci/pci-x controller tbl (time base lower register), see e500 core, registers tbu (time base upper register), see e500 core, registers tck (jtag test clock) signal, 20-9 tcr (timer control register), see e500 core, registers tdi (jtag test data input) signal, 20-9 tdo (jtag test data output) signal, 20-9 termination pci/pci-x, termination of pci transactions, 16-64 test interface, see jtag test access port test_sel (factory test) signal, 20-10 therm[0:1] (thermal resistor access) signals, 20-10 three-speed ethernet controller, see tsec timing diagrams pci/pci-x transactions tlb0cfg (tlb0 configuration register), see e500 core, registers tlb1cfg (tlb1 configuration register), see e500 core, registers tms (jtag test mode select) signal, 20-9 trace buffer and watchpoint monitor, block diagram, 20-1 as a second watchpoint monitor, 20-29 functional description, 20-29-20-32 initialization, 20-33 modes of triggering and arming, 20-5 overview, 20-2 register descriptions, 20-16-20-23 by acronym, see register index see also watchpoint monitor, 20-5 traced data formats relative to tbcr1[ifsel] ddr trace buffer entry, 20-31 ecm trace buffer entry, 20-30 pci trace buffer entry, 20-32 rapidio trace buffer entry, 20-32 transactions pci/pci-x, see pci/pci-x controller, transactions trig_in (watchpoint trigger in) signal, 20-8, 20-12, 20-18 trig_out (watchpoint trigger out) signal, 20-9, 20-25 trst (jtag test reset) signal, 20-10 tsec block diagram, 14-6 buffer descriptors, 14-125 receive buffer descriptor (rxbd), 14-128 transmit data buffer descriptor (txbd), 14-126 clocks inputs and outputs, 14-11 management clock out (ec_mdc), 14-55 operation, 4-25 configuration of interfaces, 14-131 gmii interface mode, 14-135 mii interface mode, 14-131 rgmii interface mode, 14-143 rtbi interface mode, 14-147 tbi interface mode, 14-138 data width (por), 4-16 error handling, 14-123-14-124 features, 14-7 functional description, 14-103 gigabit ethernet channel operation, 14-111 flow control, 14-119 frame reception, 14-115 frame recognition, 14-116
u?u MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 freescale semiconductor index 2-21 destination address recognition, 14-116 frame transmission, 14-113 initialization sequence, 14-111 hardware controlled initialization, 14-111 user initialization, 14-111 inter-packet gap time, 14-123 interrupt handling, 14-120-14-123 hash function hash table algorithm, 14-118 hash table effectiveness, 14-118 registers, 14-87 initialization/application information, 14-131-14-151 see also tsec, configuration interrupts, 14-120 interrupt coalescing, 14-121 by frame count threshold, 14-122 by timer threshold, 14-122 interrupt registers, 14-20-14-25 mac functionality, 14-46-14-60 configuration, 14-46 csma/cd controlling, 14-46 packet collisions, 14-47 packet flow, 14-47 phy link control, 14-48 registers, 14-49 memory map/register definition, 14-13 detailed memory map, 14-14-14-20 top level module map, 14-13 tsec2 controller offsets, 14-20 modes of operation, 14-8 10 mbps and 100 mbps mii operation, 14-9 1000 mbps gmii and tbi operation, 14-9 address recognition options, 14-9 full and half-duplex operation, 14-8 internal and external loop back, 14-123 rmon support, 14-116 overview, 1-17, 14-7 performance monitor events tsec1, 19-22, 19-23 tsec2, 19-24 physical interface connections, 14-103 gigabit media-independent interface (gmii), 14-104 media-independent interface (mii), 14-104 reduced gigabit media-independent interface (rgmii), 14-105 reduced ten-bit interface (rtbi), 14-107 ten-bit interface (tbi), 14-106 register descriptions, 14-20 by acronym, see register index, 14-20 fifo control and status registers, 14-30-14-33 general control and status registers, 14-20-14-30 hash function registers, 14-87-14-89 mac registers, 14-46-14-60 mib registers, 14-60-14-87 receive control and status registers, 14-40-14-46 ten-bit interface (tbi) registers, 14-91-14-103 transmit control and status registers, 14-33-14-40 signals, 14-9-14-12 see also signals, tsec soft reset and reconfiguring procedure, 14-112 tbi mii registers, see tsec, register descriptions tsec1 protocol (por), 4-17 tsec2 protocol (por), 4-17 tsec2 signals as gp i/o, see global utilities, general-purpose i/o signals tsec n _col (tsec 1?2 collision input) signals, 14-10 tsec n _crs (tsec 1?2 carrier sense input) signals, 14-10 tsec n _gtx_clk (tsec 1?2 gigabit transmit clock) signals, 14-10 tsec n _rx_clk (tsec 1?2 receive clock) signals, 14-11 tsec n _rx_dv (tsec 1?2 receive data valid) signals, 14-11 tsec n _rx_er (tsec 1?2 receive error) signals, 14-12 tsec n _rxd[7:0] (tsec 1?2 receive data in) signals, 14-11 tsec n _tx_clk (tsec 1?2 transmit clock in) signals, 14-12 tsec n _tx_en (tsec 1?2 transmit data valid in) signals, 14-12 tsec n _tx_er (tsec 1?2 transmit error in) signals, 14-12 tsec n _txd[7:0] (tsec 1?2 transmit data out) signals, 14-12 tsr (timer status register), see e500 core, registers u uart_cts [0:1] (duart clear to send) signals, 12-1, 12-3, 12-4 uart_rts [0:1] (duart request to send) signals, 12-1, 12-3, 12-4 uart_sin [0:1] (duart transmitter serial data in) signals, 12-3, 12-4 uart_sout [0:1] (duart transmitter serial data out) signals, 12-3, 12-4 ude (unconditional debug event) signal, 10-9 universal asynchronous receiver/transmitter, see duart upmc n (user performance monitor counter registers 0?3), see e500 core, registers upmgc0 (user performance monitor global control register 0), see e500 core, registers upmlca n (user performance monitor local control registers a0?a3), see e500 core, registers upmlcb n (user performance monitor local control registers b0?b3), see e500 core, registers upwait (lbc upm wait) signal, 13-7, 13-63
MPC8540 powerquicc iii integrated host processor reference manual, rev. 1 index 2-22 freescale semiconductor w?z usprg0 (user software-use register 0), see e500 core, registers w watchpoint monitor and trace buffer, block diagram, 20-1 functional description, 20-28-20-29 initialization, 20-33 modes of triggering and arming, 20-5 overview, 20-2 performance monitor events, 20-29 register descriptions, 20-11-20-16 by acronym, see register index second wm by using trace buffer, 20-29 see also trace buffer, 20-5 signals summary, 20-6 see also signals, watchpoint, 20-6 x xer (integer exception register), see e500 core, registers z zbt sram interface (lbc), 13-101
i iii 8 9 10 11 12 13 14 15 16 17 1 2 3 4 iv 18 19 20 21 ii 5 6 7 a glo reg ind part i?overview overview memory map signal descriptions reset, clocking, and initialization part ii?e500 core complex and l2 cache e500 core complex overview e500 register summary l2 look-aside cache/sram part iii?memory and i/o interfaces e500 coherency module ddr memory controller programmable interrupt controller i 2 c interface duart local bus controller three-speed ethernet controllers dma controller pci/pci-x bus interface rapidio interface part iv?global functions and debug global utilities performance monitor debug features and watchpoint facility 10/100 fast ethernet controller appendix a?revision history glossary of terms and abbreviations register index (memory-mapped registers) general index
i iii 8 9 10 11 12 13 14 15 16 17 1 2 3 4 iv 18 19 20 21 ii 5 6 7 a glo reg ind part i?overview overview memory map signal descriptions reset, clocking, and initialization part ii?e500 core complex and l2 cache e500 core complex overview e500 register summary l2 look-aside cache/sram part iii?memory and i/o interfaces e500 coherency module ddr memory controller programmable interrupt controller i 2 c interface duart local bus controller three-speed ethernet controllers dma controller pci/pci-x bus interface rapidio interface part iv?global functions and debug global utilities performance monitor debug features and watchpoint facility 10/100 fast ethernet controller appendix a?revision history glossary of terms and abbreviations register index (memory-mapped registers) general index


▲Up To Search▲   

 
Price & Availability of MPC8540

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X